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
Merge requests
!60
mysql update message text on empty db
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
mysql update message text on empty db
5198-detect-empty-mysql-db
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
5198-detect-empty-mysql-db
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
1a2a793d
1 commit,
3 years ago
1 file
+
1
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
plugins/localdump/mysql.sh
+
1
−
1
Options
@@ -101,7 +101,7 @@ function mysql.db.dump(){
@@ -101,7 +101,7 @@ function mysql.db.dump(){
_iTables
=
$(
mysql
--skip-column-names
--batch
-e
"use
$_dbname
; show tables ;"
|
wc
-l
)
_iTables
=
$(
mysql
--skip-column-names
--batch
-e
"use
$_dbname
; show tables ;"
|
wc
-l
)
if
[
$_iTables
-eq
0
]
;
if
[
$_iTables
-eq
0
]
;
then
then
echo
-n
"
NO DATA in database
"
echo
-n
"
EMPTY DATABASE ...
"
else
else
echo
"ERROR: no data - the dump doesn't contain any CREATE or INSERT statement."
echo
"ERROR: no data - the dump doesn't contain any CREATE or INSERT statement."
# force an error
# force an error
Loading