Multiple MariaDB File Tables

I am running MariaDB (10.0.2-MariaDB) on CentOS 6.4 and would like to use the MariaDB CONNECT-Engine to read from some log files. Because the log files are expensive, I recovered the error with two single line CSV files.

MariaDB [jedi]> create table test1 ( a char(10), b char(10) ) engine=CONNECT table_type=CSV file_name='/tmp/test1.csv' sep_char=';' compress=0 multiple=0; Query OK, 0 rows affected (0.00 sec) MariaDB [jedi]> create table test2 ( a char(10), b char(10) ) engine=CONNECT table_type=CSV file_name='/tmp/test2.csv' sep_char=';' compress=0 multiple=0; Query OK, 0 rows affected (0.01 sec) MariaDB [jedi]> select * from test1; +------+------+ | a | b | +------+------+ | test | bla | +------+------+ 1 row in set (0.00 sec) MariaDB [jedi]> select * from test2; +-------+------+ | a | b | +-------+------+ | test2 | blub | +-------+------+ 1 row in set (0.00 sec) 

Now an interesting feature would be to combine these files into a single table, which should be possible (says https://kb.askmonty.org/en/connect-table-types-data-files/#multiple-file-tables ).

But if I do this:

 MariaDB [jedi]> create table test_all ( a char(10), b char(10) ) engine=CONNECT table_type=CSV file_name='/tmp/test*.csv' sep_char=';' compress=0 multiple=1; Query OK, 0 rows affected (0.00 sec) MariaDB [jedi]> select * from test_all; ERROR 2013 (HY000): Lost connection to MySQL server during query 

Does anyone know an explanation? No matter "compress = 0", I also checked reading from gzipped files, which works like charme ... until you try to read from two files into one table.

Thanks Jens

+4
source share
1 answer

This was an error in MariaDB 10.0.2, which was fixed in 10.0.3 (the corresponding ticket says 10.0.4, but the error will no longer happen with 10.0.3).

+2
source

Source: https://habr.com/ru/post/1479343/


All Articles