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

corrupted text using connect

    XMLWordPrintable

    Details

      Description

      When I use a connect table to connect to
      a MyISAM table on a local server,
      the data set at utf-8 charset happens to corrupt.
      Is this a bug or can I configure options to fix this?

      (FROM SERVER 1)

      [root@kc0022 ~]# mysql -u root
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 19
      Server version: 10.0.13-MariaDB MariaDB Server
       
      Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> show variables like "%char%";
      +--------------------------+----------------------------+
      | Variable_name            | Value                      |
      +--------------------------+----------------------------+
      | character_set_client     | utf8                       |
      | character_set_connection | utf8                       |
      | character_set_database   | utf8                       |
      | character_set_filesystem | binary                     |
      | character_set_results    | utf8                       |
      | character_set_server     | utf8                       |
      | character_set_system     | utf8                       |
      | character_sets_dir       | /usr/share/mysql/charsets/ |
      +--------------------------+----------------------------+
      8 rows in set (0.00 sec)
       
      MariaDB [(none)]> use t_00_company_1;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
       
      Database changed
       
      MariaDB [t_00_company_1]> show create table table_coupon;
      +-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table           | Create Table                                                                                                                                                                                                                                                                                                                                                                                                               |
      +-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | table_coupon | CREATE TABLE `table_coupon` (
        `coupon_no` varchar(10) NOT NULL DEFAULT '',
        `memo` varchar(30) DEFAULT NULL,
        `discount` double DEFAULT NULL,
        `type` int(11) DEFAULT NULL,
        `delegate_coupon_no` varchar(10) DEFAULT NULL,
        PRIMARY KEY (`coupon_no`),
        KEY `delegate_coupon_no` (`delegate_coupon_no`,`coupon_no`),
        KEY `coupon_no` (`coupon_no`,`delegate_coupon_no`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8 |
      +-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [t_00_company_1]> SELECT * FROM table_coupon WHERE coupon_no IN( 7172,7173,7174,7175,7215,7216,7234,7235,7236);
      +-----------+------------------------------------------------+----------+------+--------------------+
      | coupon_no | memo                                           | discount | type | delegate_coupon_no |
      +-----------+------------------------------------------------+----------+------+--------------------+
      | 7175      | [カタログ][14年10月]DM                            |      200 |    2 | 7175               |
      | 7172      | [ハガキ]国内[14年10月]|フォロー1                     |      500 |    6 | 7172               |
      | 7173      | [ハガキ]国内[14年10月]|フォロー2                     |     1000 |    4 | 7173               |
      | 7174      | [ハガキ]海外[14年10月]                           |     1000 |    4 | 7174               |
      +-----------+------------------------------------------------+----------+------+--------------------+
      4 rows in set, 2248 warnings (0.01 sec)

      (FROM SERVER 2)

      [root@kc9001 ~]# mysql -u root
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 13
      Server version: 10.0.13-MariaDB MariaDB Server
       
      Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> show variables like "%char%";
      +--------------------------+----------------------------+
      | Variable_name            | Value                      |
      +--------------------------+----------------------------+
      | character_set_client     | utf8                       |
      | character_set_connection | utf8                       |
      | character_set_database   | utf8                       |
      | character_set_filesystem | binary                     |
      | character_set_results    | utf8                       |
      | character_set_server     | utf8                       |
      | character_set_system     | utf8                       |
      | character_sets_dir       | /usr/share/mysql/charsets/ |
      +--------------------------+----------------------------+
      8 rows in set (0.00 sec)
       
      MariaDB [(none)]> use test;
      Database changed
       
      MariaDB [test]> DROP TABLE IF EXISTS maria_table_coupon;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> CREATE TABLE maria_table_coupon ENGINE=CONNECT DEFAULT CHARSET= utf8 table_type=MYSQL dbname=t_00_company_1 tabname=table_coupon option_list='user=root,host=10.0.1.36';
      Query OK, 0 rows affected (0.05 sec)
       
      MariaDB [test]> SELECT * FROM maria_table_coupon WHERE coupon_no IN( 7172,7173,7174,7175,7215,7216,7234,7235,7236);
      +-----------+------------------------+----------+------+--------------------+
      | coupon_no | memo                   | discount | type | delegate_coupon_no |
      +-----------+------------------------+----------+------+--------------------+
      | 7175      | [?????][14?10?]DM      |      200 |    2 | 7175               |
      | 7172      | [????]??[14?10?]|????1 |      500 |    6 | 7172               |
      | 7173      | [????]??[14?10?]|????2 |     1000 |    4 | 7173               |
      | 7174      | [????]??[14?10?]       |     1000 |    4 | 7174               |
      +-----------+------------------------+----------+------+--------------------+
      4 rows in set (0.01 sec)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bertrandop Olivier Bertrand
              Reporter:
              takuya Takuya Aoki
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: