You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

  1. -- source include/master-slave.inc
  2. -- source include/have_binlog_format_row.inc
  3. -- source include/have_utf32.inc
  4. #
  5. # BUG#51787 Assertion `(n % 4) == 0' on slave upon INSERT into a table with UTF32
  6. #
  7. SET SQL_LOG_BIN=0;
  8. CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
  9. SET SQL_LOG_BIN=1;
  10. -- connection slave
  11. SET @saved_slave_type_conversions= @@global.slave_type_conversions;
  12. #
  13. # Force test to cover conversion execution path in the
  14. # slave, which also makes use of sql_type method, thence
  15. # can ultimately trigger the assertion.
  16. #
  17. -- source include/stop_slave.inc
  18. SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
  19. -- source include/start_slave.inc
  20. SET SQL_LOG_BIN=0;
  21. CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
  22. SET SQL_LOG_BIN=1;
  23. -- connection master
  24. INSERT INTO t1(c1) VALUES ('insert into t1');
  25. DROP TABLE t1;
  26. --sync_slave_with_master
  27. # assertion: the slave woul hit an/several assertions:
  28. # before and during slave conversion procedure
  29. # Now that is fixed, it wont.
  30. SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
  31. -- source include/stop_slave.inc
  32. -- source include/start_slave.inc
  33. -- connection master