Commit e0494487 authored by He Zhenxing's avatar He Zhenxing

Backport post fix compiler warnings and test failures for BUG#25192 BUG#12190

parent 8d9f346b
......@@ -69,7 +69,21 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`;
# Create relay log file.
copy_file $fake_relay_log $_fake_relay_log;
# Create relay log index.
--exec echo ./$_fake_filename-fake.000001 > $_fake_relay_index
# After patch for BUG#12190, the filename used in CHANGE MASTER
# RELAY_LOG_FILE will be automatically added the directory of the
# relay log before comparison, thus we need to added the directory
# part (./ on unix .\ on windows) when faking the relay-log-bin.index.
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
{
eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
}
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
{
eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index';
}
# Setup replication from existing relay log.
eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4;
......
......@@ -25,9 +25,22 @@ let $MYSQLD_DATADIR= `select @@datadir`;
copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
write_file $MYSQLD_DATADIR/slave-relay-bin.index;
./slave-relay-bin.000001
EOF
# After patch for BUG#12190, the filename used in CHANGE MASTER
# RELAY_LOG_FILE will be automatically added the directory of the
# relay log before comparison, thus we need to added the directory
# part (./ on unix .\ on windows) when faking the relay-log-bin.index.
disable_query_log;
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`)
{
eval select './slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
}
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`)
{
eval select '.\\\\slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index';
}
enable_query_log;
change master to
MASTER_HOST='dummy.localdomain',
......
......@@ -478,7 +478,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
res= (char**) (ptr+sizeof(alloc));
res[0]= **argv; /* Copy program name */
/* set arguments separator */
res[1]= args_separator;
res[1]= (char *)args_separator;
for (i=2 ; i < (uint) *argc ; i++)
res[i]=argv[0][i];
res[i]=0; /* End pointer */
......@@ -534,7 +534,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
/* set arguments separator for arguments from config file and
command line */
res[args.elements+1]= args_separator;
res[args.elements+1]= (char *)args_separator;
if (*argc)
memcpy((uchar*) (res+1+args.elements+1), (char*) ((*argv)+1),
......
......@@ -1901,7 +1901,7 @@ updating the index files.", max_found);
*/
if (((strlen(ext_buf) + (end - name)) >= FN_REFLEN))
{
sql_print_error("Log filename too large: %s%s (%d). \
sql_print_error("Log filename too large: %s%s (%lu). \
Please fix this by archiving old logs and updating the \
index files.", name, ext_buf, (strlen(ext_buf) + (end - name)));
error= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment