summaryrefslogtreecommitdiff
path: root/plugin/type_mysql_json
Commit message (Collapse)AuthorAgeFilesLines
* Fix decimals to 0 for MySQL JSONVicențiu Ciorbaru2020-10-291-0/+13
| | | | | This prevents the clash between NOT_FIXED_DEC differing between server and plugins if MYSQL_SERVER is not defined during plugin compilation.
* Expose utf8mb4_bin charset for pluginsVicențiu Ciorbaru2020-10-292-1/+2
| | | | Cleanup other linker errors
* Fix bogus -Wmaybe-uninitialized in GCC 10.2.0 -OgMarko Mäkelä2020-10-291-1/+1
| | | | | | If and only if read_variable_length() returns true, the variable blob_length will be uninitialized and not used. For some reason, GCC 10.2.0 -Og debug builds would issue a warning.
* MDEV-18323 Convert MySQL JSON type to MariaDB TEXT in mysql_upgradeVicențiu Ciorbaru2020-10-284-0/+780
This patch solves two key problems. 1. There is a type number clash between MySQL and MariaDB. The number 245, used for MariaDB Virtual Fields is the same as MySQL's JSON. This leads to corrupt FRM errors if unhandled. The code properly checks frm table version number and if it matches 5.7+ (until 10.0+) it will assume it is dealing with a MySQL table with the JSON datatype. 2. MySQL JSON datatype uses a proprietary format to pack JSON data. The patch introduces a datatype plugin which parses the format and convers it to its string representation. The intended conversion path is to only use the JSON datatype within ALTER TABLE <table> FORCE, to force a table recreate. This happens during mysql_upgrade or via a direct ALTER TABLE <table> FORCE.