[MCOL-1375] Assertion failure when using HAVING with constant values Created: 2018-05-01  Updated: 2020-04-02  Resolved: 2019-07-16

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.0.12, 1.1.4
Fix Version/s: 1.1.0, 1.2.5

Type: Bug Priority: Minor
Reporter: Roman Assignee: David Hall (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-13355 Assertion `using_unique_constraint ||... Closed

 Description   

Caused by this asserion failure
DBUG_ASSERT(using_unique_constraint ||
group_buff <= param->group_buff + param->group_length)
sql_select.cc:create_tmp_table

Presumably plugin or modified server code sets vtable_mode thd->infinidb_vtable.vtable_state to THD::INFINIDB_DISABLE_VfTABLE in the middle of table creation, that later causes the failure.

Steps to reproduce. FYI any table is fit.

MariaDB [cs]> show create table cs1;
-----------------------------------------------------------------------------------------------------------------------------+

Table Create Table

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

cs1 CREATE TABLE `cs1` (
`a` char(1) DEFAULT NULL,
`d` double DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1

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

MariaDB [cs]> select * from cs1;
------------+

a d

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

A 1.2555
B 2.2555
A 3.2555
B 4.2555

------------+
4 rows in set (0.09 sec)

MariaDB [cs]> select a from cs1 group by a having 'c' = 1;



 Comments   
Comment by Roman [ 2018-05-01 ]

I should have added the outout of the mentioned query.

MariaDB [cs]> select a from cs1 group by a having 'c' = 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query

And a stack trace
Thread pointer: 0x7f85dc000b00
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 = 0x7f865fba5ec0 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x38)[0x5559913f2a66]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x3a3)[0x555990c85232]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f869b77f390]
/lib/x86_64-linux-gnu/libc.so.6(+0x172a9e)[0x7f869ac75a9e]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN4JOIN21make_aggr_tables_infoEv+0x54b)[0x555990a5b377]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN4JOIN14optimize_innerEv+0x39a1)[0x555990a5acf1]
mysys/stacktrace.c:267(my_print_stacktrace)[0x555990a56f35]
sql/sql_select.cc:2333(JOIN::make_aggr_tables_info())[0x555990a60892]
sql/sql_select.cc:373(handle_select(THD*, LEX*, select_result*, unsigned long))[0x555990a5486f]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x5b7290)[0x555990a1c290]
sql/sql_parse.cc:6476(execute_sqlcom_select(THD*, TABLE_LIST*))[0x555990a11cb1]
sql/sql_parse.cc:7917(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x555990a1fc09]
sql/sql_parse.cc:1841(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x555990a0d4d1]
sql/sql_parse.cc:1379(do_command(THD*))[0x555990a0bddf]
sql/sql_connect.cc:1354(do_handle_one_connection(CONNECT*))[0x555990b5de9c]
sql/sql_connect.cc:1261(handle_one_connection)[0x555990b5dc1c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f869b7756ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f869ac0a41d]

Comment by David Hall (Inactive) [ 2019-07-16 ]

This has been fixed by a change in the Server code.

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