[MCOL-4105] calling stored procedures in columnstore_info database caused mariadbd to crash Created: 2020-06-24  Updated: 2020-12-03  Resolved: 2020-12-03

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.5.2
Fix Version/s: 5.5.1

Type: Bug Priority: Critical
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Build tested: 1.5.2-1 (community edition b33685)

There are four stored procedures in the columnstore_info database.

Calling any one of them will caused mariadbd to crash.

MariaDB [columnstore_info]> call columnstore_info.table_usage('mytest','orders');
ERROR 2013 (HY000): Lost connection to MySQL server during query

MariaDB [columnstore_info]> call columnstore_info.compression_ratio;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 3
Current database: columnstore_info

ERROR 2013 (HY000): Lost connection to MySQL server during query

MariaDB [columnstore_info]> call columnstore_info.total_usage;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 3
Current database: columnstore_info

ERROR 2013 (HY000): Lost connection to MySQL server during query

MariaDB [columnstore_info]> call columnstore_info.columnstore_upgrade;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 3
Current database: columnstore_info

ERROR 1815 (HY000): Internal error: Calpont system tables can only be created with 'SCHEMA SYNC ONLY'



 Comments   
Comment by David Hall (Inactive) [ 2020-12-01 ]

The first three procedures work in 5.5.
columnstore_upgrade strips table comments from all columnstore tables. I modified columnstore_upgrade to skip calpontsys tables, since these are not allowed to have their comments stripped.

Comment by Daniel Lee (Inactive) [ 2020-12-02 ]

Build tested: 5.5.1 (Drone build 1233)

I checked with release 5.4.3-1. The first three functions worked fine and the last one returned:

MariaDB [mytest]> call columnstore_info.columnstore_upgrade;
ERROR 1815 (HY000): Internal error: Calpont system tables can only be created with 'SCHEMA SYNC ONLY'

However, all functions are broken in 5.5.1

MariaDB [mytest]> call columnstore_info.table_usage('mytest','orders');
ERROR 1406 (22001): Data too long for column 'SEGMENT_ID' at row 1
MariaDB [mytest]> call columnstore_info.compression_ratio;
-------------------

COMPRESSION_RATIO

-------------------

1.6052:1

-------------------
1 row in set (0.290 sec)

Query OK, 0 rows affected (0.290 sec)

MariaDB [mytest]> call columnstore_info.total_usage;
---------------------------------+

TOTAL_DATA_SIZE TOTAL_DISK_USAGE

---------------------------------+

823.02 MB 365.30 MB

---------------------------------+
1 row in set (0.242 sec)

Query OK, 0 rows affected (0.242 sec)

MariaDB [mytest]> call columnstore_info.columnstore_upgrade;
Query OK, 0 rows affected (0.090 sec)

MariaDB [mytest]> show tables;
------------------

Tables_in_mytest

------------------

lineitem
orders
quicktest

------------------
3 rows in set (0.001 sec)

Now calling table_usage() again would return:

MariaDB [mytest]> call columnstore_info.table_usage('mytest','lineitem');
ERROR 1644 (45000): Error acquiring table_usage lock
MariaDB [mytest]> call columnstore_info.table_usage('mytest','quicktest');
ERROR 1644 (45000): Error acquiring table_usage lock
MariaDB [mytest]> call columnstore_info.table_usage('mytest','orders');
ERROR 1644 (45000): Error acquiring table_usage lock

But yet, I was able to insert into the quicktest table.
MariaDB [mytest]> desc quicktest
-> ;
----------------------------------+

Field Type Null Key Default Extra

----------------------------------+

c1 int(11) YES   NULL  
c2 char(15) YES   NULL  

----------------------------------+
2 rows in set (0.000 sec)

MariaDB [mytest]> select * from quicktest;
Empty set (0.067 sec)

MariaDB [mytest]> insert into quicktest values (1, 'hello world');
Query OK, 1 row affected (0.205 sec)

MariaDB [mytest]> select * from quicktest;
-----------------+

c1 c2

-----------------+

1 hello world

-----------------+
1 row in set (0.013 sec)

MariaDB [mytest]> call columnstore_info.table_usage('mytest','quicktest');
ERROR 1644 (45000): Error acquiring table_usage lock

I created a new tpch1 database and had the same issues.

restarting the cluster did not correct these issues.

Comment by Daniel Lee (Inactive) [ 2020-12-03 ]

Build verified: 5.5.1 (Drone 1251)

It worked in this newer build.

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