MySQL 5.7.13 的一個BUG

來源:互聯網
上載者:User

標籤:配置   report   warning   ring   and   like   style   環境   原因   

mysql今天從5.6切到5.7,在測試環境中,日誌是全部列印的,發現打了一個警告:

Incorrect string value: ‘\xD6\xD0\xB9\xFA\xB1\xEA...‘ for column ‘VARIABLE_VALUE‘ at row 478

於是,Google之後發現答案全都是說插入資料時編碼錯誤,然而我並沒有插入資料,只是查詢資料,而且網上說的那些配置修改早就修改好了。

累覺不愛,但是本著程式員精神,蛋疼了一會兒後繼續Google,並且研究日誌,發現只要執行 SHOW VARIABLES LIKE ‘XXX‘的命令就會列印一個警告。

在mysql用戶端也驗證了這個問題,找到了原因,於是再Google,發現了bug report:https://bugs.mysql.com/bug.php?id=82414

[2 Aug 16:01] Lowe RyanDescription:> SHOW CREATE TABLE INFORMATION_SCHEMA.GLOBAL_VARIABLES\G*************************** 1. row ***************************       Table: GLOBAL_VARIABLESCreate Table: CREATE TEMPORARY TABLE `GLOBAL_VARIABLES` (  `VARIABLE_NAME` varchar(64) NOT NULL DEFAULT ‘‘,  `VARIABLE_VALUE` varchar(1024) DEFAULT NULL) ENGINE=MEMORY DEFAULT CHARSET=utf81 row in set (0.00 sec)When I set log_bin as follows:log-bin=??It correctly sets the files on disk:-rw-rw----   1 rlowe  1278   174B Aug  2 08:34 ??.000001-rw-rw----   1 rlowe  1278   174B Aug  2 08:40 ??.000002-rw-rw----   1 rlowe  1278   151B Aug  2 08:53 ??.000003-rw-rw----   1 rlowe  1278    42B Aug  2 08:53 ??.indexBut I cannot accurately retrieve log_bin_basename:> SHOW GLOBAL VARIABLES LIKE ‘log_bin_basename‘;+------------------+-----------------------------------------------------------+| Variable_name    | Value                                                     |+------------------+-----------------------------------------------------------+| log_bin_basename | /Users/rlowe/sandboxes/rsandbox_mysql-5_6_23/master/data/ |+------------------+-----------------------------------------------------------+1 row in set, 1 warning (0.00 sec)> SHOW WARNINGS;+---------+------+---------------------------------------------------------------------------------+| Level   | Code | Message                                                                         |+---------+------+---------------------------------------------------------------------------------+| Warning | 1366 | Incorrect string value: ‘\xF0\x9F\x92\xA9‘ for column ‘VARIABLE_VALUE‘ at row 1 |+---------+------+---------------------------------------------------------------------------------+1 row in set (0.00 sec)How to repeat:Follow the steps aboveSuggested fix:Disallow utf8mb4 characters when setting log_bin OR change the character set of GLOBAL_VARIABLES[2 Aug 16:20] Umesh UmeshHello Lowe Ryan,Thank you for the report.Thanks,Umesh

 

此致,敬禮

 

雖然沒有什麼用,但一種爽的感覺悠然而生,我想這就是程式員精神。

MySQL 5.7.13 的一個BUG

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.