Commit b437a086 authored by Georgi Kodinov's avatar Georgi Kodinov
Browse files

merged 5.1-5.1.29-rc -> 5.1-bugteam

parents 7fa30b28 80505cc9
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -125,6 +125,45 @@ drop table t1;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show binlog events from 0;


#
# Bug #39182: Binary log producing incompatible character set query from 
# stored procedure.
#
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DELIMITER //;

CREATE PROCEDURE p1()
BEGIN
  DECLARE s1 VARCHAR(255);
  SET s1= "test";
  CREATE TEMPORARY TABLE tmp1
    SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
  SELECT 
    COLLATION(NAME_CONST('s1', _utf8'test')) c1,
    COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
    COLLATION(s1) c3,
    COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
    COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
    COERCIBILITY(s1) d3;
  DROP TEMPORARY TABLE tmp1;
END//

DELIMITER ;//

CALL p1();
source include/show_binlog_events.inc;

DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;

--echo End of 5.0 tests

# Test of a too big SET INSERT_ID: see if the truncated value goes
+0 −9
Original line number Diff line number Diff line
@@ -139,15 +139,6 @@ drop table t1,t2,t3;
#             table
#
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
# NOTE: After exchanging open_ltable() by open_and_lock_tables() in
# handle_delayed_insert() to fix problems with MERGE tables (Bug#26379),
# problems with INSERT DELAYED and BLACKHOLE popped up. open_ltable()
# does not check if the binlogging capabilities of the statement and the
# table match. So the below used to succeed. But since INSERT DELAYED
# switches to row-based logging in mixed-mode and BLACKHOLE cannot do
# row-based logging, it could not really work. Until this problem is
# correctly fixed, we have that error here.
--error ER_BINLOG_LOGGING_IMPOSSIBLE
INSERT DELAYED INTO t1 VALUES(1);
DROP TABLE t1;

+32 −0
Original line number Diff line number Diff line
# Check replication of one statement assuming that the engine on the
# slave is a blackhole engine.

# Input:
# $statement    Statement to evaluate, it is assumed to change t1

# 1. Evaluate statement on master, it is assumed to change t1
# 2. Wait for statement to be processed on slave
# 3. SELECT from table t1 to see what was written
# 4. Compare position on slave before executing statement and after
#    executing statement. If difference is >0, then something was
#    written to the binary log on the slave.

connection slave;
let $before = query_get_value("SHOW MASTER STATUS", Position, 1);

--echo [on master]
connection master;
eval $statement;

--echo [on slave]
sync_slave_with_master;
--echo # Expect 0
SELECT COUNT(*) FROM t1;
let $after = query_get_value("SHOW MASTER STATUS", Position, 1);
let $something_written = `select $after - $before != 0`;
if ($something_written) {
  --echo >>> Something was written to binary log <<<
}
if (!$something_written) {
  --echo >>> Nothing was written to binary log <<<
}
+1 −0
Original line number Diff line number Diff line
@@ -1256,6 +1256,7 @@ connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
SET SESSION AUTOCOMMIT = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
set binlog_format=mixed;
--echo # Switch to connection con1
connection con1;

+1 −1
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ sub mtr_report_stats ($) {
		/Slave: According to the master's version/ or
		/Slave: Column [0-9]* type mismatch/ or
		/Slave: Error .* doesn't exist/ or
		/Slave: Error .*Deadlock found/ or
		/Slave: Deadlock found/ or
		/Slave: Error .*Unknown table/ or
		/Slave: Error in Write_rows event: / or
		/Slave: Field .* of table .* has no default value/ or
Loading