Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: 包含内连接和外连接及派生表和子查询的查询结果错误 #1861

Closed
2 of 3 tasks
adofsauron opened this issue Jun 7, 2023 · 4 comments · Fixed by #1881 or #1911
Closed
2 of 3 tasks

bug: 包含内连接和外连接及派生表和子查询的查询结果错误 #1861

adofsauron opened this issue Jun 7, 2023 · 4 comments · Fixed by #1881 or #1911
Labels
A-bug Something isn't working prio: high High priority

Comments

@adofsauron
Copy link
Collaborator

adofsauron commented Jun 7, 2023

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

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!
@adofsauron adofsauron added the A-bug Something isn't working label Jun 7, 2023
@adofsauron adofsauron changed the title bug: 包含内连接和外连接及派生表的查询结果错误 bug: 包含内连接和外连接及派生表和子查询的查询结果错误 Jun 7, 2023
@haitaoguan haitaoguan added the prio: high High priority label Jun 8, 2023
@adofsauron adofsauron self-assigned this Jun 9, 2023
@adofsauron
Copy link
Collaborator Author

#0  0x00000000027987a7 in heap_scan_init (info=0x0) at /root/work/stonedb-dev-20230606/storage/heap/hp_scan.c:37
#1  0x0000000002792a60 in ha_heap::rnd_init (this=0x7fd7dc9c78a0, scan=true) at /root/work/stonedb-dev-20230606/storage/heap/ha_heap.cc:374
#2  0x0000000001dba8f3 in handler::ha_rnd_init (this=0x7fd7dc9c78a0, scan=true) at /root/work/stonedb-dev-20230606/sql/handler.cc:2781
#3  0x0000000001dbcbe5 in handler::read_first_row (this=0x7fd7dc9c78a0, buf=0x7fd7dc9c1498 "\377\177\377\377\377\377\377\377\376\200", primary_key=64)
    at /root/work/stonedb-dev-20230606/sql/handler.cc:3137
#4  0x00000000023dd023 in read_system (table=0x7fd7dc9c6770) at /root/work/stonedb-dev-20230606/sql/sql_executor.cc:1853
#5  0x00000000023dcc39 in join_read_const_table (tab=0x7fd7dc9c8f18, pos=0x7fd7dc9c9248) at /root/work/stonedb-dev-20230606/sql/sql_executor.cc:1784
#6  0x0000000002407624 in JOIN::extract_const_tables (this=0x7fd7dc9c8188) at /root/work/stonedb-dev-20230606/sql/sql_optimizer.cc:5196
#7  0x00000000024066ec in JOIN::make_join_plan (this=0x7fd7dc9c8188) at /root/work/stonedb-dev-20230606/sql/sql_optimizer.cc:4836
#8  0x00000000023faef3 in JOIN::optimize (this=0x7fd7dc9c8188, phase=OptimizePhase::Finish_LOJ_Transform) at /root/work/stonedb-dev-20230606/sql/sql_optimizer.cc:373
#9  0x0000000002d25cd4 in Tianmu::core::Query::Compile (this=0x7fdaee9c9750, compiled_query=0x7fdaee9c9680, selects_list=0x7fd7dc005988, 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 /root/work/stonedb-dev-20230606/storage/tianmu/core/query_compile.cpp:1156
#10 0x0000000002ceb98c in Tianmu::core::Engine::Execute (this=0x4ce0440, thd=0x7fd7dc000e10, lex=0x7fd7dc003138, result_output=0x7fd7dc01ff90, unit_for_union=0x0)
    at /root/work/stonedb-dev-20230606/storage/tianmu/core/engine_execute.cpp:472
#11 0x0000000002ceab31 in Tianmu::core::Engine::HandleSelect (this=0x4ce0440, thd=0x7fd7dc000e10, lex=0x7fd7dc003138, result=@0x7fdaee9c9dc8: 0x7fd7dc01ff90, setup_tables_done_option=0, 
    res=@0x7fdaee9c9dc4: 0, is_optimize_after_tianmu=@0x7fdaee9c9dbc: 1, tianmu_free_join=@0x7fdaee9c9dc0: 1, with_insert=0)
    at /root/work/stonedb-dev-20230606/storage/tianmu/core/engine_execute.cpp:243
#12 0x00000000030856fb in Tianmu::DBHandler::ha_my_tianmu_query (thd=0x7fd7dc000e10, lex=0x7fd7dc003138, result_output=@0x7fdaee9c9dc8: 0x7fd7dc01ff90, setup_tables_done_option=0, 
    res=@0x7fdaee9c9dc4: 0, is_optimize_after_tianmu=@0x7fdaee9c9dbc: 1, tianmu_free_join=@0x7fdaee9c9dc0: 1, with_insert=0)
    at /root/work/stonedb-dev-20230606/storage/tianmu/sql/ha_my_tianmu.cpp:95
#13 0x0000000002427bf8 in execute_sqlcom_select (thd=0x7fd7dc000e10, all_tables=0x7fd7dc013f28) at /root/work/stonedb-dev-20230606/sql/sql_parse.cc:4872
#14 0x0000000002420f6e in mysql_execute_command (thd=0x7fd7dc000e10, first_level=true) at /root/work/stonedb-dev-20230606/sql/sql_parse.cc:2672
#15 0x0000000002428c5d in mysql_parse (thd=0x7fd7dc000e10, parser_state=0x7fdaee9caf90) at /root/work/stonedb-dev-20230606/sql/sql_parse.cc:5277
#16 0x000000000241dc54 in dispatch_command (thd=0x7fd7dc000e10, com_data=0x7fdaee9cb730, command=COM_QUERY) at /root/work/stonedb-dev-20230606/sql/sql_parse.cc:1399
#17 0x000000000241ca95 in do_command (thd=0x7fd7dc000e10) at /root/work/stonedb-dev-20230606/sql/sql_parse.cc:976
#18 0x000000000254f005 in handle_connection (arg=0x90ccaa0) at /root/work/stonedb-dev-20230606/sql/conn_handler/connection_handler_per_thread.cc:313
#19 0x0000000002c1e844 in pfs_spawn_thread (arg=0x8f6d1f0) at /root/work/stonedb-dev-20230606/storage/perfschema/pfs.cc:2197
#20 0x00007fdaf8ced1ca in start_thread () from /lib64/libpthread.so.0
#21 0x00007fdaf5b63e73 in clone () from /lib64/libc.so.6

@adofsauron
Copy link
Collaborator Author

这里存在问题, 如果直接由tianmu层去执行,在做预处理阶段会崩溃

@adofsauron
Copy link
Collaborator Author

查询执行时候出现涉及decimal的错误:
code: 1366, msg: Incorrect DECIMAL value: '0' for column '' at row -1

@adofsauron
Copy link
Collaborator Author

"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working prio: high High priority
Projects
None yet
2 participants