summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-05-18 22:12:06 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-05-18 22:12:06 +0500
commit7786aca7987c1c50e62033883015fc56f9a21f87 (patch)
tree146db858b3661fde37fce7321a97ec9ef9967aa5 /mysql-test
parentd3b455137ee309bd36b81a021bdaa922a9614863 (diff)
parent8b33c41554b1f9ac173a047f55fa0c522f28af35 (diff)
downloadmariadb-git-7786aca7987c1c50e62033883015fc56f9a21f87.tar.gz
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt mysql-test/r/ps.result: Auto merged mysql-test/r/strict.result: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/strict.test: Auto merged sql/item.cc: Auto merged mysql-test/r/sp_trans.result: merging mysql-test/t/sp_trans.test: merging
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp_trans.result20
-rw-r--r--mysql-test/r/strict.result2
-rw-r--r--mysql-test/t/sp_trans.test29
-rw-r--r--mysql-test/t/strict.test2
4 files changed, 51 insertions, 2 deletions
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result
index a0d687e565b..c81183029ca 100644
--- a/mysql-test/r/sp_trans.result
+++ b/mysql-test/r/sp_trans.result
@@ -530,6 +530,26 @@ count(*)
drop table t3, t4|
drop procedure bug14210|
set @@session.max_heap_table_size=default|
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
+CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
+insert into t2 values (1,1)|
+create function bug23333()
+RETURNS int(11)
+DETERMINISTIC
+begin
+insert into t1 values (null);
+select count(*) from t1 into @a;
+return @a;
+end|
+reset master|
+insert into t2 values (bug23333(),1)|
+ERROR 23000: Duplicate entry '1' for key 1
+show binlog events from 98 /* with fixes for #23333 will show there is the query */|
+Log_name Pos Event_type Server_id End_log_pos Info
+select count(*),@a from t1 /* must be 1,1 */|
+count(*) @a
+1 1
+drop table t1, t2|
CREATE DATABASE db_bug7787|
use db_bug7787|
CREATE PROCEDURE p1()
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 3b2fda4248a..c1dccd53035 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -3,7 +3,7 @@ set @@sql_mode='ansi,traditional';
select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (col1 date);
INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29');
INSERT INTO t1 VALUES('0000-10-31');
diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test
index a79f6c7e7e0..8a0265ea4e9 100644
--- a/mysql-test/t/sp_trans.test
+++ b/mysql-test/t/sp_trans.test
@@ -593,6 +593,35 @@ drop table t3|
#
+#
+# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
+# Bug #23333 stored function + non-transac table + transac table =
+# breaks stmt-based binlog
+# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
+#
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
+CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
+
+insert into t2 values (1,1)|
+
+create function bug23333()
+RETURNS int(11)
+DETERMINISTIC
+begin
+ insert into t1 values (null);
+ select count(*) from t1 into @a;
+ return @a;
+end|
+
+reset master|
+--error ER_DUP_ENTRY
+insert into t2 values (bug23333(),1)|
+--replace_column 2 # 5 # 6 #
+show binlog events from 98 /* with fixes for #23333 will show there is the query */|
+select count(*),@a from t1 /* must be 1,1 */|
+drop table t1, t2|
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index 7dd38920b3d..bf49a6a906c 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -7,7 +7,7 @@ set @@sql_mode='ansi,traditional';
select @@sql_mode;
--disable_warnings
-DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t1, t2;
--enable_warnings
# Test INSERT with DATE