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
ac442b96
Commit
ac442b96
authored
Jan 29, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
client/mysqldump.c: merged changes for bug #5185 into the 50 tree.
parents
1c49d548
79016ecb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
client/mysqldump.c
client/mysqldump.c
+40
-3
No files found.
client/mysqldump.c
View file @
ac442b96
...
@@ -2186,6 +2186,38 @@ static my_bool dump_all_views_in_db(char *database)
...
@@ -2186,6 +2186,38 @@ static my_bool dump_all_views_in_db(char *database)
return
0
;
return
0
;
}
/* dump_all_tables_in_db */
}
/* dump_all_tables_in_db */
/*
get_actual_table_name -- executes a SHOW TABLES LIKE '%s' to get the actual
table name from the server for the table name given on the command line.
we do this because the table name given on the command line may be a
different case (e.g. T1 vs t1)
RETURN
void
*/
static
void
get_actual_table_name
(
const
char
*
old_table_name
,
char
*
new_table_name
,
int
buf_size
)
{
MYSQL_RES
*
tableRes
;
MYSQL_ROW
row
;
char
query
[
NAME_LEN
+
50
];
DBUG_ENTER
(
"get_actual_table_name"
);
sprintf
(
query
,
"SHOW TABLES LIKE '%s'"
,
old_table_name
);
if
(
mysql_query_with_error_report
(
sock
,
0
,
query
))
{
safe_exit
(
EX_MYSQLERR
);
}
tableRes
=
mysql_store_result
(
sock
);
row
=
mysql_fetch_row
(
tableRes
);
strncpy
(
new_table_name
,
row
[
0
],
buf_size
);
mysql_free_result
(
tableRes
);
}
/* get_actual_table_name */
static
int
dump_selected_tables
(
char
*
db
,
char
**
table_names
,
int
tables
)
static
int
dump_selected_tables
(
char
*
db
,
char
**
table_names
,
int
tables
)
{
{
uint
numrows
;
uint
numrows
;
...
@@ -2219,9 +2251,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
...
@@ -2219,9 +2251,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
print_xml_tag1
(
md_result_file
,
""
,
"database name="
,
db
,
"
\n
"
);
print_xml_tag1
(
md_result_file
,
""
,
"database name="
,
db
,
"
\n
"
);
for
(
i
=
0
;
i
<
tables
;
i
++
)
for
(
i
=
0
;
i
<
tables
;
i
++
)
{
{
numrows
=
getTableStructure
(
table_names
[
i
],
db
);
char
new_table_name
[
NAME_LEN
];
if
(
!
dFlag
&&
numrows
>
0
)
dumpTable
(
numrows
,
table_names
[
i
]);
/* the table name passed on commandline may be wrong case */
get_actual_table_name
(
table_names
[
i
],
new_table_name
,
sizeof
(
new_table_name
)
);
numrows
=
getTableStructure
(
new_table_name
,
db
);
dumpTable
(
numrows
,
new_table_name
);
my_free
(
order_by
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
order_by
,
MYF
(
MY_ALLOW_ZERO_PTR
));
order_by
=
0
;
order_by
=
0
;
}
}
...
...
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