mariadb/mysql-test/suite/galera/t/MDEV-37857.test
Jan Lindström 39e7133ef9 MDEV-37857 : Galera replication does not preserve the character set and collation associated with views, etc
In Query_log_event::do_apply_event there is comparison is used
character set in event same as cached charset and if not used
charset is changed. Unfortunately, it was done only if thread is
replica thread.

Fixed by adding condition for Galera applier thread so that
comparison is done leading to charset change if event
had different charset.
2025-10-27 08:39:02 +02:00

29 lines
691 B
Text

--source include/galera_cluster.inc
--disable_warnings
drop table if exists t1;
drop view if exists t1;
--enable_warnings
--connection node_2
SELECT @@character_set_server, @@collation_server;
SELECT @@character_set_client, @@collation_connection;
--connection node_1
SET NAMES latin1 COLLATE latin1_bin;
SELECT @@character_set_server, @@collation_server;
SELECT @@character_set_client, @@collation_connection;
create table t1 (a int);
insert into t1 values (1);
create view v1 as select a from t1;
SHOW CREATE VIEW v1;
SHOW CREATE TABLE t1;
--connection node_2
SHOW CREATE VIEW v1;
SHOW CREATE TABLE t1;
--connection node_1
DROP VIEW v1;
DROP TABLE t1;
--source include/galera_end.inc