diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-21 17:53:22 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-21 17:53:22 -0300 |
commit | aa6e0e9fead7a7922fe47c898601b5f8cfe80354 (patch) | |
tree | 3b1eb3c742fda559aa11c09645b13350d9bbc5f5 /lib | |
parent | 8afafcbdcd7a68dd6d12ba67a9c78efa16c7047d (diff) | |
download | hydra-aa6e0e9fead7a7922fe47c898601b5f8cfe80354.tar.gz hydra-aa6e0e9fead7a7922fe47c898601b5f8cfe80354.tar.bz2 |
Truncate database name to 16 chars max
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/backup | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hydra/backup b/lib/hydra/backup index 000bc5a..5d61db3 100644 --- a/lib/hydra/backup +++ b/lib/hydra/backup @@ -168,3 +168,9 @@ function hydra_backup_restore_database { echo "Database should be manually restored" fi } + +# Return a normalized database name +function hydra_database_name { + # MySQL 16 chars limit + echo $1 | sed -r 's/(^>.{16}).*/\1/'" +} |