Skip to content
Snippets Groups Projects
Commit cef730ab authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update sandbox line detection

parent 6f045807
Branches
No related tags found
1 merge request!146OP#7599 mysql restore: Error in first line https://projects.iml.unibe.ch/work_packages/7599
...@@ -100,8 +100,7 @@ function mysql.db.import(){ ...@@ -100,8 +100,7 @@ function mysql.db.import(){
# https://mariadb.org/mariadb-dump-file-compatibility-change/ # https://mariadb.org/mariadb-dump-file-compatibility-change/
# if sandbox mode is detected then skip the first line # if sandbox mode is detected then skip the first line
local sSandbox; sSandbox='/*!999999\- enable the sandbox mode */' if zcat "$_dumpfile" | head -1 | grep -Fq '!999999\- enable the sandbox mode'
if zcat "$_dumpfile" | head -1 | grep -Fq "$sSandbox"
then then
zcat "$_dumpfile" | tail +2 | mysql $BACKUP_PARAMS "${_dbname}" zcat "$_dumpfile" | tail +2 | mysql $BACKUP_PARAMS "${_dbname}"
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment