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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f77336e6
Commit
f77336e6
authored
Oct 14, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not add DROP TABLE and LOCK TABLES to the dump in --xml mode
parent
f90253a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
client/mysqldump.c
client/mysqldump.c
+13
-15
No files found.
client/mysqldump.c
View file @
f77336e6
...
@@ -426,7 +426,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -426,7 +426,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case
'V'
:
print_version
();
exit
(
0
);
case
'V'
:
print_version
();
exit
(
0
);
case
'X'
:
case
'X'
:
opt_xml
=
1
;
opt_xml
=
1
;
opt_disable_keys
=
0
;
extended_insert
=
opt_drop
=
opt_lock
=
opt_disable_keys
=
opt_autocommit
=
opt_create_db
=
0
;
break
;
break
;
case
'I'
:
case
'I'
:
case
'?'
:
case
'?'
:
...
@@ -1153,7 +1154,7 @@ static void dumpTable(uint numFields, char *table)
...
@@ -1153,7 +1154,7 @@ static void dumpTable(uint numFields, char *table)
safe_exit
(
EX_CONSCHECK
);
safe_exit
(
EX_CONSCHECK
);
return
;
return
;
}
}
if
(
extended_insert
&&
!
opt_xml
)
if
(
extended_insert
)
{
{
ulong
length
=
lengths
[
i
];
ulong
length
=
lengths
[
i
];
if
(
i
==
0
)
if
(
i
==
0
)
...
@@ -1238,7 +1239,7 @@ static void dumpTable(uint numFields, char *table)
...
@@ -1238,7 +1239,7 @@ static void dumpTable(uint numFields, char *table)
if
(
opt_xml
)
if
(
opt_xml
)
fprintf
(
md_result_file
,
"
\t
</row>
\n
"
);
fprintf
(
md_result_file
,
"
\t
</row>
\n
"
);
if
(
extended_insert
&&
!
opt_xml
)
if
(
extended_insert
)
{
{
ulong
row_length
;
ulong
row_length
;
dynstr_append
(
&
extended_row
,
")"
);
dynstr_append
(
&
extended_row
,
")"
);
...
@@ -1251,15 +1252,12 @@ static void dumpTable(uint numFields, char *table)
...
@@ -1251,15 +1252,12 @@ static void dumpTable(uint numFields, char *table)
}
}
else
else
{
{
if
(
row_break
&&
!
opt_xml
)
if
(
row_break
)
fputs
(
";
\n
"
,
md_result_file
);
fputs
(
";
\n
"
,
md_result_file
);
row_break
=
1
;
/* This is first row */
row_break
=
1
;
/* This is first row */
if
(
!
opt_xml
)
fputs
(
insert_pat
,
md_result_file
);
{
fputs
(
extended_row
.
str
,
md_result_file
);
fputs
(
insert_pat
,
md_result_file
);
fputs
(
extended_row
.
str
,
md_result_file
);
}
total_length
=
row_length
+
init_length
;
total_length
=
row_length
+
init_length
;
}
}
}
}
...
@@ -1394,9 +1392,9 @@ static int init_dumping(char *database)
...
@@ -1394,9 +1392,9 @@ static int init_dumping(char *database)
char
qbuf
[
128
];
char
qbuf
[
128
];
MYSQL_ROW
row
;
MYSQL_ROW
row
;
MYSQL_RES
*
dbinfo
;
MYSQL_RES
*
dbinfo
;
sprintf
(
qbuf
,
"SHOW CREATE DATABASE WITH IF NOT EXISTS %s"
,
database
);
sprintf
(
qbuf
,
"SHOW CREATE DATABASE WITH IF NOT EXISTS %s"
,
database
);
if
(
mysql_query
(
sock
,
qbuf
)
||
!
(
dbinfo
=
mysql_store_result
(
sock
)))
if
(
mysql_query
(
sock
,
qbuf
)
||
!
(
dbinfo
=
mysql_store_result
(
sock
)))
{
{
/* Old server version, dump generic CREATE DATABASE */
/* Old server version, dump generic CREATE DATABASE */
...
@@ -1420,7 +1418,7 @@ static int init_dumping(char *database)
...
@@ -1420,7 +1418,7 @@ static int init_dumping(char *database)
(
opt_quoted
?
"`"
:
""
));
(
opt_quoted
?
"`"
:
""
));
}
}
}
}
if
(
extended_insert
&&
!
opt_xml
)
if
(
extended_insert
)
if
(
init_dynamic_string
(
&
extended_row
,
""
,
1024
,
1024
))
if
(
init_dynamic_string
(
&
extended_row
,
""
,
1024
,
1024
))
exit
(
EX_EOM
);
exit
(
EX_EOM
);
return
0
;
return
0
;
...
@@ -1683,15 +1681,15 @@ MASTER_LOG_POS=%s ;\n",row[0],row[1]);
...
@@ -1683,15 +1681,15 @@ MASTER_LOG_POS=%s ;\n",row[0],row[1]);
if
(
mysql_query
(
sock
,
"COMMIT"
))
if
(
mysql_query
(
sock
,
"COMMIT"
))
{
{
my_printf_error
(
0
,
"Error: Couldn't execute 'COMMIT': %s"
,
my_printf_error
(
0
,
"Error: Couldn't execute 'COMMIT': %s"
,
MYF
(
0
),
mysql_error
(
sock
));
MYF
(
0
),
mysql_error
(
sock
));
}
}
}
}
dbDisconnect
(
current_host
);
dbDisconnect
(
current_host
);
write_footer
(
md_result_file
);
write_footer
(
md_result_file
);
if
(
md_result_file
!=
stdout
)
if
(
md_result_file
!=
stdout
)
my_fclose
(
md_result_file
,
MYF
(
0
));
my_fclose
(
md_result_file
,
MYF
(
0
));
my_free
(
opt_password
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
(
opt_password
,
MYF
(
MY_ALLOW_ZERO_PTR
));
if
(
extended_insert
&
!
opt_xml
)
if
(
extended_insert
)
dynstr_free
(
&
extended_row
);
dynstr_free
(
&
extended_row
);
my_end
(
0
);
my_end
(
0
);
return
(
first_error
);
return
(
first_error
);
...
...
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