mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-16 16:23:30 +00:00

The MySQL driver DBD::mysql does not decode JSON values as utf8 although MySQL uses utf8mb4 for all JSON strings. This change decodes JSON values as utf8 (when not already done) such that SQL statements are generated correctly.
15 lines
271 B
SQL
15 lines
271 B
SQL
DROP DATABASE IF EXISTS test;
|
|
CREATE DATABASE test;
|
|
USE test;
|
|
|
|
CREATE TABLE `test_table` (
|
|
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
|
`data` JSON NOT NULL
|
|
) ENGINE=InnoDB;
|
|
|
|
INSERT INTO
|
|
`test_table` (`data`)
|
|
VALUES
|
|
('{"name": "Müller"}'),
|
|
('{"reaction": "哈哈"}');
|