[MDEV-12662] Сrash when using WHERE clause of CONNECT CSV ZIP table Created: 2017-05-02  Updated: 2017-05-04  Resolved: 2017-05-04

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.1.22
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Olivier Bertrand
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Ubuntu 16.04


Attachments: Zip Archive 1.zip    

 Description   

Table c1 made from zip file, that contains CSV file (1.zip, attached). Crash in ApplyFilter of

CONNECT CSV ZIP table
 
CREATE TABLE `c1` (
	`n1` varchar(255)  NOT NULL,
 	`n2` varchar(255)  NOT NULL,
 	`n3` varchar(255)  NOT NULL,
 	`n4` varchar(255)  NOT NULL,
 	`n5` varchar(255)  NOT NULL
) ENGINE=CONNECT  `table_type`=CSV `file_name`='/home/alice/Downloads/1.zip' zipped=1 sep_char="-" header=1
--------------
Query OK, 0 rows affected (0.10 sec)
 
--------------
select  * from c1 limit 3
-------------
+--------+------------+-------+-------+---------+
| n1     | n2         | n3    | n4    | n5      |
+--------+------------+-------+-------+---------+
| Ciaran | "(115) 790 | 1530" | Nolan | Marsden |
| Roth   | "(807) 871 | 5322" | Evan  | Colton  |
| Gary   | "(162) 362 | 1144" | Amery | Tanek   |
+--------+------------+-------+-------+---------+
3 rows in set (0.00 sec)
 
--------------
SELECT * FROM c1 where n1='Gary'
--------------
 
ERROR 2013 (HY000) at line 15 in file: '/home/alice/t/c.sql': Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 15 in file: '/home/alice/t/c.sql': MySQL server has gone away

Version: '10.1.22-MariaDB'  socket: '10.1.22/dt/my.sock'  port: 3311  MariaDB Server
170502 14:17:59 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.
 
Server version: 10.1.22-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467121 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f2443fa2008
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f2445e4a288 thread_stack 0x48400
10.1.22/bin/mysqld(my_print_stacktrace+0x2e)[0xc0b60e]
10.1.22/bin/mysqld(handle_fatal_signal+0x4bf)[0x76902f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f2445af3390]
10.1.22/lib/plugin/ha_connect.so(_Z11ApplyFilterP7_globalP6FILTER+0x1d)[0x7f243a10b5ad]
10.1.22/lib/plugin/ha_connect.so(_Z11CntReadNextP7_globalP3TDB+0x112)[0x7f243a0f0df2]
10.1.22/lib/plugin/ha_connect.so(_ZN10ha_connect8rnd_nextEPh+0x68)[0x7f243a0e3ee8]
10.1.22/bin/mysqld(_ZN7handler11ha_rnd_nextEPh+0x1b4)[0x76e364]
10.1.22/bin/mysqld(_Z13rr_sequentialP11READ_RECORD+0x3b)[0x8993cb]
10.1.22/bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x147)[0x5f1df7]
10.1.22/bin/mysqld[0x5f8eed]
10.1.22/bin/mysqld(_ZN4JOIN10exec_innerEv+0xe5e)[0x60a21e]
10.1.22/bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x1dc)[0x6088dc]
10.1.22/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x250)[0x60c4d0]
10.1.22/bin/mysqld[0x5aee48]
10.1.22/bin/mysqld(_Z21mysql_execute_commandP3THD+0x14b4)[0x5b3874]
10.1.22/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x34e)[0x5bbcce]
10.1.22/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x239b)[0x5be6fb]
10.1.22/bin/mysqld(_Z10do_commandP3THD+0x157)[0x5be9b7]
10.1.22/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x183)[0x68f833]
10.1.22/bin/mysqld(handle_one_connection+0x42)[0x68fa42]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f2445ae96ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f244494e82d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f2415822020): SELECT * FROM c1 where n1='Gary'
Connection ID (thread ID): 3
Status: NOT_KILLED
 
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off



 Comments   
Comment by Olivier Bertrand [ 2017-05-04 ]

Might have been fixed by changes made since then.

Comment by Elena Stepanova [ 2017-05-04 ]

bertrandop,

Which git tree should we be using to verify the bugs, the most modern one which has all recent changes?

Comment by Olivier Bertrand [ 2017-05-04 ]

Unfortunately, the fixes I pushed are not always added in new releases. This is the case in particular to the version 10.1.23 announced yesterday in which all recent changes to CONNECT have not be incorporated.

Comment by Elena Stepanova [ 2017-05-04 ]

bertrandop,

True, I'm very well aware of that, that's why I'm asking which git tree we can use to verify bugs, instead of just trying release builds.

Comment by Olivier Bertrand [ 2017-05-04 ]

https://github.com/Buggynours/MariaDB.git

This site contains four branches:
10.0 and ob-10.0 (tests) This one is the one potentially candidate for being stable.
10.1 and ob-10.1 (tests) This one contains new features not yet documented, in particular direct access to MongoDB collections via their MongoDB C Driver.

I use the ob-10.x branches to have test builds on Builbot. The other ones are those Sergei should include in new versions.

Until recently, they had the exact same versions. They diverge only since a couple of weeks.

Generated at Thu Feb 08 07:59:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.