Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-19 17:39:12+02:00, msvensson@neptunus.(none) +23 -0
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
MERGE: 1.1810.2078.70
client/mysqldump.c@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.214.1.33
client/mysqltest.c@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.155.9.62
mysql-test/extra/rpl_tests/rpl_log.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -1
Auto merged
MERGE: 1.27.4.2
mysql-test/extra/rpl_tests/rpl_log.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/rpl_log.test -> mysql-test/extra/rpl_tests/rpl_log.test
mysql-test/extra/rpl_tests/rpl_max_relay_size.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -5
Auto merged
MERGE: 1.16.2.2
mysql-test/extra/rpl_tests/rpl_max_relay_size.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/rpl_max_relay_size.test -> mysql-test/extra/rpl_tests/rpl_max_relay_size.test
mysql-test/r/mysqldump.result@stripped, 2006-10-19 17:39:09+02:00, msvensson@neptunus.(none) +0 -0
SCCS merged
MERGE: 1.83.1.34
mysql-test/r/mysqltest.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.24.1.14
mysql-test/r/rpl_000015.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.34.1.2
mysql-test/r/rpl_000015.result@stripped, 2006-10-19 17:16:38+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/r/rpl000015.result -> mysql-test/r/rpl_000015.result
mysql-test/r/rpl_change_master.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.17.1.1
mysql-test/r/rpl_err_ignoredtable.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.20.2.2
mysql-test/r/rpl_err_ignoredtable.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/r/rpl_error_ignored_table.result -> mysql-test/r/rpl_err_ignoredtable.result
mysql-test/r/rpl_loaddata.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.28.1.4
mysql-test/r/rpl_replicate_do.result@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.30.1.3
mysql-test/r/rpl_stm_log.result@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.62.5.2
mysql-test/r/rpl_stm_log.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/r/rpl_log.result -> mysql-test/r/rpl_stm_log.result
mysql-test/r/rpl_stm_max_relay_size.result@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.20.2.2
mysql-test/r/rpl_stm_max_relay_size.result@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/r/rpl_max_relay_size.result -> mysql-test/r/rpl_stm_max_relay_size.result
mysql-test/t/mysqldump.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.76.1.30
mysql-test/t/mysqltest.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.24.1.23
mysql-test/t/rpl_000015.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.31.2.2
mysql-test/t/rpl_000015.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/rpl000015.test -> mysql-test/t/rpl_000015.test
mysql-test/t/rpl_change_master.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -1
Auto merged
MERGE: 1.14.1.1
mysql-test/t/rpl_drop_db.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.6.1.2
mysql-test/t/rpl_err_ignoredtable.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -1
Auto merged
MERGE: 1.21.1.2
mysql-test/t/rpl_err_ignoredtable.test@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/rpl_error_ignored_table.test -> mysql-test/t/rpl_err_ignoredtable.test
mysql-test/t/rpl_loaddata.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -2
Auto merged
MERGE: 1.21.1.3
mysql-test/t/rpl_replicate_do.test@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -1
Auto merged
MERGE: 1.22.1.3
mysql-test/t/rpl_stm_log-master.opt@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.3.1.2
mysql-test/t/rpl_stm_log-master.opt@stripped, 2006-10-19 17:16:39+02:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/rpl_log-master.opt -> mysql-test/t/rpl_stm_log-master.opt
sql/sql_class.cc@stripped, 2006-10-19 17:16:40+02:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.223.1.28
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.1-new-maint/RESYNC
--- 1.255/client/mysqldump.c 2006-10-19 17:39:18 +02:00
+++ 1.256/client/mysqldump.c 2006-10-19 17:39:18 +02:00
@@ -45,6 +45,7 @@
#include <m_string.h>
#include <m_ctype.h>
#include <hash.h>
+#include <stdarg.h>
#include "client_priv.h"
#include "mysql.h"
@@ -536,6 +537,8 @@
if (opt_xml)
{
fputs("<?xml version=\"1.0\"?>\n", sql_file);
+ /* Schema reference. Allows use of xsi:nil for NULL values and
+ xsi:type to define an element's data type. */
fputs("<mysqldump ", sql_file);
fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
sql_file);
@@ -1136,7 +1139,7 @@
SYNOPSIS
print_quoted_xml()
- output - output file
+ xml_file - output file
str - string to print
len - its length
@@ -1173,34 +1176,63 @@
/*
- Print xml tag with one attribute.
+ Print xml tag. Optionally add attribute(s).
SYNOPSIS
- print_xml_tag1()
- xml_file - output file
- sbeg - line beginning
- stag_atr - tag and attribute
- sval - value of attribute
- send - line ending
+ print_xml_tag(xml_file, sbeg, send, tag_name, first_attribute_name,
+ ..., attribute_name_n, attribute_value_n, NullS)
+ xml_file - output file
+ sbeg - line beginning
+ send - line ending
+ tag_name - XML tag name.
+ first_attribute_name - tag and first attribute
+ first_attribute_value - (Implied) value of first attribute
+ attribute_name_n - attribute n
+ attribute_value_n - value of attribute n
DESCRIPTION
- Print tag with one attribute to the xml_file. Format is:
- sbeg<stag_atr="sval">send
+ Print XML tag with any number of attribute="value" pairs to the xml_file.
+
+ Format is:
+ sbeg<tag_name first_attribute_name="first_attribute_value" ...
+ attribute_name_n="attribute_value_n">send
NOTE
- sval MUST be a NULL terminated string.
- sval string will be qouted before output.
+ Additional arguments must be present in attribute/value pairs.
+ The last argument should be the null character pointer.
+ All attribute_value arguments MUST be NULL terminated strings.
+ All attribute_value arguments will be quoted before output.
*/
-static void print_xml_tag1(FILE * xml_file, const char* sbeg,
- const char* stag_atr, const char* sval,
- const char* send)
+static void print_xml_tag(FILE * xml_file, const char* sbeg, const char* send,
+ const char* tag_name,
+ const char* first_attribute_name, ...)
{
+ va_list arg_list;
+ char *attribute_name, *attribute_value;
+
fputs(sbeg, xml_file);
- fputs("<", xml_file);
- fputs(stag_atr, xml_file);
- fputs("\"", xml_file);
- print_quoted_xml(xml_file, sval, strlen(sval));
- fputs("\">", xml_file);
+ fputc('<', xml_file);
+ fputs(tag_name, xml_file);
+
+ va_start(arg_list, first_attribute_name);
+ attribute_name= first_attribute_name;
+ while (attribute_name != NullS)
+ {
+ attribute_value= va_arg(arg_list, char *);
+ DBUG_ASSERT(attribute_value != NullS);
+
+ fputc(' ', xml_file);
+ fputs(attribute_name, xml_file);
+ fputc('\"', xml_file);
+
+ print_quoted_xml(xml_file, attribute_value, strlen(attribute_value));
+ fputc('\"', xml_file);
+
+ attribute_name= va_arg(arg_list, char *);
+ }
+ va_end(arg_list);
+
+ fputc('>', xml_file);
fputs(send, xml_file);
check_io(xml_file);
}
@@ -1411,6 +1443,28 @@
/*
+ Print hex value for blob data.
+
+ SYNOPSIS
+ print_blob_as_hex()
+ output_file - output file
+ str - string to print
+ len - its length
+
+ DESCRIPTION
+ Print hex value for blob data.
+*/
+
+static void print_blob_as_hex(FILE *output_file, const char *str, ulong len)
+{
+ /* sakaik got the idea to to provide blob's in hex notation. */
+ char *ptr= str, *end= ptr + len;
+ for (; ptr < end ; ptr++)
+ fprintf(output_file, "%02X", *((uchar *)ptr));
+ check_io(output_file);
+}
+
+/*
dump_routines_for_db
-- retrieves list of routines for a given db, and prints out
the CREATE PROCEDURE definition into the output (the dump).
@@ -1857,7 +1911,8 @@
if (!opt_xml)
fprintf(sql_file, "CREATE TABLE %s (\n", result_table);
else
- print_xml_tag1(sql_file, "\t", "table_structure name=", table, "\n");
+ print_xml_tag(sql_file, "\t", "\n", "table_structure", "name=", table,
+ NullS);
check_io(sql_file);
}
@@ -2429,8 +2484,8 @@
rownr=0;
init_length=(uint) insert_pat.length+4;
if (opt_xml)
- print_xml_tag1(md_result_file, "\t", "table_data name=", table, "\n");
-
+ print_xml_tag(md_result_file, "\t", "\n", "table_data", "name=", table,
+ NullS);
if (opt_autocommit)
{
fprintf(md_result_file, "set autocommit=0;\n");
@@ -2484,7 +2539,7 @@
field->type == MYSQL_TYPE_LONG_BLOB ||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
field->type == MYSQL_TYPE_TINY_BLOB)) ? 1 : 0;
- if (extended_insert)
+ if (extended_insert && !opt_xml)
{
if (i == 0)
dynstr_set(&extended_row,"(");
@@ -2573,18 +2628,25 @@
{
if (opt_xml)
{
- print_xml_tag1(md_result_file, "\t\t", "field name=",
- field->name, "");
- print_quoted_xml(md_result_file, row[i], length);
+ if (opt_hex_blob && is_blob && length)
+ {
+ /* Define xsi:type="xs:hexBinary" for hex encoded data */
+ print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
+ field->name, "xsi:type=", "xs:hexBinary", NullS);
+ print_blob_as_hex(md_result_file, row[i], length);
+ }
+ else
+ {
+ print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
+ field->name, NullS);
+ print_quoted_xml(md_result_file, row[i], length);
+ }
fputs("</field>\n", md_result_file);
}
else if (opt_hex_blob && is_blob && length)
{
- /* sakaik got the idea to to provide blob's in hex notation. */
- char *ptr= row[i], *end= ptr + length;
fputs("0x", md_result_file);
- for (; ptr < end ; ptr++)
- fprintf(md_result_file, "%02X", *((uchar *)ptr));
+ print_blob_as_hex(md_result_file, row[i], length);
}
else
unescape(md_result_file, row[i], length);
@@ -2595,8 +2657,8 @@
char *ptr= row[i];
if (opt_xml)
{
- print_xml_tag1(md_result_file, "\t\t", "field name=",
- field->name, "");
+ print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
+ field->name, NullS);
fputs(!my_isalpha(charset_info, *ptr) ? ptr: "NULL",
md_result_file);
fputs("</field>\n", md_result_file);
@@ -3070,7 +3132,7 @@
if (init_dumping(database, init_dumping_tables))
return 1;
if (opt_xml)
- print_xml_tag1(md_result_file, "", "database name=", database, "\n");
+ print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
if (lock_tables)
{
DYNAMIC_STRING query;
@@ -3153,7 +3215,7 @@
if (init_dumping(database, init_dumping_views))
return 1;
if (opt_xml)
- print_xml_tag1(md_result_file, "", "database name=", database, "\n");
+ print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
if (lock_tables)
{
DYNAMIC_STRING query;
@@ -3292,7 +3354,7 @@
/* We shall countinue here, if --force was given */
}
if (opt_xml)
- print_xml_tag1(md_result_file, "", "database name=", db, "\n");
+ print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS);
/* Dump each selected table */
for (pos= dump_tables; pos < end; pos++)
--- 1.293/sql/sql_class.cc 2006-10-19 17:39:18 +02:00
+++ 1.294/sql/sql_class.cc 2006-10-19 17:39:18 +02:00
@@ -241,6 +241,7 @@
// Must be reset to handle error with THD's created for init of mysqld
lex->current_select= 0;
start_time=(time_t) 0;
+ time_after_lock=(time_t) 0;
current_linfo = 0;
slave_thread = 0;
variables.pseudo_thread_id= 0;
--- 1.20.2.1/mysql-test/r/rpl_error_ignored_table.result 2006-10-19 17:39:18 +02:00
+++ 1.27/mysql-test/r/rpl_err_ignoredtable.result 2006-10-19 17:39:18 +02:00
@@ -5,13 +5,19 @@
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (a int primary key);
+create table t4 (a int primary key);
insert into t1 values (1),(1);
-ERROR 23000: Duplicate entry '1' for key 1
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No #
+Got one of the listed errors
+insert into t4 values (1),(2);
show tables like 't1';
Tables_in_test (t1)
+show tables like 't4';
+Tables_in_test (t4)
+t4
+SELECT * FROM test.t4 ORDER BY a;
+a
+1
+2
drop table t1;
select get_lock('crash_lock%20C', 10);
get_lock('crash_lock%20C', 10)
@@ -26,14 +32,11 @@
0
kill @id;
drop table t2,t3;
-show binlog events from 98;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1 (a int primary key)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (1),(1)
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; create table t2 (a int primary key)
-master-bin.000001 # Query 1 # use `test`; insert into t2 values(1)
-master-bin.000001 # Query 1 # use `test`; create table t3 (id int)
-master-bin.000001 # Query 1 # use `test`; insert into t3 values(connection_id())
-master-bin.000001 # Query 1 # use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
-master-bin.000001 # Query 1 # use `test`; drop table t2,t3
+insert into t4 values (3),(4);
+SELECT * FROM test.t4 ORDER BY a;
+a
+1
+2
+3
+4
+DROP TABLE test.t4;
--- 1.20.2.1/mysql-test/r/rpl_max_relay_size.result 2006-10-19 17:39:18 +02:00
+++ 1.24/mysql-test/r/rpl_stm_max_relay_size.result 2006-10-19 17:39:18 +02:00
@@ -27,7 +27,7 @@
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 72952
+Read_Master_Log_Pos 72956
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -36,13 +36,13 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 72952
+Exec_Master_Log_Pos 72956
Relay_Log_Space #
Until_Condition None
Until_Log_File
@@ -70,7 +70,7 @@
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 72952
+Read_Master_Log_Pos 72956
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -79,13 +79,13 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 72952
+Exec_Master_Log_Pos 72956
Relay_Log_Space #
Until_Condition None
Until_Log_File
@@ -113,7 +113,7 @@
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 72952
+Read_Master_Log_Pos 72956
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -122,13 +122,13 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 72952
+Exec_Master_Log_Pos 72956
Relay_Log_Space #
Until_Condition None
Until_Log_File
@@ -162,7 +162,7 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
@@ -194,7 +194,7 @@
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 73038
+Read_Master_Log_Pos 73042
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -203,13 +203,13 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 73038
+Exec_Master_Log_Pos 73042
Relay_Log_Space #
Until_Condition None
Until_Log_File
@@ -233,7 +233,7 @@
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 73114
+Read_Master_Log_Pos 73118
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -242,13 +242,13 @@
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
-Replicate_Ignore_Table
+Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 73114
+Exec_Master_Log_Pos 73118
Relay_Log_Space #
Until_Condition None
Until_Log_File
@@ -263,8 +263,8 @@
flush logs;
show master status;
File master-bin.000002
-Position 98
-Binlog_Do_DB
+Position 102
+Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
#
# End of 4.1 tests
--- 1.21.1.1/mysql-test/t/rpl_error_ignored_table.test 2006-10-19 17:39:18 +02:00
+++ 1.26/mysql-test/t/rpl_err_ignoredtable.test 2006-10-19 17:39:18 +02:00
@@ -1,24 +1,27 @@
# Test for
# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave
# still checks that it has the same error as on the master.
+##########################################################################
+# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY
+##########################################################################
+
+-- source include/master-slave.inc
-source include/master-slave.inc;
connection master;
create table t1 (a int primary key);
+create table t4 (a int primary key);
# generate an error that goes to the binlog
---error 1062
+--error 1022, 1062
insert into t1 values (1),(1);
+insert into t4 values (1),(2);
save_master_pos;
connection slave;
# as the t1 table is ignored on the slave, the slave should be able to sync
sync_with_master;
-# The port number is different when doing the release build with
-# Do-compile, hence we have to replace the port number here accordingly
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
-show slave status;
# check that the table has been ignored, because otherwise the test is nonsense
show tables like 't1';
+show tables like 't4';
+SELECT * FROM test.t4 ORDER BY a;
connection master;
drop table t1;
save_master_pos;
@@ -44,17 +47,20 @@
select (@id := id) - id from t3;
kill @id;
drop table t2,t3;
+insert into t4 values (3),(4);
connection master;
--error 0,1053,2013
reap;
connection master1;
---replace_column 2 # 5 #
-show binlog events from 98;
save_master_pos;
connection slave;
-# SQL slave thread should not have stopped (because table of the killed
-# query is in the ignore list).
sync_with_master;
+SELECT * FROM test.t4 ORDER BY a;
+connection master1;
+DROP TABLE test.t4;
+save_master_pos;
+connection slave;
+sync_with_master;
# End of 4.1 tests
# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed
--- 1.16.2.1/mysql-test/t/rpl_max_relay_size.test 2006-10-19 17:39:18 +02:00
+++ 1.19/mysql-test/extra/rpl_tests/rpl_max_relay_size.test 2006-10-19 17:39:18 +02:00
@@ -3,7 +3,9 @@
# for relay logs too).
# Test of manual relay log rotation with FLUSH LOGS.
-source include/master-slave.inc;
+# Requires statement logging
+-- source include/master-slave.inc
+
connection slave;
stop slave;
connection master;
@@ -38,7 +40,7 @@
start slave;
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
@@ -53,7 +55,7 @@
start slave;
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
@@ -68,7 +70,7 @@
start slave;
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
@@ -82,7 +84,7 @@
# (to make sure it does not crash).
flush logs;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
@@ -103,7 +105,7 @@
connection slave;
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
@@ -118,13 +120,14 @@
connection slave;
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
--vertical_results
show slave status;
connection master;
# test that the absence of relay logs does not make a master crash
flush logs;
+-- replace_column 3 <Binlog_Ignore_DB>
show master status;
--echo #
--- 1.46/mysql-test/r/mysqltest.result 2006-10-19 17:39:18 +02:00
+++ 1.47/mysql-test/r/mysqltest.result 2006-10-19 17:39:18 +02:00
@@ -518,4 +518,6 @@
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
+mysqltest: At line 1: test of die
+Some output
End of tests
--- 1.57/mysql-test/t/mysqltest.test 2006-10-19 17:39:18 +02:00
+++ 1.58/mysql-test/t/mysqltest.test 2006-10-19 17:39:18 +02:00
@@ -1548,5 +1548,19 @@
print "hello\n";
EOF
+# ----------------------------------------------------------------------------
+# test for die
+# ----------------------------------------------------------------------------
+
+--error 1
+--exec echo "die test of die;" | $MYSQL_TEST 2>&1
+
+
+# ----------------------------------------------------------------------------
+# test for exit
+# ----------------------------------------------------------------------------
+
+--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1
+
--echo End of tests
--- 1.239/client/mysqltest.c 2006-10-19 17:39:18 +02:00
+++ 1.240/client/mysqltest.c 2006-10-19 17:39:18 +02:00
@@ -264,7 +264,7 @@
Q_IF,
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
- Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE,
+ Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -345,6 +345,8 @@
"copy_file",
"perl",
"die",
+ /* Don't execute any more commands, compare result */
+ "exit",
0
};
@@ -5429,7 +5431,7 @@
int main(int argc, char **argv)
{
struct st_command *command;
- my_bool q_send_flag= 0;
+ my_bool q_send_flag= 0, abort_flag= 0;
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
MY_STAT res_info;
@@ -5549,7 +5551,7 @@
open_file(opt_include);
}
- while (!read_command(&command))
+ while (!read_command(&command) && !abort_flag)
{
int current_line_inc = 1, processed = 0;
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
@@ -5777,7 +5779,12 @@
die("Parsing is already enabled");
break;
case Q_DIE:
+ /* Abort test with error code and error message */
die("%s", command->first_argument);
+ break;
+ case Q_EXIT:
+ /* Stop processing any more commands */
+ abort_flag= 1;
break;
case Q_RESULT:
--- 1.130/mysql-test/r/mysqldump.result 2006-10-19 17:39:18 +02:00
+++ 1.131/mysql-test/r/mysqldump.result 2006-10-19 17:39:18 +02:00
@@ -3235,6 +3235,28 @@
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
+# Bug #19745: mysqldump --xml produces invalid xml
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB);
+INSERT INTO t1 VALUES(1,0xff00fef0);
+<?xml version="1.0"?>
+<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<database name="test">
+ <table_structure name="t1">
+ <field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" />
+ <field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" />
+ </table_structure>
+ <table_data name="t1">
+ <row>
+ <field name="f1">1</field>
+ <field name="data" xsi:type="xs:hexBinary">FF00FEF0</field>
+ </row>
+ </table_data>
+</database>
+</mysqldump>
+DROP TABLE t1;
+#
create table t1 (a text , b text);
create table t2 (a text , b text);
insert t1 values ("Duck, Duck", "goose");
--- 1.122/mysql-test/t/mysqldump.test 2006-10-19 17:39:18 +02:00
+++ 1.123/mysql-test/t/mysqldump.test 2006-10-19 17:39:18 +02:00
@@ -1415,6 +1415,21 @@
--enable_warnings
--echo #
+--echo # Bug #19745: mysqldump --xml produces invalid xml
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB);
+INSERT INTO t1 VALUES(1,0xff00fef0);
+
+--exec $MYSQL_DUMP --xml --hex-blob --skip-create-options test t1
+
+DROP TABLE t1;
+
+--echo #
--echo # End of 5.0 tests
--echo #
--- 1.34.1.1/mysql-test/r/rpl000015.result 2006-10-19 17:39:19 +02:00
+++ 1.37/mysql-test/r/rpl_000015.result 2006-10-19 17:39:19 +02:00
@@ -1,7 +1,7 @@
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 98
+master-bin.000001 102
reset slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
@@ -17,11 +17,16 @@
start slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No #
drop table if exists t1;
-create table t1 (n int);
+create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
-select * from t1;
+SELECT * FROM t1 ORDER BY n;
+n
+10
+45
+90
+SELECT * FROM t1 ORDER BY n;
n
10
45
--- 1.62.5.1/mysql-test/r/rpl_log.result 2006-10-19 17:39:19 +02:00
+++ 1.72/mysql-test/r/rpl_stm_log.result 2006-10-19 17:39:19 +02:00
@@ -8,99 +8,96 @@
reset master;
reset slave;
reset master;
-create table t1(n int not null auto_increment primary key);
+create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
insert into t1 values (NULL);
drop table t1;
-create table t1 (word char(20) not null);
+create table t1 (word char(20) not null)ENGINE=MyISAM;
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
-drop table t1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 219 Intvar 1 247 INSERT_ID=1
-master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
-master-bin.000001 338 Query 1 414 use `test`; drop table t1
-master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
-master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
-master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
-master-bin.000001 1269 Query 1 1345 use `test`; drop table t1
-show binlog events from 98 limit 1;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-show binlog events from 98 limit 2;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 219 Intvar 1 247 INSERT_ID=1
-show binlog events from 98 limit 2,1;
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Intvar 1 # INSERT_ID=1
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
+master-bin.000001 # Query 1 # use `test`; drop table t1
+master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
+master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
+show binlog events from 102 limit 1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+show binlog events from 102 limit 2;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Intvar 1 # INSERT_ID=1
+show binlog events from 102 limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
flush logs;
-create table t5 (a int);
-drop table t5;
+create table t3 (a int)ENGINE=MyISAM;
start slave;
+
+let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
+
+--source include/wait_slave_status.inc
flush logs;
stop slave;
-create table t1 (n int);
-insert into t1 values (1);
-drop table t1;
+create table t2 (n int)ENGINE=MyISAM;
+insert into t2 values (1);
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-master-bin.000001 219 Intvar 1 247 INSERT_ID=1
-master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
-master-bin.000001 338 Query 1 414 use `test`; drop table t1
-master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
-master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
-master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
-master-bin.000001 1269 Query 1 1345 use `test`; drop table t1
-master-bin.000001 1345 Rotate 1 1389 master-bin.000002;pos=4
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Intvar 1 # INSERT_ID=1
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
+master-bin.000001 # Query 1 # use `test`; drop table t1
+master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
+master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
+master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
show binlog events in 'master-bin.000002';
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
-master-bin.000002 98 Query 1 184 use `test`; create table t5 (a int)
-master-bin.000002 184 Query 1 260 use `test`; drop table t5
-master-bin.000002 260 Query 1 346 use `test`; create table t1 (n int)
-master-bin.000002 346 Query 1 434 use `test`; insert into t1 values (1)
-master-bin.000002 434 Query 1 510 use `test`; drop table t1
+master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
+master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
+master-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
show binary logs;
Log_name File_size
-master-bin.000001 1389
-master-bin.000002 510
+master-bin.000001 1343
+master-bin.000002 388
start slave;
show binary logs;
Log_name File_size
-slave-bin.000001 1552
-slave-bin.000002 348
+slave-bin.000001 1443
+slave-bin.000002 289
show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key)
-slave-bin.000001 219 Intvar 1 247 INSERT_ID=1
-slave-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL)
-slave-bin.000001 338 Query 1 414 use `test`; drop table t1
-slave-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null)
-slave-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581
-slave-bin.000001 1121 Execute_load_query 1 1271 use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
-slave-bin.000001 1271 Query 1 1347 use `test`; drop table t1
-slave-bin.000001 1347 Query 1 1433 use `test`; create table t5 (a int)
-slave-bin.000001 1433 Query 1 1509 use `test`; drop table t5
-slave-bin.000001 1509 Rotate 2 1552 slave-bin.000002;pos=4
+slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
+slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+slave-bin.000001 # Intvar 1 # INSERT_ID=1
+slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
+slave-bin.000001 # Query 1 # use `test`; drop table t1
+slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
+slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
+slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
+slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
show binlog events in 'slave-bin.000002' from 4;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 98 Query 1 184 use `test`; create table t1 (n int)
-slave-bin.000002 184 Query 1 272 use `test`; insert into t1 values (1)
-slave-bin.000002 272 Query 1 348 use `test`; drop table t1
+slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
+slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
+slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 510 # # master-bin.000002 Yes Yes 0 0 510 # None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
reset master;
@@ -108,10 +105,10 @@
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 98 Intvar 2 126 LAST_INSERT_ID=1
-slave-bin.000001 126 Intvar 2 154 INSERT_ID=5
-slave-bin.000001 154 Query 2 289 use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
+slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
+slave-bin.000001 # Intvar 2 # LAST_INSERT_ID=1
+slave-bin.000001 # Intvar 2 # INSERT_ID=5
+slave-bin.000001 # Query 2 # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
select * from t1;
a b
1 1
--- 1.31.2.1/mysql-test/t/rpl000015.test 2006-10-19 17:39:19 +02:00
+++ 1.35/mysql-test/t/rpl_000015.test 2006-10-19 17:39:19 +02:00
@@ -1,3 +1,9 @@
+#####################
+# Change Author: JBM
+# Change Date: 2006-01-17
+# Change: added order by in select
+#####################
+
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
connection master;
@@ -30,12 +36,12 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-create table t1 (n int);
+create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
sync_slave_with_master;
-select * from t1;
+connection slave;
+SELECT * FROM t1 ORDER BY n;
connection master;
+SELECT * FROM t1 ORDER BY n;
drop table t1;
sync_slave_with_master;
-
-# End of 4.1 tests
--- 1.27.4.1/mysql-test/t/rpl_log.test 2006-10-19 17:39:19 +02:00
+++ 1.40/mysql-test/extra/rpl_tests/rpl_log.test 2006-10-19 17:39:19 +02:00
@@ -1,4 +1,5 @@
-source include/master-slave.inc;
+# Requires statement logging
+-- source include/master-slave.inc
# Clean up old slave's binlogs.
# The slave is started with --log-slave-updates
@@ -29,18 +30,25 @@
connection master;
reset master;
-create table t1(n int not null auto_increment primary key);
+eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
insert into t1 values (NULL);
drop table t1;
-create table t1 (word char(20) not null);
+eval create table t1 (word char(20) not null)ENGINE=$engine_type;
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
select count(*) from t1;
-drop table t1;
--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events;
-show binlog events from 98 limit 1;
-show binlog events from 98 limit 2;
-show binlog events from 98 limit 2,1;
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
+show binlog events from 102 limit 1;
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
+show binlog events from 102 limit 2;
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
+show binlog events from 102 limit 2,1;
flush logs;
# We need an extra update before doing save_master_pos.
@@ -59,8 +67,7 @@
# To make it predictable, we do a useless update now, but which has the
# interest of making the slave catch both rotate events.
-create table t5 (a int);
-drop table t5;
+eval create table t3 (a int)ENGINE=$engine_type;
# Sync slave and force it to start on another binary log
@@ -70,6 +77,8 @@
# to go into the relay log (the master always sends a fake one when replication
# starts).
start slave;
+let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%';
+--source include/wait_slave_status.inc
sync_with_master;
flush logs;
stop slave;
@@ -77,12 +86,15 @@
# Create some entries for second log
-create table t1 (n int);
-insert into t1 values (1);
-drop table t1;
+eval create table t2 (n int)ENGINE=$engine_type;
+insert into t2 values (1);
--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events;
--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events in 'master-bin.000002';
show binary logs;
save_master_pos;
@@ -91,11 +103,15 @@
sync_with_master;
show binary logs;
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events in 'slave-bin.000001' from 4;
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events in 'slave-bin.000002' from 4;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
show slave status;
# Need to recode the following
@@ -109,6 +125,12 @@
--error 1220
show binlog events in 'slave-bin.000005' from 4;
+# The table drops caused Cluster Replication wrapper to fail as event ID would never be the same.# Moving drops here.
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
#
# Bug #6880: LAST_INSERT_ID() within a statement
#
@@ -119,9 +141,11 @@
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
--replace_result $VERSION VERSION
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
show binlog events;
select * from t1;
drop table t1;
# End of 4.1 tests
-# Adding comment for force manual merge 5.0 -> wl1012: Delete me
+
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2324) | msvensson | 19 Oct |