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

Connect SQLite3 MTR test fails due to various charset/collation related output changes

    XMLWordPrintable

Details

    Description

      ./mtr --suite=connect odbc_sqlite3
      

      Leads to:

      10.5.26 b8f92ade57691a78cc97c5d79eae0a27a10cb8f2 (Optimized)

      connect.odbc_sqlite3                     [ fail ]
              Test ended at 2024-08-05 11:42:03
       
      CURRENT_TEST: connect.odbc_sqlite3
      --- /test/MD200724-mariadb-10.5.26-linux-x86_64-opt/mysql-test/plugin/connect/connect/r/odbc_sqlite3.result	2024-07-20 09:55:24.000000000 +1000
      +++ /test/MD200724-mariadb-10.5.26-linux-x86_64-opt/mysql-test/plugin/connect/connect/r/odbc_sqlite3.reject	2024-08-05 11:42:02.970890472 +1000
      @@ -2,14 +2,14 @@
       t1	CREATE TABLE `t1` (
         `Description` char(128) NOT NULL,
         `Attributes` varchar(256) DEFAULT NULL
      -) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
      +) ENGINE=CONNECT DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
       SET NAMES utf8;
       CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;;
       SHOW CREATE TABLE t1;
       Table	Create Table
       t1	CREATE TABLE `t1` (
         `a` varchar(64) DEFAULT NULL
      -) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' `TABLE_TYPE`='ODBC' `DATA_CHARSET`='utf8'
      +) ENGINE=CONNECT DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' `TABLE_TYPE`='ODBC' `DATA_CHARSET`='utf8'
       SELECT * FROM t1;
       a
       test1
      @@ -21,8 +21,8 @@
       SHOW CREATE TABLE t2;
       Table	Create Table
       t2	CREATE TABLE `t2` (
      -  `a` varchar(64) CHARACTER SET utf8 DEFAULT NULL
      -) ENGINE=MyISAM DEFAULT CHARSET=latin1
      +  `a` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL
      +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
       SELECT * FROM t2;
       a
       test1
       
      Result length mismatch
      

      And, somewhat differently on later versions to (note the utf8mb4):

      11.6.0 d83742622dd1bece3f6a3a11ac0be64de0f3ff84 (Optimized)

      connect.odbc_sqlite3                     [ fail ]
              Test ended at 2024-08-05 11:44:53
       
      CURRENT_TEST: connect.odbc_sqlite3
      --- /test/MD200724-mariadb-11.6.0-linux-x86_64-opt/mariadb-test/plugin/connect/connect/r/odbc_sqlite3.result	2024-07-20 11:13:18.000000000 +1000
      +++ /test/MD200724-mariadb-11.6.0-linux-x86_64-opt/mariadb-test/plugin/connect/connect/r/odbc_sqlite3.reject	2024-08-05 11:44:53.064886582 +1000
      @@ -2,14 +2,14 @@
       t1	CREATE TABLE `t1` (
         `Description` char(128) NOT NULL,
         `Attributes` varchar(256) DEFAULT NULL
      -) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
      +) ENGINE=CONNECT DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers'
       SET NAMES utf8;
       CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' CHARSET=utf8 DATA_CHARSET=utf8;;
       SHOW CREATE TABLE t1;
       Table	Create Table
       t1	CREATE TABLE `t1` (
         `a` varchar(64) DEFAULT NULL
      -) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' `TABLE_TYPE`='ODBC' `DATA_CHARSET`='utf8'
      +) ENGINE=CONNECT DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci CONNECTION='Driver=SQLite3 ODBC Driver;Database=MTR_SUITE_DIR/std_data/test.sqlite3;NoWCHAR=yes' `TABLE_TYPE`='ODBC' `DATA_CHARSET`='utf8'
       SELECT * FROM t1;
       a
       test1
      @@ -21,8 +21,8 @@
       SHOW CREATE TABLE t2;
       Table	Create Table
       t2	CREATE TABLE `t2` (
      -  `a` varchar(64) CHARACTER SET utf8 DEFAULT NULL
      -) ENGINE=MyISAM DEFAULT CHARSET=latin1
      +  `a` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
      +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
       SELECT * FROM t2;
       a
       test1
       
      Result length mismatch
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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