[MDEV-26768] Spider table crashes the server after the mysql_list_fields() client's call and produces weird result for SHOW FIELDS. Created: 2021-10-05  Updated: 2022-06-09  Resolved: 2022-01-21

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.3
Fix Version/s: 10.3.33, 10.6.6, 10.4.25, 10.5.16, 10.7.4

Type: Bug Priority: Critical
Reporter: Alexey Botchkov Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

As we did

CREATE TABLE test.t (c INT) PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT ENGINE=SPIDER);

With the debug server started we do

mysql test

The server crashes in my_eof()
:0(_GI__assert_fail)[0x7ffcb3d6f532]
addr2line: 'sql/mysqld': No such file
sql/mysqld(_ZN16Diagnostics_area14set_eof_statusEP3THD+0x9f)[0x7ffcb62d8fb3]
sql/mysqld(_Z6my_eofP3THD+0x3d)[0x7ffcb6213478]
sql/mysqld(_Z18mysqld_list_fieldsP3THDP10TABLE_LISTPKc+0x283)[0x7ffcb63c5dc6]
sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1b72)[0x7ffcb631fe4a]
sql/mysqld(_Z10do_commandP3THD+0x753)[0x7ffcb631dc32]
sql/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1d2)[0x7ffcb649bd6f]

It passes if we do

mysql -A test

But the result of SHOW FIELDS is weird.

MariaDB [test]> show fields from test.t;
ERROR 1429 (HY000): Unable to connect to foreign data source: localhost
MariaDB [test]> show fields from test.t;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| c     | int(11) | YES  |     | NULL    |       |
+-------+---------+------+-----+---------+-------+
1 row in set (0.00 sec)



 Comments   
Comment by Alexey Botchkov [ 2021-10-05 ]

https://github.com/MariaDB/server/commit/bebd58a08dcd39cfad0f78d9fcbf391b3a4b7183

Comment by Nayuta Yanagisawa (Inactive) [ 2021-10-08 ]

holyfoot bebd58a is OK to push.

Generated at Thu Feb 08 09:47:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.