MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
This commit is contained in:
parent
65c94238f8
commit
434e283507
@ -1390,3 +1390,20 @@ DROP TABLE t2;
|
|||||||
|
|
||||||
# -- Done.
|
# -- Done.
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
|
||||||
|
#
|
||||||
|
SET NAMES utf8;
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name','test'));
|
||||||
|
COERCIBILITY(NAME_CONST('name','test'))
|
||||||
|
2
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00'));
|
||||||
|
COERCIBILITY(NAME_CONST('name',TIME'00:00:00'))
|
||||||
|
5
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name',15));
|
||||||
|
COERCIBILITY(NAME_CONST('name',15))
|
||||||
|
5
|
||||||
|
SELECT CONCAT(NAME_CONST('name',15),'오');
|
||||||
|
CONCAT(NAME_CONST('name',15),'오')
|
||||||
|
15오
|
||||||
|
SET NAMES latin1;
|
||||||
|
24
mysql-test/suite/rpl/r/rpl_sp_variables.result
Normal file
24
mysql-test/suite/rpl/r/rpl_sp_variables.result
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
include/master-slave.inc
|
||||||
|
[connection master]
|
||||||
|
#
|
||||||
|
# MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
|
||||||
|
#
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
DECLARE v_id INT DEFAULT 2017;
|
||||||
|
INSERT INTO test.t1 SELECT CONCAT(v_id, '오');
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
CALL p1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
2017오
|
||||||
|
SET NAMES utf8;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
2017오
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
include/rpl_end.inc
|
28
mysql-test/suite/rpl/t/rpl_sp_variables.test
Normal file
28
mysql-test/suite/rpl/t/rpl_sp_variables.test
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
source include/master-slave.inc;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
|
||||||
|
DELIMITER $$;
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
DECLARE v_id INT DEFAULT 2017;
|
||||||
|
INSERT INTO test.t1 SELECT CONCAT(v_id, '오');
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
DELIMITER ;$$
|
||||||
|
CALL p1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
SET NAMES utf8;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
connection master;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
--source include/rpl_end.inc
|
@ -1080,3 +1080,14 @@ DROP TABLE t2;
|
|||||||
--echo
|
--echo
|
||||||
--echo # -- Done.
|
--echo # -- Done.
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
|
||||||
|
--echo #
|
||||||
|
SET NAMES utf8;
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name','test'));
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00'));
|
||||||
|
SELECT COERCIBILITY(NAME_CONST('name',15));
|
||||||
|
SELECT CONCAT(NAME_CONST('name',15),'오');
|
||||||
|
SET NAMES latin1;
|
||||||
|
@ -1796,7 +1796,10 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref)
|
|||||||
{
|
{
|
||||||
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
|
set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info);
|
||||||
}
|
}
|
||||||
collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
|
if (value_item->collation.derivation == DERIVATION_NUMERIC)
|
||||||
|
collation.set_numeric();
|
||||||
|
else
|
||||||
|
collation.set(value_item->collation.collation, DERIVATION_IMPLICIT);
|
||||||
max_length= value_item->max_length;
|
max_length= value_item->max_length;
|
||||||
decimals= value_item->decimals;
|
decimals= value_item->decimals;
|
||||||
fixed= 1;
|
fixed= 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user