Commit 11e90a65 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime

into  station.:/mnt/raid/alik/MySQL/5.1-rt-build

parents 46d7b333 81dff135
......@@ -562,12 +562,6 @@ int __void__;
#define PURIFY_OR_LINT_INIT(var)
#endif
/* Define some useful general macros */
#if !defined(max)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
......@@ -1508,4 +1502,10 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
/* Length of decimal number represented by INT64. */
#define MY_INT64_NUM_DECIMAL_DIGITS 21
/* Define some useful general macros (should be done after all headers). */
#if !defined(max)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#endif /* my_global_h */
......@@ -34,17 +34,18 @@ stop slave;
#
########################################################################
#
# Check that binlog is filled properly.
#
# Connection: slave
CREATE DATABASE mysqltest1;
CREATE TABLE t1(c INT);
RESET MASTER;
RESET SLAVE;
START SLAVE;
# Connection: master
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(1)';
CREATE DATABASE mysqltest1;
CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32));
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)';
EXECUTE stmt_d_1;
......@@ -52,18 +53,28 @@ use mysqltest1;
EXECUTE stmt_d_1;
FLUSH LOGS;
SHOW BINLOG EVENTS FROM 106;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 106 Query 2 193 use `test`; INSERT INTO t1 VALUES(1)
slave-bin.000001 193 Query 2 280 use `test`; INSERT INTO t1 VALUES(1)
slave-bin.000001 280 Rotate 2 323 slave-bin.000002;pos=4
# Connection: slave
SELECT * FROM t1;
db_name db_col_name
test latin1_swedish_ci
test latin1_swedish_ci
# Connection: master
DROP DATABASE mysqltest1;
use test;
# Connection: slave
STOP SLAVE;
########################################################################
reset master;
reset slave;
......@@ -73,20 +73,24 @@ stop slave;
###############################################################################
--echo
--echo #
--echo # Check that binlog is filled properly.
--echo #
--echo # Connection: slave
--echo
--connection slave
--echo
CREATE DATABASE mysqltest1;
CREATE TABLE t1(c INT);
START SLAVE;
--echo
RESET MASTER;
RESET SLAVE;
--echo # Connection: master
--echo
--connection master
--echo
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(1)';
CREATE DATABASE mysqltest1;
CREATE TABLE t1(db_name CHAR(32), db_col_name CHAR(32));
--echo
PREPARE stmt_d_1 FROM 'INSERT INTO t1 VALUES(DATABASE(), @@collation_database)';
--echo
EXECUTE stmt_d_1;
......@@ -98,10 +102,21 @@ use mysqltest1;
EXECUTE stmt_d_1;
--echo
FLUSH LOGS;
--save_master_pos
--echo
--echo # Connection: slave
--echo
--connection slave
--sync_with_master
--echo
SHOW BINLOG EVENTS FROM 106;
SELECT * FROM t1;
--echo
--echo # Connection: master
--echo
--connection master
--echo
DROP DATABASE mysqltest1;
......@@ -109,6 +124,18 @@ DROP DATABASE mysqltest1;
--echo
use test;
--echo
--save_master_pos
--echo
--echo # Connection: slave
--echo
--connection slave
--sync_with_master
--echo
STOP SLAVE;
--echo
--echo ########################################################################
......
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