Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-42238

rpl.rpl_row_mysqlbinlog fails on Windows (charset problem)

    XMLWordPrintable

Details

    Description

      rpl.rpl_row_mysqlbinlog fails because apparently the client command line on Windows (at least on my Windows) cannot interpret the literal cp932 string which is passed to it.

      rpl.rpl_row_mysqlbinlog 'row'            w2 [ fail ]
              Test ended at 2026-09-14 23:37:13
       
      CURRENT_TEST: rpl.rpl_row_mysqlbinlog
      --------------
      insert into t5 values(_cp932'�\');
      --------------
       
      ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''?╜\')' at line 1
      mysqltest: At line 241: exec of 'C:\home\builds\10.11\client\Debug\mariadb.exe --defaults-file=C:/home/builds/10.11/mysql-test/var/2/my.cnf --default-character-set=cp932 test -e "insert into t5 values(_cp932'â\');"' failed, error: 1, status: 1, errno: 2
      Output from before failure:
      create table t5 (f text character set cp932);
      

      Since the point of the test is not how the original INSERT happens, but how it further works while replaying the binlog, I think this is an acceptable way to make it work on Windows:

      diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      index 9e10aaa6216..e844bae4d0e 100644
      --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
      @@ -238,7 +238,7 @@ connection master;
       create table t4 (f text character set utf8);
       create table t5 (f text character set cp932);
       --exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')"
      ---exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'<83>\');"
      +--exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(UNHEX('835C'));"
       flush logs;
       rename table t4 to t04, t5 to t05;
       --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8
      

      Attachments

        Issue Links

          Activity

            People

              elenst Elena Stepanova
              elenst Elena Stepanova
              Susil Behera Susil Behera
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.