mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl sql/handler.cc: Auto merged
This commit is contained in:
commit
c7db565fc8
56 changed files with 904 additions and 413 deletions
|
@ -404,8 +404,10 @@ DROP TABLE t4;
|
|||
|
||||
SET collation_connection='cp932_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='cp932_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#29333 myisam corruption with
|
||||
|
|
|
@ -342,5 +342,6 @@ SHOW CREATE TABLE t1;
|
|||
--echo --- Do Cleanup ---
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
# End of 5.1 test case
|
||||
|
|
40
mysql-test/include/ctype_german.inc
Normal file
40
mysql-test/include/ctype_german.inc
Normal file
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# Bug #27877 incorrect german order in utf8_general_ci
|
||||
#
|
||||
# Testing if "SHARP S" is equal to "S",
|
||||
# like in latin1_german1_ci, utf8_general_ci, ucs2_general_ci
|
||||
# Or if "SHART S" is equal to "SS",
|
||||
# like in latin1_german2_ci, utf8_unicode_ci, ucs2_unicode_ci
|
||||
#
|
||||
# Also testing A-uml, O-uml, U-uml
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Create a table with a varchar(x) column,
|
||||
# using current values of
|
||||
# @@character_set_connection and @@collation_connection.
|
||||
#
|
||||
|
||||
create table t1 as select repeat(' ', 64) as s1;
|
||||
select collation(s1) from t1;
|
||||
delete from t1;
|
||||
|
||||
#
|
||||
# Populate data
|
||||
#
|
||||
|
||||
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
|
||||
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
|
||||
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
|
||||
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
|
||||
|
||||
#
|
||||
# Check order
|
||||
#
|
||||
select s1, hex(s1) from t1 order by s1, binary s1;
|
||||
select group_concat(s1 order by binary s1) from t1 group by s1;
|
||||
drop table t1;
|
25
mysql-test/include/ctype_like_range_f1f2.inc
Normal file
25
mysql-test/include/ctype_like_range_f1f2.inc
Normal file
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Bug#32510 LIKE search fails with indexed 'eucjpms' and 'ujis' char column
|
||||
#
|
||||
# Testing my_ctype_like_range_xxx
|
||||
# (used in LIKE optimization for an indexed column)
|
||||
#
|
||||
|
||||
# Create table using @@character_set_connection and @@collation_connection
|
||||
# for the string columns.
|
||||
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
|
||||
# Check pattern (important for ucs2, utf16, utf32)
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
|
||||
--echo 3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
DROP TABLE t1;
|
|
@ -383,6 +383,11 @@ sub mtr_report_stats ($) {
|
|||
(/Failed to write to mysql\.\w+_log/
|
||||
)) or
|
||||
|
||||
# rpl_bug33931 has deliberate failures
|
||||
($testname eq 'rpl.rpl_bug33931' and
|
||||
(/Failed during slave.*thread initialization/
|
||||
)) or
|
||||
|
||||
# rpl_temporary has an error on slave that can be ignored
|
||||
($testname eq 'rpl.rpl_temporary' and
|
||||
(/Slave: Can\'t find record in \'user\' Error_code: 1032/
|
||||
|
|
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='big5_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES big5;
|
||||
CREATE TABLE t1 (a text) character set big5;
|
||||
INSERT INTO t1 VALUES ('ùØ');
|
||||
|
|
|
@ -9809,6 +9809,23 @@ eucjpms_japanese_ci 6109
|
|||
eucjpms_japanese_ci 61
|
||||
eucjpms_japanese_ci 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='eucjpms_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -9819,6 +9836,23 @@ eucjpms_bin 6109
|
|||
eucjpms_bin 61
|
||||
eucjpms_bin 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
|
||||
hex(convert(_eucjpms 0xA5FE41 using ucs2))
|
||||
003F0041
|
||||
|
|
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='euckr_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES euckr;
|
||||
CREATE TABLE t1 (a text) character set euckr;
|
||||
INSERT INTO t1 VALUES (0xA2E6),(0xFEF7);
|
||||
|
|
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='gb2312_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES gb2312;
|
||||
CREATE TABLE t1 (a text) character set gb2312;
|
||||
INSERT INTO t1 VALUES (0xA2A1),(0xD7FE);
|
||||
|
|
|
@ -124,6 +124,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='gbk_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -174,6 +191,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES gbk;
|
||||
CREATE TABLE t1 (a text) character set gbk;
|
||||
INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
|
||||
|
|
|
@ -326,6 +326,41 @@ latin1_german2_ci 6109
|
|||
latin1_german2_ci 61
|
||||
latin1_german2_ci 6120
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 as select repeat(' ', 64) as s1;
|
||||
select collation(s1) from t1;
|
||||
collation(s1)
|
||||
latin1_german2_ci
|
||||
delete from t1;
|
||||
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
|
||||
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
|
||||
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
|
||||
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
|
||||
select s1, hex(s1) from t1 order by s1, binary s1;
|
||||
s1 hex(s1)
|
||||
a 61
|
||||
ae 6165
|
||||
ä E4
|
||||
o 6F
|
||||
oe 6F65
|
||||
ö F6
|
||||
s 73
|
||||
ss 7373
|
||||
ß DF
|
||||
u 75
|
||||
ue 7565
|
||||
ü FC
|
||||
select group_concat(s1 order by binary s1) from t1 group by s1;
|
||||
group_concat(s1 order by binary s1)
|
||||
a
|
||||
ae,ä
|
||||
o
|
||||
oe,ö
|
||||
s
|
||||
ss,ß
|
||||
u
|
||||
ue,ü
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
CREATE TABLE t1 (
|
||||
col1 varchar(255) NOT NULL default ''
|
||||
|
|
|
@ -121,6 +121,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='sjis_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -171,6 +188,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES sjis;
|
||||
SELECT HEX('佐淘 圭') FROM DUAL;
|
||||
HEX('佐淘 圭')
|
||||
|
|
|
@ -2647,6 +2647,41 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 as select repeat(' ', 64) as s1;
|
||||
select collation(s1) from t1;
|
||||
collation(s1)
|
||||
utf8_unicode_ci
|
||||
delete from t1;
|
||||
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
|
||||
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
|
||||
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
|
||||
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
|
||||
select s1, hex(s1) from t1 order by s1, binary s1;
|
||||
s1 hex(s1)
|
||||
a 61
|
||||
ä C3A4
|
||||
ae 6165
|
||||
o 6F
|
||||
ö C3B6
|
||||
oe 6F65
|
||||
s 73
|
||||
ss 7373
|
||||
ß C39F
|
||||
u 75
|
||||
ü C3BC
|
||||
ue 7565
|
||||
select group_concat(s1 order by binary s1) from t1 group by s1;
|
||||
group_concat(s1 order by binary s1)
|
||||
a,ä
|
||||
ae
|
||||
o,ö
|
||||
oe
|
||||
s
|
||||
ss,ß
|
||||
u,ü
|
||||
ue
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id int, a varchar(30) character set utf8);
|
||||
INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131);
|
||||
INSERT INTO t1 VALUES (3, _ucs2 0x00690069), (4, _ucs2 0x01300049);
|
||||
|
@ -2815,5 +2850,22 @@ NULL
|
|||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
set names utf8;
|
||||
End for 5.0 tests
|
||||
|
|
|
@ -613,6 +613,58 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 as select repeat(' ', 64) as s1;
|
||||
select collation(s1) from t1;
|
||||
collation(s1)
|
||||
ucs2_general_ci
|
||||
delete from t1;
|
||||
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
|
||||
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
|
||||
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
|
||||
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
|
||||
select s1, hex(s1) from t1 order by s1, binary s1;
|
||||
s1 hex(s1)
|
||||
a 0061
|
||||
ä 00E4
|
||||
ae 00610065
|
||||
o 006F
|
||||
ö 00F6
|
||||
oe 006F0065
|
||||
s 0073
|
||||
ß 00DF
|
||||
ss 00730073
|
||||
u 0075
|
||||
ü 00FC
|
||||
ue 00750065
|
||||
select group_concat(s1 order by binary s1) from t1 group by s1;
|
||||
group_concat(s1 order by binary s1)
|
||||
a,ä
|
||||
ae
|
||||
o,ö
|
||||
oe
|
||||
s,ß
|
||||
ss
|
||||
u,ü
|
||||
ue
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
|
@ -642,6 +694,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(substr(_ucs2 0x00e400e50068,1));
|
||||
hex(substr(_ucs2 0x00e400e50068,1))
|
||||
00E400E50068
|
||||
|
|
|
@ -2257,6 +2257,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='ujis_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -2307,6 +2324,23 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
select hex(convert(_ujis 0xA5FE41 using ucs2));
|
||||
hex(convert(_ujis 0xA5FE41 using ucs2))
|
||||
003F0041
|
||||
|
|
|
@ -939,6 +939,41 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
|||
c2h
|
||||
ab_def
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 as select repeat(' ', 64) as s1;
|
||||
select collation(s1) from t1;
|
||||
collation(s1)
|
||||
utf8_general_ci
|
||||
delete from t1;
|
||||
insert into t1 values ('a'),('ae'),(_latin1 0xE4);
|
||||
insert into t1 values ('o'),('oe'),(_latin1 0xF6);
|
||||
insert into t1 values ('s'),('ss'),(_latin1 0xDF);
|
||||
insert into t1 values ('u'),('ue'),(_latin1 0xFC);
|
||||
select s1, hex(s1) from t1 order by s1, binary s1;
|
||||
s1 hex(s1)
|
||||
a 61
|
||||
ä C3A4
|
||||
ae 6165
|
||||
o 6F
|
||||
ö C3B6
|
||||
oe 6F65
|
||||
s 73
|
||||
ß C39F
|
||||
ss 7373
|
||||
u 75
|
||||
ü C3BC
|
||||
ue 7565
|
||||
select group_concat(s1 order by binary s1) from t1 group by s1;
|
||||
group_concat(s1 order by binary s1)
|
||||
a,ä
|
||||
ae
|
||||
o,ö
|
||||
oe
|
||||
s,ß
|
||||
ss
|
||||
u,ü
|
||||
ue
|
||||
drop table t1;
|
||||
SET collation_connection='utf8_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
|
|
@ -627,7 +627,7 @@ a b
|
|||
4 4
|
||||
show master status /* there must be the UPDATE query event */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 336
|
||||
master-bin.000001 197
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
insert into t1 values (1,2),(3,4),(4,4);
|
||||
|
@ -637,7 +637,7 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
|||
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
||||
show master status /* there must be the UPDATE query event */;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 351
|
||||
master-bin.000001 212
|
||||
drop table t1, t2;
|
||||
set @@session.binlog_format= @sav_binlog_format;
|
||||
drop table if exists t1, t2, t3;
|
||||
|
|
|
@ -3870,181 +3870,6 @@ UNLOCK TABLES;
|
|||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
create table t1 (a text , b text);
|
||||
create table t2 (a text , b text);
|
||||
insert t1 values ("Duck, Duck", "goose");
|
||||
insert t1 values ("Duck, Duck", "pidgeon");
|
||||
insert t2 values ("We the people", "in order to perform");
|
||||
insert t2 values ("a more perfect", "union");
|
||||
select * from t1;
|
||||
a b
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
select * from t2;
|
||||
a b
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
test.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
|
||||
test.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
|
||||
select * from t1;
|
||||
a b
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
select * from t2;
|
||||
a b
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
create table words(a varchar(255));
|
||||
create table words2(b varchar(255));
|
||||
select * from t1;
|
||||
a b
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
Duck, Duck goose
|
||||
Duck, Duck pidgeon
|
||||
select * from t2;
|
||||
a b
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
We the people in order to perform
|
||||
a more perfect union
|
||||
select * from words;
|
||||
a
|
||||
Aarhus
|
||||
Aaron
|
||||
Ababa
|
||||
aback
|
||||
abaft
|
||||
abandon
|
||||
abandoned
|
||||
abandoning
|
||||
abandonment
|
||||
abandons
|
||||
Aarhus
|
||||
Aaron
|
||||
Ababa
|
||||
aback
|
||||
abaft
|
||||
abandon
|
||||
abandoned
|
||||
abandoning
|
||||
abandonment
|
||||
abandons
|
||||
abase
|
||||
abased
|
||||
abasement
|
||||
abasements
|
||||
abases
|
||||
abash
|
||||
abashed
|
||||
abashes
|
||||
abashing
|
||||
abasing
|
||||
abate
|
||||
abated
|
||||
abatement
|
||||
abatements
|
||||
abater
|
||||
abates
|
||||
abating
|
||||
Abba
|
||||
abbe
|
||||
abbey
|
||||
abbeys
|
||||
abbot
|
||||
abbots
|
||||
Abbott
|
||||
abbreviate
|
||||
abbreviated
|
||||
abbreviates
|
||||
abbreviating
|
||||
abbreviation
|
||||
abbreviations
|
||||
Abby
|
||||
abdomen
|
||||
abdomens
|
||||
abdominal
|
||||
abduct
|
||||
abducted
|
||||
abduction
|
||||
abductions
|
||||
abductor
|
||||
abductors
|
||||
abducts
|
||||
Abe
|
||||
abed
|
||||
Abel
|
||||
Abelian
|
||||
Abelson
|
||||
Aberdeen
|
||||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
select * from words2;
|
||||
b
|
||||
abase
|
||||
abased
|
||||
abasement
|
||||
abasements
|
||||
abases
|
||||
abash
|
||||
abashed
|
||||
abashes
|
||||
abashing
|
||||
abasing
|
||||
abate
|
||||
abated
|
||||
abatement
|
||||
abatements
|
||||
abater
|
||||
abates
|
||||
abating
|
||||
Abba
|
||||
abbe
|
||||
abbey
|
||||
abbeys
|
||||
abbot
|
||||
abbots
|
||||
Abbott
|
||||
abbreviate
|
||||
abbreviated
|
||||
abbreviates
|
||||
abbreviating
|
||||
abbreviation
|
||||
abbreviations
|
||||
Abby
|
||||
abdomen
|
||||
abdomens
|
||||
abdominal
|
||||
abduct
|
||||
abducted
|
||||
abduction
|
||||
abductions
|
||||
abductor
|
||||
abductors
|
||||
abducts
|
||||
Abe
|
||||
abed
|
||||
Abel
|
||||
Abelian
|
||||
Abelson
|
||||
Aberdeen
|
||||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
drop table words;
|
||||
mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: words
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table words2;
|
||||
#
|
||||
# BUG# 16853: mysqldump doesn't show events
|
||||
#
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
---- Init ----
|
||||
set @my_slave_net_timeout =@@global.slave_net_timeout;
|
||||
---- Test ----
|
||||
set global slave_net_timeout=100;
|
||||
set global sql_slave_skip_counter=100;
|
||||
show variables like 'slave_compressed_protocol';
|
||||
|
@ -16,4 +12,6 @@ slave_load_tmpdir SLAVE_LOAD_TMPDIR
|
|||
show variables like 'slave_skip_errors';
|
||||
Variable_name Value
|
||||
slave_skip_errors 3,100,137,643,1752
|
||||
---- Clean Up ----
|
||||
set global slave_net_timeout=default;
|
||||
set global sql_slave_skip_counter= 0;
|
|
@ -11399,6 +11399,23 @@ cp932_japanese_ci 6109
|
|||
cp932_japanese_ci 61
|
||||
cp932_japanese_ci 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='cp932_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -11409,6 +11426,23 @@ cp932_bin 6109
|
|||
cp932_bin 61
|
||||
cp932_bin 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
create table t2 (a char(1));
|
||||
insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
|
||||
insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
|
||||
|
|
|
@ -11399,6 +11399,23 @@ cp932_japanese_ci 6109
|
|||
cp932_japanese_ci 61
|
||||
cp932_japanese_ci 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
SET collation_connection='cp932_bin';
|
||||
create table t1 select repeat('a',4000) a;
|
||||
delete from t1;
|
||||
|
@ -11409,6 +11426,23 @@ cp932_bin 6109
|
|||
cp932_bin 61
|
||||
cp932_bin 6120
|
||||
drop table t1;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
|
||||
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
|
||||
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
||||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
||||
hex(concat(repeat(0xF1F2, 10), '%'))
|
||||
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
|
||||
3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
a hex(b) c
|
||||
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
|
||||
DROP TABLE t1;
|
||||
create table t2 (a char(1));
|
||||
insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
|
||||
insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
|
||||
|
|
|
@ -13,3 +13,4 @@ a b
|
|||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
3 -3
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -18,9 +18,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2
|
|||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f
|
||||
|
|
43
mysql-test/suite/rpl/r/rpl_bug33931.result
Normal file
43
mysql-test/suite/rpl/r/rpl_bug33931.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
reset master;
|
||||
stop slave;
|
||||
reset slave;
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
|
@ -4,10 +4,11 @@ reset master;
|
|||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (n int);
|
||||
reset master;
|
||||
stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
start slave;
|
||||
*** must be having the replicate-same-server-id IO thread error ***
|
||||
show slave status;
|
||||
Slave_IO_State
|
||||
Master_Host 127.0.0.1
|
||||
|
@ -20,15 +21,15 @@ Relay_Log_File slave-relay-bin.000001
|
|||
Relay_Log_Pos 4
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Slave_SQL_Running #
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table #
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Last_Errno #
|
||||
Last_Error #
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space 106
|
||||
|
@ -43,13 +44,7 @@ Master_SSL_Cipher
|
|||
Master_SSL_Key
|
||||
Seconds_Behind_Master NULL
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno #
|
||||
Last_IO_Error #
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
show status like "slave_running";
|
||||
Variable_name Value
|
||||
Slave_running OFF
|
||||
drop table t1;
|
||||
Last_IO_Errno 1593
|
||||
Last_IO_Error Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
|
||||
Last_SQL_Errno #
|
||||
Last_SQL_Error #
|
||||
|
|
1
mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--loose-debug=d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init
|
37
mysql-test/suite/rpl/t/rpl_bug33931.test
Normal file
37
mysql-test/suite/rpl/t/rpl_bug33931.test
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Test for
|
||||
# Bug #33931 assertion at write_ignored_events_info_to_relay_log if init_slave_thread() fails
|
||||
# Bug #33932 assertion at handle_slave_sql if init_slave_thread() fails
|
||||
|
||||
source include/have_debug.inc;
|
||||
source include/have_log_bin.inc;
|
||||
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
||||
|
||||
|
||||
connection master;
|
||||
reset master;
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
stop slave;
|
||||
--enable_warnings
|
||||
reset slave;
|
||||
start slave;
|
||||
|
||||
connection master;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
|
||||
#
|
||||
# slave is going to stop because of emulated failures
|
||||
# but there won't be any crashes nor asserts hit.
|
||||
#
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
||||
query_vertical show slave status;
|
||||
|
||||
# no clean-up is needed
|
||||
|
|
@ -6,21 +6,20 @@
|
|||
|
||||
source include/master-slave.inc;
|
||||
connection slave;
|
||||
create table t1 (n int);
|
||||
reset master;
|
||||
|
||||
# replicate ourselves
|
||||
stop slave;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval change master to master_port=$SLAVE_MYPORT;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 16 # 18 # 35 # 36 #
|
||||
query_vertical show slave status;
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
# can't MASTER_POS_WAIT(), it does not work in this weird setup
|
||||
# (when slave is its own master without --replicate-same-server-id)
|
||||
sleep 2; # enough time for the event to be replicated (it should not)
|
||||
show status like "slave_running";
|
||||
drop table t1;
|
||||
|
||||
--echo *** must be having the replicate-same-server-id IO thread error ***
|
||||
|
||||
source include/wait_for_slave_io_to_stop.inc;
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 12 # 16 # 19 # 20 # 18 # 37 # 38 #
|
||||
query_vertical show slave status;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--slave-skip-errors=3,100,137,643,1752
|
|
@ -16,10 +16,12 @@ SET collation_connection='big5_chinese_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='big5_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#9357: TEXT columns break string with special word in BIG5 charset.
|
||||
|
|
|
@ -361,9 +361,10 @@ DROP TABLE t1;
|
|||
|
||||
SET collation_connection='eucjpms_japanese_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='eucjpms_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#15375: Unassigned multibyte codes are broken
|
||||
|
|
|
@ -16,10 +16,12 @@ SET collation_connection='euckr_korean_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='euckr_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#15377 Valid multibyte sequences are truncated on INSERT
|
||||
|
|
|
@ -16,10 +16,12 @@ SET collation_connection='gb2312_chinese_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='gb2312_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#15377 Valid multibyte sequences are truncated on INSERT
|
||||
|
|
|
@ -16,10 +16,12 @@ SET collation_connection='gbk_chinese_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='gbk_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#11987 mysql will truncate the text when
|
||||
|
|
|
@ -116,6 +116,7 @@ SELECT FIELD('ue',s1), FIELD('
|
|||
DROP TABLE t1;
|
||||
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_german.inc
|
||||
|
||||
#
|
||||
# Bug#7878 with utf8_general_ci, equals (=) has problem with
|
||||
|
|
|
@ -68,10 +68,12 @@ SET collation_connection='sjis_japanese_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='sjis_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
# Check parsing of string literals in SJIS with multibyte characters that
|
||||
# have an embedded \ in them. (Bug #8303)
|
||||
|
|
|
@ -458,6 +458,7 @@ drop table t1;
|
|||
SET collation_connection='utf8_unicode_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
@ -539,7 +540,8 @@ select * from t1 where a like 'c%';
|
|||
drop table t1;
|
||||
|
||||
set collation_connection=ucs2_unicode_ci;
|
||||
--source include/ctype_regex.inc
|
||||
-- source include/ctype_regex.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
set names utf8;
|
||||
|
||||
-- echo End for 5.0 tests
|
||||
|
|
|
@ -373,10 +373,13 @@ drop table t1;
|
|||
SET collation_connection='ucs2_general_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bug#10344 Some string functions fail for UCS2
|
||||
|
|
|
@ -1147,10 +1147,12 @@ SET collation_connection='ujis_japanese_ci';
|
|||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
SET collation_connection='ujis_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_innodb_like.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_like_range_f1f2.inc
|
||||
|
||||
#
|
||||
# Bugs#15375: Unassigned multibyte codes are broken
|
||||
|
|
|
@ -721,6 +721,7 @@ select hex(soundex(_utf8 0xD091D092D093));
|
|||
SET collation_connection='utf8_general_ci';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
-- source include/ctype_german.inc
|
||||
SET collation_connection='utf8_bin';
|
||||
-- source include/ctype_filesort.inc
|
||||
-- source include/ctype_like_escape.inc
|
||||
|
|
|
@ -1613,6 +1613,10 @@ DROP TABLE t1;
|
|||
#
|
||||
# Added for use-thread option
|
||||
#
|
||||
|
||||
# THIS PART OF THE TEST IS DISABLED UNTIL BUG#32991 IS FIXED
|
||||
if ($bug32991_fixed) {
|
||||
|
||||
create table t1 (a text , b text);
|
||||
create table t2 (a text , b text);
|
||||
insert t1 values ("Duck, Duck", "goose");
|
||||
|
@ -1650,6 +1654,8 @@ drop table t2;
|
|||
|
||||
drop table words2;
|
||||
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # BUG# 16853: mysqldump doesn't show events
|
||||
--echo #
|
||||
|
|
1
mysql-test/t/variables-notembedded-master.opt
Normal file
1
mysql-test/t/variables-notembedded-master.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--loose-slave-skip-errors=3,100,137,643,1752
|
|
@ -1,8 +1,14 @@
|
|||
source include/master-slave.inc;
|
||||
# Tests that variables work correctly (setting and showing). This
|
||||
# test is like the main.variables test, but for variables not
|
||||
# available in embedded mode.
|
||||
|
||||
# Init for rstore of variable values
|
||||
source include/not_embedded.inc;
|
||||
|
||||
--echo ---- Init ----
|
||||
# Backup global variables so they can be restored at end of test.
|
||||
set @my_slave_net_timeout =@@global.slave_net_timeout;
|
||||
|
||||
--echo ---- Test ----
|
||||
set global slave_net_timeout=100;
|
||||
set global sql_slave_skip_counter=100;
|
||||
|
||||
|
@ -16,5 +22,9 @@ show variables like 'slave_load_tmpdir';
|
|||
# that a list of values works correctly
|
||||
show variables like 'slave_skip_errors';
|
||||
|
||||
# Cleanup
|
||||
--echo ---- Clean Up ----
|
||||
|
||||
set global slave_net_timeout=default;
|
||||
# sql_slave_skip_counter is write-only, so we can't save previous
|
||||
# value and restore it here. That's ok, because it's normally 0.
|
||||
set global sql_slave_skip_counter= 0;
|
221
sql/handler.cc
221
sql/handler.cc
|
@ -3843,29 +3843,25 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
|
|||
- table is not mysql.event
|
||||
*/
|
||||
|
||||
/* The Sun compiler cannot instantiate the template below if this is
|
||||
declared static, but it works by putting it into an anonymous
|
||||
namespace. */
|
||||
namespace {
|
||||
bool check_table_binlog_row_based(THD *thd, TABLE *table)
|
||||
static bool check_table_binlog_row_based(THD *thd, TABLE *table)
|
||||
{
|
||||
if (table->s->cached_row_logging_check == -1)
|
||||
{
|
||||
if (table->s->cached_row_logging_check == -1)
|
||||
{
|
||||
int const check(table->s->tmp_table == NO_TMP_TABLE &&
|
||||
binlog_filter->db_ok(table->s->db.str));
|
||||
table->s->cached_row_logging_check= check;
|
||||
}
|
||||
|
||||
DBUG_ASSERT(table->s->cached_row_logging_check == 0 ||
|
||||
table->s->cached_row_logging_check == 1);
|
||||
|
||||
return (thd->current_stmt_binlog_row_based &&
|
||||
table->s->cached_row_logging_check &&
|
||||
(thd->options & OPTION_BIN_LOG) &&
|
||||
mysql_bin_log.is_open());
|
||||
int const check(table->s->tmp_table == NO_TMP_TABLE &&
|
||||
binlog_filter->db_ok(table->s->db.str));
|
||||
table->s->cached_row_logging_check= check;
|
||||
}
|
||||
|
||||
DBUG_ASSERT(table->s->cached_row_logging_check == 0 ||
|
||||
table->s->cached_row_logging_check == 1);
|
||||
|
||||
return (thd->current_stmt_binlog_row_based &&
|
||||
table->s->cached_row_logging_check &&
|
||||
(thd->options & OPTION_BIN_LOG) &&
|
||||
mysql_bin_log.is_open());
|
||||
}
|
||||
|
||||
|
||||
/** @brief
|
||||
Write table maps for all (manually or automatically) locked tables
|
||||
to the binary log.
|
||||
|
@ -3879,7 +3875,7 @@ namespace {
|
|||
that are locked by the thread 'thd'. Either manually locked
|
||||
(stored in THD::locked_tables) and automatically locked (stored
|
||||
in THD::lock) are considered.
|
||||
|
||||
|
||||
RETURN VALUE
|
||||
0 All OK
|
||||
1 Failed to write all table maps
|
||||
|
@ -3888,115 +3884,97 @@ namespace {
|
|||
THD::lock
|
||||
THD::locked_tables
|
||||
*/
|
||||
namespace
|
||||
|
||||
static int write_locked_table_maps(THD *thd)
|
||||
{
|
||||
int write_locked_table_maps(THD *thd)
|
||||
DBUG_ENTER("write_locked_table_maps");
|
||||
DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx thd->locked_tables: 0x%lx "
|
||||
"thd->extra_lock: 0x%lx",
|
||||
(long) thd, (long) thd->lock,
|
||||
(long) thd->locked_tables, (long) thd->extra_lock));
|
||||
|
||||
if (thd->get_binlog_table_maps() == 0)
|
||||
{
|
||||
DBUG_ENTER("write_locked_table_maps");
|
||||
DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx thd->locked_tables: 0x%lx "
|
||||
"thd->extra_lock: 0x%lx",
|
||||
(long) thd, (long) thd->lock,
|
||||
(long) thd->locked_tables, (long) thd->extra_lock));
|
||||
|
||||
if (thd->get_binlog_table_maps() == 0)
|
||||
MYSQL_LOCK *locks[3];
|
||||
locks[0]= thd->extra_lock;
|
||||
locks[1]= thd->lock;
|
||||
locks[2]= thd->locked_tables;
|
||||
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
|
||||
{
|
||||
MYSQL_LOCK *locks[3];
|
||||
locks[0]= thd->extra_lock;
|
||||
locks[1]= thd->lock;
|
||||
locks[2]= thd->locked_tables;
|
||||
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
|
||||
{
|
||||
MYSQL_LOCK const *const lock= locks[i];
|
||||
if (lock == NULL)
|
||||
continue;
|
||||
MYSQL_LOCK const *const lock= locks[i];
|
||||
if (lock == NULL)
|
||||
continue;
|
||||
|
||||
TABLE **const end_ptr= lock->table + lock->table_count;
|
||||
for (TABLE **table_ptr= lock->table ;
|
||||
table_ptr != end_ptr ;
|
||||
++table_ptr)
|
||||
TABLE **const end_ptr= lock->table + lock->table_count;
|
||||
for (TABLE **table_ptr= lock->table ;
|
||||
table_ptr != end_ptr ;
|
||||
++table_ptr)
|
||||
{
|
||||
TABLE *const table= *table_ptr;
|
||||
DBUG_PRINT("info", ("Checking table %s", table->s->table_name.str));
|
||||
if (table->current_lock == F_WRLCK &&
|
||||
check_table_binlog_row_based(thd, table))
|
||||
{
|
||||
TABLE *const table= *table_ptr;
|
||||
DBUG_PRINT("info", ("Checking table %s", table->s->table_name.str));
|
||||
if (table->current_lock == F_WRLCK &&
|
||||
check_table_binlog_row_based(thd, table))
|
||||
{
|
||||
int const has_trans= table->file->has_transactions();
|
||||
int const error= thd->binlog_write_table_map(table, has_trans);
|
||||
/*
|
||||
If an error occurs, it is the responsibility of the caller to
|
||||
roll back the transaction.
|
||||
*/
|
||||
if (unlikely(error))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
int const has_trans= table->file->has_transactions();
|
||||
int const error= thd->binlog_write_table_map(table, has_trans);
|
||||
/*
|
||||
If an error occurs, it is the responsibility of the caller to
|
||||
roll back the transaction.
|
||||
*/
|
||||
if (unlikely(error))
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
template<class RowsEventT> int
|
||||
binlog_log_row(TABLE* table,
|
||||
const uchar *before_record,
|
||||
const uchar *after_record)
|
||||
{
|
||||
if (table->no_replicate)
|
||||
return 0;
|
||||
bool error= 0;
|
||||
THD *const thd= table->in_use;
|
||||
|
||||
if (check_table_binlog_row_based(thd, table))
|
||||
{
|
||||
MY_BITMAP cols;
|
||||
/* Potential buffer on the stack for the bitmap */
|
||||
uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)];
|
||||
uint n_fields= table->s->fields;
|
||||
my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8;
|
||||
|
||||
/*
|
||||
If there are no table maps written to the binary log, this is
|
||||
the first row handled in this statement. In that case, we need
|
||||
to write table maps for all locked tables to the binary log.
|
||||
*/
|
||||
if (likely(!(error= bitmap_init(&cols,
|
||||
use_bitbuf ? bitbuf : NULL,
|
||||
(n_fields + 7) & ~7UL,
|
||||
FALSE))))
|
||||
{
|
||||
bitmap_set_all(&cols);
|
||||
if (likely(!(error= write_locked_table_maps(thd))))
|
||||
{
|
||||
error=
|
||||
RowsEventT::binlog_row_logging_function(thd, table,
|
||||
table->file->
|
||||
has_transactions(),
|
||||
&cols, table->s->fields,
|
||||
before_record,
|
||||
after_record);
|
||||
}
|
||||
if (!use_bitbuf)
|
||||
bitmap_free(&cols);
|
||||
}
|
||||
}
|
||||
return error ? HA_ERR_RBR_LOGGING_FAILED : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Instantiate the versions we need for the above template function,
|
||||
because we have -fno-implicit-template as compiling option.
|
||||
*/
|
||||
|
||||
template int
|
||||
binlog_log_row<Write_rows_log_event>(TABLE *, const uchar *, const uchar *);
|
||||
|
||||
template int
|
||||
binlog_log_row<Delete_rows_log_event>(TABLE *, const uchar *, const uchar *);
|
||||
|
||||
template int
|
||||
binlog_log_row<Update_rows_log_event>(TABLE *, const uchar *, const uchar *);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
typedef bool Log_func(THD*, TABLE*, bool, MY_BITMAP*,
|
||||
uint, const uchar*, const uchar*);
|
||||
|
||||
static int binlog_log_row(TABLE* table,
|
||||
const uchar *before_record,
|
||||
const uchar *after_record,
|
||||
Log_func *log_func)
|
||||
{
|
||||
if (table->no_replicate)
|
||||
return 0;
|
||||
bool error= 0;
|
||||
THD *const thd= table->in_use;
|
||||
|
||||
if (check_table_binlog_row_based(thd, table))
|
||||
{
|
||||
MY_BITMAP cols;
|
||||
/* Potential buffer on the stack for the bitmap */
|
||||
uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)];
|
||||
uint n_fields= table->s->fields;
|
||||
my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8;
|
||||
|
||||
/*
|
||||
If there are no table maps written to the binary log, this is
|
||||
the first row handled in this statement. In that case, we need
|
||||
to write table maps for all locked tables to the binary log.
|
||||
*/
|
||||
if (likely(!(error= bitmap_init(&cols,
|
||||
use_bitbuf ? bitbuf : NULL,
|
||||
(n_fields + 7) & ~7UL,
|
||||
FALSE))))
|
||||
{
|
||||
bitmap_set_all(&cols);
|
||||
if (likely(!(error= write_locked_table_maps(thd))))
|
||||
error= (*log_func)(thd, table, table->file->has_transactions(),
|
||||
&cols, table->s->fields,
|
||||
before_record, after_record);
|
||||
|
||||
if (!use_bitbuf)
|
||||
bitmap_free(&cols);
|
||||
}
|
||||
}
|
||||
return error ? HA_ERR_RBR_LOGGING_FAILED : 0;
|
||||
}
|
||||
|
||||
int handler::ha_external_lock(THD *thd, int lock_type)
|
||||
{
|
||||
DBUG_ENTER("handler::ha_external_lock");
|
||||
|
@ -4043,10 +4021,11 @@ int handler::ha_reset()
|
|||
int handler::ha_write_row(uchar *buf)
|
||||
{
|
||||
int error;
|
||||
Log_func *log_func= Write_rows_log_event::binlog_row_logging_function;
|
||||
DBUG_ENTER("handler::ha_write_row");
|
||||
if (unlikely(error= write_row(buf)))
|
||||
DBUG_RETURN(error);
|
||||
if (unlikely(error= binlog_log_row<Write_rows_log_event>(table, 0, buf)))
|
||||
if (unlikely(error= binlog_log_row(table, 0, buf, log_func)))
|
||||
DBUG_RETURN(error); /* purecov: inspected */
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
@ -4055,6 +4034,7 @@ int handler::ha_write_row(uchar *buf)
|
|||
int handler::ha_update_row(const uchar *old_data, uchar *new_data)
|
||||
{
|
||||
int error;
|
||||
Log_func *log_func= Update_rows_log_event::binlog_row_logging_function;
|
||||
|
||||
/*
|
||||
Some storage engines require that the new record is in record[0]
|
||||
|
@ -4064,7 +4044,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
|
|||
|
||||
if (unlikely(error= update_row(old_data, new_data)))
|
||||
return error;
|
||||
if (unlikely(error= binlog_log_row<Update_rows_log_event>(table, old_data, new_data)))
|
||||
if (unlikely(error= binlog_log_row(table, old_data, new_data, log_func)))
|
||||
return error;
|
||||
return 0;
|
||||
}
|
||||
|
@ -4072,9 +4052,10 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
|
|||
int handler::ha_delete_row(const uchar *buf)
|
||||
{
|
||||
int error;
|
||||
Log_func *log_func= Delete_rows_log_event::binlog_row_logging_function;
|
||||
if (unlikely(error= delete_row(buf)))
|
||||
return error;
|
||||
if (unlikely(error= binlog_log_row<Delete_rows_log_event>(table, buf, 0)))
|
||||
if (unlikely(error= binlog_log_row(table, buf, 0, log_func)))
|
||||
return error;
|
||||
return 0;
|
||||
}
|
||||
|
|
29
sql/log.cc
29
sql/log.cc
|
@ -3403,35 +3403,6 @@ void THD::binlog_set_stmt_begin() {
|
|||
trx_data->before_stmt_pos= pos;
|
||||
}
|
||||
|
||||
int THD::binlog_flush_transaction_cache()
|
||||
{
|
||||
DBUG_ENTER("binlog_flush_transaction_cache");
|
||||
binlog_trx_data *trx_data= (binlog_trx_data*)
|
||||
thd_get_ha_data(this, binlog_hton);
|
||||
DBUG_PRINT("enter", ("trx_data=0x%lu", (ulong) trx_data));
|
||||
if (trx_data)
|
||||
DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%lu",
|
||||
(ulong) trx_data->before_stmt_pos));
|
||||
|
||||
/*
|
||||
Write the transaction cache to the binary log. We don't flush and
|
||||
sync the log file since we don't know if more will be written to
|
||||
it. If the caller want the log file sync:ed, the caller has to do
|
||||
it.
|
||||
|
||||
The transaction data is only reset upon a successful write of the
|
||||
cache to the binary log.
|
||||
*/
|
||||
|
||||
if (trx_data && likely(mysql_bin_log.is_open())) {
|
||||
if (int error= mysql_bin_log.write_cache(&trx_data->trans_log, true, true))
|
||||
DBUG_RETURN(error);
|
||||
trx_data->reset();
|
||||
}
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Write a table map to the binary log.
|
||||
|
|
|
@ -670,18 +670,18 @@ typedef struct st_print_event_info
|
|||
Any @c Log_event saved on disk consists of the following three
|
||||
components.
|
||||
|
||||
* Common-Header
|
||||
* Post-Header
|
||||
* Body
|
||||
- Common-Header
|
||||
- Post-Header
|
||||
- Body
|
||||
|
||||
The Common-Header, documented in the table @ref Table_common_header
|
||||
"below", always has the same form and length within one version of
|
||||
MySQL. Each event type specifies a form and length of the
|
||||
Post-Header common to all events of the type. The Body may be of
|
||||
different form and length even for different events of the same
|
||||
type. The binary formats of Post-Header and Body are documented
|
||||
separately in each subclass. The binary format of Common-Header is
|
||||
as follows.
|
||||
MySQL. Each event type specifies a format and length of the
|
||||
Post-Header. The length of the Common-Header is the same for all
|
||||
events of the same type. The Body may be of different format and
|
||||
length even for different events of the same type. The binary
|
||||
formats of Post-Header and Body are documented separately in each
|
||||
subclass. The binary format of Common-Header is as follows.
|
||||
|
||||
<table>
|
||||
<caption>Common-Header</caption>
|
||||
|
@ -750,8 +750,8 @@ typedef struct st_print_event_info
|
|||
- Some events use a special format for efficient representation of
|
||||
unsigned integers, called Packed Integer. A Packed Integer has the
|
||||
capacity of storing up to 8-byte integers, while small integers
|
||||
still can use 1, 3, or 4 bytes. The first byte indicates how many
|
||||
bytes are used by the integer, according to the following table:
|
||||
still can use 1, 3, or 4 bytes. The value of the first byte
|
||||
determines how to read the number, according to the following table:
|
||||
|
||||
<table>
|
||||
<caption>Format of Packed Integer</caption>
|
||||
|
@ -763,7 +763,7 @@ typedef struct st_print_event_info
|
|||
|
||||
<tr>
|
||||
<td>0-250</td>
|
||||
<td>The first byte is the number (in range 0-250), and no more
|
||||
<td>The first byte is the number (in the range 0-250), and no more
|
||||
bytes are used.</td>
|
||||
</tr>
|
||||
|
||||
|
@ -1174,6 +1174,10 @@ protected:
|
|||
|
||||
@section Query_log_event_binary_format Binary format
|
||||
|
||||
See @ref Log_event_binary_format "Binary format for log events" for
|
||||
a general discussion and introduction to the binary format of binlog
|
||||
events.
|
||||
|
||||
The Post-Header has five components:
|
||||
|
||||
<table>
|
||||
|
@ -1407,7 +1411,7 @@ protected:
|
|||
query "SELECT id, character_set_name, collation_name FROM
|
||||
COLLATIONS".
|
||||
|
||||
Cf. Q_CHARSET_DATABASE_NUMBER below.
|
||||
Cf. Q_CHARSET_DATABASE_CODE below.
|
||||
|
||||
This field is always written.
|
||||
</td>
|
||||
|
@ -1442,7 +1446,7 @@ protected:
|
|||
|
||||
<tr>
|
||||
<td>charset_database_number</td>
|
||||
<td>Q_CHARSET_DATABASE_NUMBER == 8</td>
|
||||
<td>Q_CHARSET_DATABASE_CODE == 8</td>
|
||||
<td>2 byte integer</td>
|
||||
|
||||
<td>The value of the collation_database system variable (in the
|
||||
|
@ -1457,11 +1461,11 @@ protected:
|
|||
|
||||
In newer versions, "CREATE TABLE" has been changed to take the
|
||||
character set from the database of the created table, rather than
|
||||
the database of the current database. This makes a difference
|
||||
when creating a table in another database than the current one.
|
||||
"LOAD DATA INFILE" has not yet changed to do this, but there are
|
||||
plans to eventually do it, and to make collation_database
|
||||
read-only.
|
||||
the character set of the current database. This makes a
|
||||
difference when creating a table in another database than the
|
||||
current one. "LOAD DATA INFILE" has not yet changed to do this,
|
||||
but there are plans to eventually do it, and to make
|
||||
collation_database read-only.
|
||||
|
||||
This field is written if it is not 0.
|
||||
</td>
|
||||
|
@ -1480,7 +1484,7 @@ protected:
|
|||
Q_CATALOG_CODE will never be written by a new master, but can still
|
||||
be understood by a new slave.
|
||||
|
||||
* See Q_CHARSET_DATABASE_NUMBER in the table above.
|
||||
* See Q_CHARSET_DATABASE_CODE in the table above.
|
||||
|
||||
*/
|
||||
class Query_log_event: public Log_event
|
||||
|
@ -1919,6 +1923,8 @@ private:
|
|||
|
||||
@subsection Load_log_event_notes_on_previous_versions Notes on Previous Versions
|
||||
|
||||
This event type is understood by current versions, but only
|
||||
generated by MySQL 3.23 and earlier.
|
||||
*/
|
||||
class Load_log_event: public Log_event
|
||||
{
|
||||
|
|
67
sql/slave.cc
67
sql/slave.cc
|
@ -747,7 +747,11 @@ int init_intvar_from_file(int* var, IO_CACHE* f, int default_val)
|
|||
|
||||
static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
|
||||
{
|
||||
char err_buff[MAX_SLAVE_ERRMSG];
|
||||
const char* errmsg= 0;
|
||||
int err_code= 0;
|
||||
MYSQL_RES *master_res= 0;
|
||||
MYSQL_ROW master_row;
|
||||
DBUG_ENTER("get_master_version_and_clock");
|
||||
|
||||
/*
|
||||
|
@ -758,7 +762,11 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
|
|||
mi->rli.relay_log.description_event_for_queue= 0;
|
||||
|
||||
if (!my_isdigit(&my_charset_bin,*mysql->server_version))
|
||||
{
|
||||
errmsg = "Master reported unrecognized MySQL version";
|
||||
err_code= ER_SLAVE_FATAL_ERROR;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
|
@ -770,6 +778,8 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
|
|||
case '1':
|
||||
case '2':
|
||||
errmsg = "Master reported unrecognized MySQL version";
|
||||
err_code= ER_SLAVE_FATAL_ERROR;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
break;
|
||||
case '3':
|
||||
mi->rli.relay_log.description_event_for_queue= new
|
||||
|
@ -802,26 +812,21 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
|
|||
*/
|
||||
|
||||
if (errmsg)
|
||||
{
|
||||
sql_print_error(errmsg);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
goto err;
|
||||
|
||||
/* as we are here, we tried to allocate the event */
|
||||
if (!mi->rli.relay_log.description_event_for_queue)
|
||||
{
|
||||
mi->report(ERROR_LEVEL, ER_SLAVE_CREATE_EVENT_FAILURE,
|
||||
ER(ER_SLAVE_CREATE_EVENT_FAILURE),
|
||||
"default Format_description_log_event");
|
||||
DBUG_RETURN(1);
|
||||
errmsg= "default Format_description_log_event";
|
||||
err_code= ER_SLAVE_CREATE_EVENT_FAILURE;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
Compare the master and slave's clock. Do not die if master's clock is
|
||||
unavailable (very old master not supporting UNIX_TIMESTAMP()?).
|
||||
*/
|
||||
MYSQL_RES *master_res= 0;
|
||||
MYSQL_ROW master_row;
|
||||
|
||||
if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT UNIX_TIMESTAMP()")) &&
|
||||
(master_res= mysql_store_result(mysql)) &&
|
||||
|
@ -858,11 +863,17 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
|
|||
if ((master_row= mysql_fetch_row(master_res)) &&
|
||||
(::server_id == strtoul(master_row[1], 0, 10)) &&
|
||||
!mi->rli.replicate_same_server_id)
|
||||
{
|
||||
errmsg= "The slave I/O thread stops because master and slave have equal \
|
||||
MySQL server ids; these ids must be different for replication to work (or \
|
||||
the --replicate-same-server-id option must be used on slave but this does \
|
||||
not always make sense; please check the manual before using it).";
|
||||
err_code= ER_SLAVE_FATAL_ERROR;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
}
|
||||
mysql_free_result(master_res);
|
||||
if (errmsg)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -893,10 +904,16 @@ not always make sense; please check the manual before using it).";
|
|||
{
|
||||
if ((master_row= mysql_fetch_row(master_res)) &&
|
||||
strcmp(master_row[0], global_system_variables.collation_server->name))
|
||||
{
|
||||
errmsg= "The slave I/O thread stops because master and slave have \
|
||||
different values for the COLLATION_SERVER global variable. The values must \
|
||||
be equal for replication to work";
|
||||
err_code= ER_SLAVE_FATAL_ERROR;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
}
|
||||
mysql_free_result(master_res);
|
||||
if (errmsg)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -921,16 +938,24 @@ be equal for replication to work";
|
|||
if ((master_row= mysql_fetch_row(master_res)) &&
|
||||
strcmp(master_row[0],
|
||||
global_system_variables.time_zone->get_name()->ptr()))
|
||||
{
|
||||
errmsg= "The slave I/O thread stops because master and slave have \
|
||||
different values for the TIME_ZONE global variable. The values must \
|
||||
be equal for replication to work";
|
||||
err_code= ER_SLAVE_FATAL_ERROR;
|
||||
sprintf(err_buff, ER(err_code), errmsg);
|
||||
}
|
||||
mysql_free_result(master_res);
|
||||
|
||||
if (errmsg)
|
||||
goto err;
|
||||
}
|
||||
|
||||
err:
|
||||
if (errmsg)
|
||||
{
|
||||
sql_print_error(errmsg);
|
||||
DBUG_ASSERT(err_code != 0);
|
||||
mi->report(ERROR_LEVEL, err_code, err_buff);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
@ -1507,6 +1532,9 @@ void set_slave_thread_default_charset(THD* thd, Relay_log_info const *rli)
|
|||
static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
|
||||
{
|
||||
DBUG_ENTER("init_slave_thread");
|
||||
#if !defined(DBUG_OFF)
|
||||
int simulate_error= 0;
|
||||
#endif
|
||||
thd->system_thread = (thd_type == SLAVE_THD_SQL) ?
|
||||
SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO;
|
||||
thd->security_ctx->skip_grants();
|
||||
|
@ -1526,10 +1554,17 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
|
|||
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
|
||||
DBUG_EXECUTE_IF("simulate_io_slave_error_on_init",
|
||||
simulate_error|= (1 << SLAVE_THD_IO););
|
||||
DBUG_EXECUTE_IF("simulate_sql_slave_error_on_init",
|
||||
simulate_error|= (1 << SLAVE_THD_SQL););
|
||||
#if !defined(DBUG_OFF)
|
||||
if (init_thr_lock() || thd->store_globals() || simulate_error & (1<< thd_type))
|
||||
#else
|
||||
if (init_thr_lock() || thd->store_globals())
|
||||
#endif
|
||||
{
|
||||
thd->cleanup();
|
||||
delete thd;
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
lex_start(thd);
|
||||
|
@ -2229,6 +2264,7 @@ pthread_handler_t handle_slave_io(void *arg)
|
|||
|
||||
thd= new THD; // note that contructor of THD uses DBUG_ !
|
||||
THD_CHECK_SENTRY(thd);
|
||||
mi->io_thd = thd;
|
||||
|
||||
pthread_detach_this_thread();
|
||||
thd->thread_stack= (char*) &thd; // remember where our stack is
|
||||
|
@ -2239,7 +2275,6 @@ pthread_handler_t handle_slave_io(void *arg)
|
|||
sql_print_error("Failed during slave I/O thread initialization");
|
||||
goto err;
|
||||
}
|
||||
mi->io_thd = thd;
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
threads.append(thd);
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
|
@ -2530,9 +2565,11 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||
|
||||
thd = new THD; // note that contructor of THD uses DBUG_ !
|
||||
thd->thread_stack = (char*)&thd; // remember where our stack is
|
||||
|
||||
rli->sql_thd= thd;
|
||||
|
||||
/* Inform waiting threads that slave has started */
|
||||
rli->slave_run_id++;
|
||||
rli->slave_running = 1;
|
||||
|
||||
pthread_detach_this_thread();
|
||||
if (init_slave_thread(thd, SLAVE_THD_SQL))
|
||||
|
@ -2547,7 +2584,6 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||
goto err;
|
||||
}
|
||||
thd->init_for_queries();
|
||||
rli->sql_thd= thd;
|
||||
thd->temporary_tables = rli->save_temporary_tables; // restore temp tables
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
threads.append(thd);
|
||||
|
@ -2560,7 +2596,6 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||
start receiving data so we realize we are not caught up and
|
||||
Seconds_Behind_Master grows. No big deal.
|
||||
*/
|
||||
rli->slave_running = 1;
|
||||
rli->abort_slave = 0;
|
||||
pthread_mutex_unlock(&rli->run_lock);
|
||||
pthread_cond_broadcast(&rli->start_cond);
|
||||
|
|
|
@ -1243,7 +1243,6 @@ public:
|
|||
Public interface to write RBR events to the binlog
|
||||
*/
|
||||
void binlog_start_trans_and_stmt();
|
||||
int binlog_flush_transaction_cache();
|
||||
void binlog_set_stmt_begin();
|
||||
int binlog_write_table_map(TABLE *table, bool is_transactional);
|
||||
int binlog_write_row(TABLE* table, bool is_transactional,
|
||||
|
|
|
@ -780,8 +780,6 @@ void multi_delete::abort()
|
|||
}
|
||||
thd->transaction.all.modified_non_trans_table= true;
|
||||
}
|
||||
DBUG_ASSERT(!normal_tables || !deleted ||
|
||||
thd->transaction.stmt.modified_non_trans_table);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
@ -899,8 +897,6 @@ bool multi_delete::send_eof()
|
|||
{
|
||||
query_cache_invalidate3(thd, delete_tables, 1);
|
||||
}
|
||||
DBUG_ASSERT(!normal_tables || !deleted ||
|
||||
thd->transaction.stmt.modified_non_trans_table);
|
||||
if ((local_error == 0) || thd->transaction.stmt.modified_non_trans_table)
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
|
|
|
@ -1203,7 +1203,7 @@ multi_update::multi_update(TABLE_LIST *table_list,
|
|||
tmp_tables(0), updated(0), found(0), fields(field_list),
|
||||
values(value_list), table_count(0), copy_field(0),
|
||||
handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(1),
|
||||
transactional_tables(1), ignore(ignore_arg), error_handled(0)
|
||||
transactional_tables(0), ignore(ignore_arg), error_handled(0)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -1718,7 +1718,7 @@ void multi_update::abort()
|
|||
|
||||
if (trans_safe)
|
||||
{
|
||||
DBUG_ASSERT(transactional_tables);
|
||||
DBUG_ASSERT(!updated || transactional_tables);
|
||||
(void) ha_autocommit_or_rollback(thd, 1);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -8697,7 +8697,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
|
|||
my_strnncollsp_simple,
|
||||
my_strnxfrm_simple, /* strnxfrm */
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_simple, /* like_range */
|
||||
my_like_range_mb, /* like_range */
|
||||
my_wildcmp_mb, /* wildcmp */
|
||||
my_strcasecmp_mb,
|
||||
my_instr_mb,
|
||||
|
|
|
@ -8644,7 +8644,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
|
|||
my_strnncollsp_simple,
|
||||
my_strnxfrm_simple, /* strnxfrm */
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_simple,/* like_range */
|
||||
my_like_range_mb, /* like_range */
|
||||
my_wildcmp_mb, /* wildcmp */
|
||||
my_strcasecmp_mb,
|
||||
my_instr_mb,
|
||||
|
|
|
@ -5725,7 +5725,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
|
|||
my_strnncollsp_simple,
|
||||
my_strnxfrm_simple, /* strnxfrm */
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_simple, /* like_range */
|
||||
my_like_range_mb, /* like_range */
|
||||
my_wildcmp_mb, /* wildcmp */
|
||||
my_strcasecmp_mb, /* instr */
|
||||
my_instr_mb,
|
||||
|
|
|
@ -1673,7 +1673,7 @@ static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler =
|
|||
my_strnncollsp_ucs2_bin,
|
||||
my_strnxfrm_ucs2_bin,
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_simple,
|
||||
my_like_range_ucs2,
|
||||
my_wildcmp_ucs2_bin,
|
||||
my_strcasecmp_ucs2_bin,
|
||||
my_instr_mb,
|
||||
|
|
|
@ -8501,7 +8501,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
|
|||
my_strnncollsp_simple,
|
||||
my_strnxfrm_simple, /* strnxfrm */
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_simple,/* like_range */
|
||||
my_like_range_mb, /* like_range */
|
||||
my_wildcmp_mb, /* wildcmp */
|
||||
my_strcasecmp_mb,
|
||||
my_instr_mb,
|
||||
|
|
|
@ -155,7 +155,7 @@ static MY_UNICASE_INFO plane00[]={
|
|||
{0x00D8,0x00F8,0x00D8}, {0x00D9,0x00F9,0x0055},
|
||||
{0x00DA,0x00FA,0x0055}, {0x00DB,0x00FB,0x0055},
|
||||
{0x00DC,0x00FC,0x0055}, {0x00DD,0x00FD,0x0059},
|
||||
{0x00DE,0x00FE,0x00DE}, {0x00DF,0x00DF,0x00DF},
|
||||
{0x00DE,0x00FE,0x00DE}, {0x00DF,0x00DF,0x0053},
|
||||
{0x00C0,0x00E0,0x0041}, {0x00C1,0x00E1,0x0041},
|
||||
{0x00C2,0x00E2,0x0041}, {0x00C3,0x00E3,0x0041},
|
||||
{0x00C4,0x00E4,0x0041}, {0x00C5,0x00E5,0x0041},
|
||||
|
|
Loading…
Add table
Reference in a new issue