mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
This commit is contained in:
@ -72,6 +72,7 @@ static int port= 0;
|
||||
static const char* sock= 0;
|
||||
static const char* user = 0;
|
||||
static char* pass = 0;
|
||||
static char *charset= 0;
|
||||
|
||||
static ulonglong start_position, stop_position;
|
||||
#define start_position_mot ((my_off_t)start_position)
|
||||
@ -733,6 +734,9 @@ static struct my_option my_long_options[] =
|
||||
"Extract only binlog entries created by the server having the given id.",
|
||||
(gptr*) &server_id, (gptr*) &server_id, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"Add 'SET NAMES character_set' to the output.", (gptr*) &charset,
|
||||
(gptr*) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"short-form", 's', "Just show the queries, no extra info.",
|
||||
(gptr*) &short_form, (gptr*) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
@ -1457,6 +1461,13 @@ int main(int argc, char** argv)
|
||||
"/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,"
|
||||
"COMPLETION_TYPE=0*/;\n");
|
||||
|
||||
if (charset)
|
||||
fprintf(result_file,
|
||||
"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"
|
||||
"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;"
|
||||
"\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
|
||||
"\n/*!40101 SET NAMES %s */;\n", charset);
|
||||
|
||||
for (save_stop_position= stop_position, stop_position= ~(my_off_t)0 ;
|
||||
(--argc >= 0) && !stop_passed ; )
|
||||
{
|
||||
@ -1481,6 +1492,12 @@ int main(int argc, char** argv)
|
||||
if (disable_log_bin)
|
||||
fprintf(result_file, "/*!32316 SET SQL_LOG_BIN=@OLD_SQL_LOG_BIN*/;\n");
|
||||
|
||||
if (charset)
|
||||
fprintf(result_file,
|
||||
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"
|
||||
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"
|
||||
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n");
|
||||
|
||||
if (tmpdir.list)
|
||||
free_tmpdir(&tmpdir);
|
||||
if (result_file != stdout)
|
||||
|
Reference in New Issue
Block a user