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

Script For Creating Unicode Fields in MySQL Fails on MariaDB

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 5.3.12
    • N/A
    • OTHER
    • None
    • Apache/2.2
      Database client version: libmysql - mysqlnd 5.0.8-dev - 20102224
      PHP extension: mysqli

      Protocol version: 10
      Server charset: UTF-8 Unicode (utf8)
      Server Environment: NearlyFreeSpeech.net

    Description

      The attached SQL script creates a table named "food_items" with an "Ingredients" field that holds Chinese characters without any trouble on MySQL running in the following environment:

      • Window Version 6.01 (Build 7601 : Service Pack 1)
      • MySQL Version: 5.6.20 MySQL Community Server (GPL)

      However, if I run it on MariaDB via phpMyAdmin on NearlyFreeSpech.net, then inserting Chinese characters into the database results in question marks.

      I've included screenshots of the table structure from MariaDB and MySQL.

      The following INSERT statement fails.
      INSERT INTO `cake_ht`.`food_items` (`ID`, `Name`, `Ingredients`, `Comments`) VALUES ('', 'Gai-lan', '芥蘭', NULL);

      Error Message:
      Warning: #1366 Incorrect integer value: '' for column 'ID' at row 1
      Warning: #1366 Incorrect string value: '\xE8\x8A\xA5\xE8\x98\xAD' for column 'Ingredients' at row 1

      Attachments

        1. 5.5.41-settings.png
          5.5.41-settings.png
          22 kB
        2. MariaDB.png
          MariaDB.png
          12 kB
        3. MySQL.png
          MySQL.png
          6 kB
        4. VM MySQL Screenshot.png
          VM MySQL Screenshot.png
          26 kB
        5. Works on MySQL and Not on Maria DB.txt
          0.4 kB

        Activity

          People

            Unassigned Unassigned
            Zian Zian
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.