11 ms·
After some monkeying around with MariaDB I stumbled on this: use test; create table JsonTable ( a_str varchar(32), a_int int, a_float double(12,4) ) engi
by m3047 4y ago
After some monkeying around with MariaDB I stumbled on this:
use test;
create table JsonTable ( a_str varchar(32), a_int int, a_float double(12,4) )
engine=CONNECT table_type=JSON option_list='pretty=0' lrecl=128;
which when given
insert into JsonTable values ('bar', 43, 3.14);
produces
{"a_str":"bar","a_int":43,"a_float":3.1400}
in the file /var/lib/mysql/test/JsonTable.json
I note that according to the documentation and the setting of secure_file_priv it should be writing the file in /var/lib/mysql-files/ but oh well. (MariaDB 10.2.25)