summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorcmiller@zippy.(none) <>2006-06-21 11:07:34 -0400
committercmiller@zippy.(none) <>2006-06-21 11:07:34 -0400
commit1dd674ef8a28d0b5ba3bd684caf405a832ed2aa7 (patch)
treef5ac536a2d4806c54d6b6e1e570ce579a4e2df6b /mysql-test
parentffd8ea244d0246a43c4657ba7767cf9bcaf66e6a (diff)
parentdeca07bdccd91598e060b6c3f093eefca95d66da (diff)
downloadmariadb-git-1dd674ef8a28d0b5ba3bd684caf405a832ed2aa7.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/bdb.result34
-rw-r--r--mysql-test/r/mysqldump.result9
-rw-r--r--mysql-test/t/bdb.test35
-rw-r--r--mysql-test/t/mysqldump.test12
4 files changed, 90 insertions, 0 deletions
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
index af6319afe99..588644a6c66 100644
--- a/mysql-test/r/bdb.result
+++ b/mysql-test/r/bdb.result
@@ -1928,4 +1928,38 @@ create table t1 (a int) engine=bdb;
commit;
alter table t1 add primary key(a);
drop table t1;
+set autocommit=1;
+reset master;
+create table bug16206 (a int) engine= blackhole;
+insert into bug16206 values(1);
+start transaction;
+insert into bug16206 values(2);
+commit;
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
+f n Query 1 n use `test`; create table bug16206 (a int) engine= blackhole
+f n Query 1 n use `test`; insert into bug16206 values(1)
+f n Query 1 n use `test`; insert into bug16206 values(2)
+drop table bug16206;
+reset master;
+create table bug16206 (a int) engine= bdb;
+insert into bug16206 values(0);
+insert into bug16206 values(1);
+start transaction;
+insert into bug16206 values(2);
+commit;
+insert into bug16206 values(3);
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
+f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
+f n Query 1 n use `test`; insert into bug16206 values(0)
+f n Query 1 n use `test`; insert into bug16206 values(1)
+f n Query 1 n use `test`; BEGIN
+f n Query 1 n use `test`; insert into bug16206 values(2)
+f n Query 1 n use `test`; COMMIT
+f n Query 1 n use `test`; insert into bug16206 values(3)
+drop table bug16206;
+set autocommit=0;
End of 5.0 tests
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index e496e1ef35d..acb9b9af276 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -2757,6 +2757,15 @@ p CREATE DEFINER=`root`@`localhost` PROCEDURE `p`()
select 42
drop function f;
drop procedure p;
+create table t1 ( id serial );
+create view v1 as select * from t1;
+drop table t1;
+mysqldump {
+
+-- failed on view `v1`: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`id` AS `id` from `t1`
+
+} mysqldump
+drop view v1;
create database mysqldump_test_db;
use mysqldump_test_db;
create table t1 (id int);
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test
index d017d91bfb1..d2e3ca5f36e 100644
--- a/mysql-test/t/bdb.test
+++ b/mysql-test/t/bdb.test
@@ -1019,4 +1019,39 @@ commit;
alter table t1 add primary key(a);
drop table t1;
+
+#
+# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
+#
+set autocommit=1;
+
+let $VERSION=`select version()`;
+
+reset master;
+create table bug16206 (a int) engine= blackhole;
+insert into bug16206 values(1);
+start transaction;
+insert into bug16206 values(2);
+commit;
+--replace_result $VERSION VERSION
+--replace_column 1 f 2 n 5 n
+show binlog events;
+drop table bug16206;
+
+reset master;
+create table bug16206 (a int) engine= bdb;
+insert into bug16206 values(0);
+insert into bug16206 values(1);
+start transaction;
+insert into bug16206 values(2);
+commit;
+insert into bug16206 values(3);
+--replace_result $VERSION VERSION
+--replace_column 1 f 2 n 5 n
+show binlog events;
+drop table bug16206;
+
+set autocommit=0;
+
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index ab865594d42..4749141f7fe 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1162,6 +1162,18 @@ drop function f;
drop procedure p;
#
+# Bug #17371 Unable to dump a schema with invalid views
+#
+#
+create table t1 ( id serial );
+create view v1 as select * from t1;
+drop table t1;
+# mysqldump gets 1356 from server, but gives us 2
+--echo mysqldump {
+--error 2
+--exec $MYSQL_DUMP --force -N --compact --skip-comments test
+--echo } mysqldump
+drop view v1;
# BUG#17201 Spurious 'DROP DATABASE' in output,
# also confusion between tables and views.
# Example code from Markus Popp