summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-08-01 15:31:20 +0500
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-08-01 15:31:20 +0500
commitd4ba395aa6a61ed9c25838aec409270429db281b (patch)
treedab728c3f27061a6f6225499edc46f884915bc46 /mysql-test
parent06cffaabd1ae2c054599ec7516c5b6bc94c0c609 (diff)
parentf87acb594a15b415b58a3053e76bfd1b27a6d594 (diff)
downloadmariadb-git-d4ba395aa6a61ed9c25838aec409270429db281b.tar.gz
Merge mysql.com:/home/ram/work/b29928.new/b29928.new.5.0
into mysql.com:/home/ram/work/b29928.new/b29928.new.5.1 mysql-test/r/mysqlbinlog.result: Auto merged sql/item_func.cc: Auto merged sql/log_event.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged mysql-test/t/mysqlbinlog.test: manual merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/mysqlbinlog.result7
-rw-r--r--mysql-test/t/mysqlbinlog.test25
2 files changed, 30 insertions, 2 deletions
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index 7a76e45ee10..f10ae4b4df5 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -319,6 +319,13 @@ INSERT INTO t1 VALUES ('0123456789');
flush logs;
DROP TABLE t1;
# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED
+flush logs;
+create table t1(a int);
+insert into t1 values(connection_id());
+flush logs;
+drop table t1;
+1
+drop table t1;
End of 5.0 tests
flush logs;
End of 5.1 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 92f4b34da83..25bd9a402ae 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -219,6 +219,27 @@ flush logs;
DROP TABLE t1;
--exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000012 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g'
+#
+# Bug #29928: incorrect connection_id() restoring from mysqlbinlog out
+#
+flush logs;
+create table t1(a int);
+insert into t1 values(connection_id());
+let $a= `select a from t1`;
+flush logs;
+--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000014 > $MYSQLTEST_VARDIR/tmp/bug29928.sql
+drop table t1;
+connect (con1, localhost, root, , test);
+connection con1;
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug29928.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/bug29928.sql
+let $b= `select a from t1`;
+disconnect con1;
+connection default;
+let $c= `select $a=$b`;
+--echo $c
+drop table t1;
+
--echo End of 5.0 tests
#
@@ -226,7 +247,7 @@ DROP TABLE t1;
#
flush logs;
--error 1
---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000014 >/dev/null 2>/dev/null
---exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000014 >/dev/null 2>/dev/null
+--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null
+--exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000016 >/dev/null 2>/dev/null
--echo End of 5.1 tests