Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
94107592
Commit
94107592
authored
Aug 28, 2007
by
tsmith@ramayana.hindu.god
Browse files
Options
Browse Files
Download
Plain Diff
Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
parents
26afeffa
044cd7b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
24 deletions
+8
-24
scripts/mysqlhotcopy.sh
scripts/mysqlhotcopy.sh
+8
-24
No files found.
scripts/mysqlhotcopy.sh
View file @
94107592
...
@@ -821,30 +821,14 @@ sub get_raid_dirs {
...
@@ -821,30 +821,14 @@ sub get_raid_dirs {
sub get_list_of_tables
{
sub get_list_of_tables
{
my
(
$db
)
=
@_
;
my
(
$db
)
=
@_
;
# "use database" cannot cope with database names containing spaces
my
$tables
=
# so create a new connection
eval
{
$dbh
->selectall_arrayref
(
'SHOW TABLES FROM '
.
my
$dbh
=
DBI->connect
(
"dbi:mysql:
${
db
}${
dsn
}
;mysql_read_default_group=mysqlhotcopy"
,
$dbh
->quote_identifier
(
$db
))
$opt
{
user
}
,
$opt
{
password
}
,
}
||
[]
;
{
warn
"Unable to retrieve list of tables in
$db
:
$@
"
if
$@
;
RaiseError
=>
1,
PrintError
=>
0,
AutoCommit
=>
1,
})
;
my @dbh_tables
=
eval
{
$dbh
->tables
()
}
;
## Remove quotes around table names
my
$quote
=
$dbh
->get_info
(
29
)
;
# SQL_IDENTIFIER_QUOTE_CHAR
if
(
$quote
)
{
foreach
(
@dbh_tables
)
{
s/^
$quote
(
.
*
)
$quote$/$1
/
;
s/
$quote$quote
/
$quote
/g
;
}
}
$dbh
->disconnect
()
;
return
(
map
{
$_
->[0]
}
@
$tables
)
;
return
@dbh_tables
;
}
}
sub quote_names
{
sub quote_names
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment