[MDEV-491] DNAMES: Server crashes in Item_func_dyncol_exists::val_int => String::charset with NULL as a column name/number Created: 2012-08-26  Updated: 2018-10-15  Resolved: 2012-09-20

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.0.0

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-377 Name support for dynamic columns Closed

 Description   

This is similar to MDEV-490, but since it comes to the crash from a different function, and not all functions produce the crash, I'm filing it separately.

#3  0x083cea84 in handle_fatal_signal (sig=11)
    at sql/signal_handler.cc:262
#4  <signal handler called>
#5  0x081acb0a in String::charset (this=0x0)
    at sql/sql_string.h:113
#6  0x0840ab33 in Item_func_dyncol_exists::val_int (this=0x971ed48)
    at sql/item_cmpfunc.cc:6068
#7  0x083eb508 in Item::send (this=0x971ed48, protocol=0x966f7b0, buffer=0xad1530b4)
    at sql/item.cc:6357
#8  0x081aad13 in Protocol::send_result_set_row (this=0x966f7b0, row_items=0x9670e78)
    at sql/protocol.cc:900
#9  0x08207a4e in select_send::send_data (this=0x971eec0, items=...)
    at sql/sql_class.cc:2275
#10 0x0826d5cb in JOIN::exec (this=0x971eed0)
    at sql/sql_select.cc:2229
#11 0x0826ff66 in mysql_select (thd=0x966f350, rref_pointer_array=0x9670f20, tables=0x0,
    wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0,
    proc_param=0x0, select_options=2147748608, result=0x971eec0, unit=0x9670930,
    select_lex=0x9670de0) at sql/sql_select.cc:3050
#12 0x08267932 in handle_select (thd=0x966f350, lex=0x96708cc, result=0x971eec0,
    setup_tables_done_option=0) at sql/sql_select.cc:313
#13 0x08243498 in execute_sqlcom_select (thd=0x966f350, all_tables=0x0)
    at sql/sql_parse.cc:4621
#14 0x0823c432 in mysql_execute_command (thd=0x966f350)
    at sql/sql_parse.cc:2189
#15 0x08245a89 in mysql_parse (thd=0x966f350,
    rawbuf=0x971ea48 "SELECT COLUMN_EXISTS( COLUMN_CREATE(1,'a'), NULL)", length=49,
    parser_state=0xad153da4) at sql/sql_parse.cc:5736
#16 0x08239ed4 in dispatch_command (command=COM_QUERY, thd=0x966f350, packet=0x9718d19 "",
    packet_length=49) at sql/sql_parse.cc:1055
#17 0x08239399 in do_command (thd=0x966f350)
    at sql/sql_parse.cc:794
#18 0x08325471 in do_handle_one_connection (thd_arg=0x966f350)
    at sql/sql_connect.cc:1253
#19 0x08324fbc in handle_one_connection (arg=0x966f350)
    at sql/sql_connect.cc:1168
#20 0x0854fd1b in pfs_spawn_thread (arg=0x975fae0)
    at storage/perfschema/pfs.cc:1015
#21 0xb77c4b25 in start_thread () from /lib/libpthread.so.0

Some pointers may be invalid and cause the dump to abort.
Query (0x971ea48): SELECT COLUMN_EXISTS( COLUMN_CREATE(1,'a'), NULL)
Connection ID (thread ID): 2
Status: NOT_KILLED

bzr version-info
revision-id: sanja@askmonty.org-20120823152900-3ngz79t2yvtq28f6
date: 2012-08-23 18:29:00 +0300
build-date: 2012-08-26 22:37:27 +0400
revno: 3496

SELECT COLUMN_EXISTS(COLUMN_CREATE(1,'a'), NULL);


Generated at Thu Feb 08 06:29:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.