| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/mysql/mysql-test/suite/binlog/t/ |
Upload File : |
################################################################################
# WL#4618 RBR: extended table metadata in the binary log
#
# Below metadata is logged into Table_map_log_event
# - signedness of numeric columns
# - charsets of character columns
# - column names
# - set/enum character sets and string values
# - primary key
#
# The first two are always logged. The others are controlled by system
# variable --binlog-row-metadata
#
# The test will verify if the metadata can be logged and printed by mysqlbinlog
# correctly.
# mysqlbinlog --print-table-metadata will print the extra metadata
################################################################################
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--let $MYSQLD_DATADIR= `select @@datadir`
--let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
RESET MASTER;
--echo #
--echo # Verify that SET string values and character sets can be printed correctly
--echo #
SET NAMES utf8;
CREATE TABLE t1(
c_set_1 SET("set1_v1_å", "set1_v2_ä", "set1_v3_ö"),
c_set_2 SET("set2_v1_å", "set2_v2_ä", "set2_v3_ö") CHARACTER SET binary);
SET GLOBAL binlog_row_metadata = MINIMAL;
INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
--source include/print_optional_metadata.inc
RESET MASTER;
SET GLOBAL binlog_row_metadata = FULL;
INSERT INTO t1 VALUES("set1_v1_å", "set2_v2_ä");
--source include/print_optional_metadata.inc
INSERT INTO t1 VALUES("set1_v3_ö", "set2_v3_ö");
INSERT INTO t1 VALUES("set1_v1_å", "set2_v1_å");
SELECT c_set_1, HEX(c_set_1) FROM t1;
SELECT c_set_2, HEX(c_set_2) FROM t1;
DROP TABLE t1;
RESET MASTER;
--echo #
--echo # Verify that ENUM string values and character sets can be printed correctly
--echo #
CREATE TABLE t1(
c_enum_1 ENUM("enum1_v1_å", "enum1_v2_ä", "enum1_v3_ö"),
c_enum_2 ENUM("enum2_v1_å", "enum2_v2_ä", "enum2_v3_ö") CHARACTER SET binary);
SET GLOBAL binlog_row_metadata = MINIMAL;
INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
--source include/print_optional_metadata.inc
RESET MASTER;
SET GLOBAL binlog_row_metadata = FULL;
INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v2_ä");
--source include/print_optional_metadata.inc
INSERT INTO t1 VALUES("enum1_v3_ö", "enum2_v3_ö");
INSERT INTO t1 VALUES("enum1_v1_å", "enum2_v1_å");
SELECT c_enum_1, HEX(c_enum_1) FROM t1;
SELECT c_enum_2, HEX(c_enum_2) FROM t1;
DROP TABLE t1;
RESET MASTER;
SET GLOBAL binlog_row_metadata = NO_LOG;