我是靠谱客的博主 明亮花瓣,最近开发中收集的这篇文章主要介绍2022-09-20 mysql列存储引擎-POC-调用自定义函数-参数赋值摘要:逻辑追踪:,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
摘要:
mysql列存储引擎-POC-调用自定义函数-参数赋值
问题上下文参考 2022-09-15 mysql列存储引擎-POC-Q2-语句范围缩小后问题定位_帝尊悟世的博客-CSDN博客
逻辑追踪:
自定义函数参数赋值:
(gdb) bt
#0
Item_func::fix_func_arg (this=0x7f847c0156d8, thd=0x7f847c010540, arg=0x7f847c015780) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/item_func.cc:263
#1
0x0000000001d5e5a2 in Item_func::fix_fields (this=0x7f847c0156d8, thd=0x7f847c010540, ref=0x7f847c014d68) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/item_func.cc:249
#2
0x0000000001d76a00 in Item_func_sp::fix_fields (this=0x7f847c0156d8, thd=0x7f847c010540, ref=0x7f847c014d68) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/item_func.cc:8860
#3
0x0000000002293b8a in setup_fields (thd=0x7f847c010540, ref_pointer_array=..., fields=..., want_privilege=1, sum_func_list=0x7f847c014090, allow_sum_func=true, column_update=false)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_base.cc:9138
#4
0x00000000023333ad in st_select_lex::prepare (this=0x7f847c013f30, thd=0x7f847c010540) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_resolver.cc:197
#5
0x00000000029d620a in Tianmu::core::optimize_select (thd=0x7f847c010540, select_options=2147748608, result=0x7f847c01de60, select_lex=0x7f847c013f30, optimize_after_tianmu=@0x7f8665d29dec: 0,
free_join=@0x7f8665d29df0: 1) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/storage/tianmu/core/engine_execute.cpp:338
#6
0x00000000029d5bc4 in Tianmu::core::Engine::HandleSelect (this=0x49f6160, thd=0x7f847c010540, lex=0x7f847c0126b8, result=@0x7f8665d29df8: 0x7f847c01de60, setup_tables_done_option=0,
res=@0x7f8665d29df4: 0, optimize_after_tianmu=@0x7f8665d29dec: 0, tianmu_free_join=@0x7f8665d29df0: 1, with_insert=0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/storage/tianmu/core/engine_execute.cpp:225
#7
0x0000000002abb3b4 in Tianmu::dbhandler::TIANMU_HandleSelect (thd=0x7f847c010540, lex=0x7f847c0126b8, result=@0x7f8665d29df8: 0x7f847c01de60, setup_tables_done_option=0, res=@0x7f8665d29df4: 0,
optimize_after_tianmu=@0x7f8665d29dec: 0, tianmu_free_join=@0x7f8665d29df0: 1, with_insert=0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/storage/tianmu/handler/ha_rcengine.cpp:82
#8
0x00000000022ff727 in execute_sqlcom_select (thd=0x7f847c010540, all_tables=0x7f847c01cc18) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_parse.cc:5182
#9
0x00000000022f954f in mysql_execute_command (thd=0x7f847c010540, first_level=true) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_parse.cc:2831
#10 0x000000000230042e in mysql_parse (thd=0x7f847c010540, parser_state=0x7f8665d2af00) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_parse.cc:5621
#11 0x00000000022f6878 in dispatch_command (thd=0x7f847c010540, com_data=0x7f8665d2b660, command=COM_QUERY) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_parse.cc:1495
#12 0x00000000022f5a1b in do_command (thd=0x7f847c010540) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/sql_parse.cc:1034
#13 0x00000000023f995b in handle_connection (arg=0x6903780) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/sql/conn_handler/connection_handler_per_thread.cc:313
#14 0x0000000002915591 in pfs_spawn_thread (arg=0x6947e30) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-75-128/storage/perfschema/pfs.cc:2197
#15 0x00007f86b0cfeea5 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f86ae222b0d in clone () from /lib64/libc.so.6
(gdb) p *(Item_field*)args[0]
$182 = {
<Item_ident> = {
<Item> = {
<Parse_tree_node> = {
_vptr.Parse_tree_node = 0x3c704d8 <vtable for Item_field+16>
},
members of Item:
is_expensive_cache = -1 '377',
rsize = 0,
str_value = {
m_ptr = 0x0,
m_length = 0,
m_charset = 0x3d8a2a0 <my_charset_bin>,
m_alloced_length = 0,
m_is_alloced = false
},
item_name = {
<Name_string> = {
<Simple_cstring> = {
m_str = 0x7f847c014a38 "employee_id",
m_length = 11
}, <No data fields>},
members of Item_name_string:
m_is_autogenerated = true
},
orig_name = {
<Name_string> = {
<Simple_cstring> = {
m_str = 0x0,
m_length = 0
}, <No data fields>},
members of Item_name_string:
m_is_autogenerated = true
},
next = 0x7f847c014a48,
max_length = 0,
marker = 0,
decimals = 0 '