Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Commits
7a672431
Commit
7a672431
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
mysql dump: update check for empty data
parent
32a41779
Branches
Branches containing commit
No related tags found
1 merge request
!58
mysql dump: update check for empty data
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inc_bash.sh
+2
-2
2 additions, 2 deletions
inc_bash.sh
plugins/localdump/mysql.sh
+5
-5
5 additions, 5 deletions
plugins/localdump/mysql.sh
with
7 additions
and
7 deletions
inc_bash.sh
+
2
−
2
View file @
7a672431
...
...
@@ -11,8 +11,8 @@
typeset
-i
rc
=
0
# Fetch returncode of last executed command.
# It summarizes all exitcodes into rc (= if any job failed it is <> 0)
# It stores the last exitcode in myrc
#
-
It summarizes all exitcodes into rc (= if any job failed it is <> 0)
#
-
It stores the last exitcode in myrc
function
fetchrc
(){
myrc
=
$?
rc
=
$rc
+
$myrc
...
...
This diff is collapsed.
Click to expand it.
plugins/localdump/mysql.sh
+
5
−
5
View file @
7a672431
...
...
@@ -93,15 +93,15 @@ function mysql.db.dump(){
"
$_dbname
"
2>&1
fetchrc
>
/dev/null
zgrep
-iE
"(CREATE|INSERT)"
"
$_dumpfile
"
>
/dev/null
typeset
-i
local
_rc2
=
$?
test
$_rc2
-ne
0
&&
echo
"ERROR: the dump does not contain any CREATE or INSERT statement."
if
[
$myrc
-eq
0
]
;
then
zgrep
-iE
"(CREATE|INSERT)"
"
$_dumpfile
"
>
/dev/null
fetchrc
>
/dev/null
test
$myrc
-ne
0
&&
echo
"ERROR: no data - the dump doesn't contain any CREATE or INSERT statement."
fi
typeset
-i
local
myrc+
=
$_rc2
test
$myrc
-eq
0
&&
mysql_COUNT_DUMPS+
=
1
test
$myrc
-eq
0
||
mysql_COUNT_ERRORS+
=
1
test
$myrc
-eq
0
}
# import [file] --> [database]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment