Skip to content

bug: mysqld crash when exec query like "select * from a limit 0" #1394

@adofsauron

Description

@adofsauron

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

c0a4fc3ba1ce5b3b0970f5548aec5cdd

(gdb) bt
#0  0x0000000002d466e0 in Tianmu::core::Query::Compile (this=0x7fda88581740, compiled_query=0x7fda88581670, selects_list=0x7fcfa00058c0, last_distinct=0x0, res_tab=0x0, ignore_limit=false, 
    left_expr_for_subselect=0x0, oper_for_subselect=0x0, ignore_minmax=false, for_subq_in_where=false) at /stonedb/storage/tianmu/core/query_compile.cpp:1116
#1  0x0000000002d02c05 in Tianmu::core::Engine::Execute (this=0x762a6a0, thd=0x7fcfa0000b70, lex=0x7fcfa0002e98, result_output=0x7fcfa0006b80, unit_for_union=0x0)
    at /stonedb/storage/tianmu/core/engine_execute.cpp:436
#2  0x0000000002d01f52 in Tianmu::core::Engine::HandleSelect (this=0x762a6a0, thd=0x7fcfa0000b70, lex=0x7fcfa0002e98, result=@0x7fda88581cb8: 0x7fcfa0006b80, setup_tables_done_option=0, 
    res=@0x7fda88581cb4: 0, is_optimize_after_tianmu=@0x7fda88581cac: 1, tianmu_free_join=@0x7fda88581cb0: 1, with_insert=0) at /stonedb/storage/tianmu/core/engine_execute.cpp:238
#3  0x0000000002e1007f in Tianmu::DBHandler::ha_my_tianmu_query (thd=0x7fcfa0000b70, lex=0x7fcfa0002e98, result_output=@0x7fda88581cb8: 0x7fcfa0006b80, setup_tables_done_option=0, 
    res=@0x7fda88581cb4: 0, is_optimize_after_tianmu=@0x7fda88581cac: 1, tianmu_free_join=@0x7fda88581cb0: 1, with_insert=0) at /stonedb/storage/tianmu/handler/ha_my_tianmu.cpp:89
#4  0x0000000002440239 in execute_sqlcom_select (thd=0x7fcfa0000b70, all_tables=0x7fcfa00065e0) at /stonedb/sql/sql_parse.cc:5208
#5  0x00000000024398b8 in mysql_execute_command (thd=0x7fcfa0000b70, first_level=true) at /stonedb/sql/sql_parse.cc:2851
#6  0x0000000002441277 in mysql_parse (thd=0x7fcfa0000b70, parser_state=0x7fda88582e80) at /stonedb/sql/sql_parse.cc:5646
#7  0x00000000024365f4 in dispatch_command (thd=0x7fcfa0000b70, com_data=0x7fda88583610, command=COM_QUERY) at /stonedb/sql/sql_parse.cc:1495
#8  0x000000000243543e in do_command (thd=0x7fcfa0000b70) at /stonedb/sql/sql_parse.cc:1034
#9  0x00000000025675b3 in handle_connection (arg=0xcea2640) at /stonedb/sql/conn_handler/connection_handler_per_thread.cc:313
#10 0x0000000002c363e5 in pfs_spawn_thread (arg=0xceb1c90) at /stonedb/storage/perfschema/pfs.cc:2197
#11 0x00007fda92a51ea5 in start_thread () from /lib64/libpthread.so.0
#12 0x00007fda90524b0d in clone () from /lib64/libc.so.6


Expected behavior

No response

How To Reproduce

No response

Environment

No response

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't workingprio: highHigh priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions