1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
stmt_query (ob_sql.cpp:171) [112642][466][YB427F000001-0005E8344D6D28DD] [lt=3] [dc=0] fail to handle text query(stmt=SELECT DAYNAME("2017-06-15"), ret=-5055)
else if (OB_FAIL(handle_text_query(stmt, context, result))) {
if (OB_EAGAIN != ret && OB_ERR_PROXY_REROUTE != ret) {
LOG_WARN("fail to handle text query", K(stmt), K(ret));
}
}
int ObSql::handle_text_query(
[root@h12-storage03 log]# tail -f observer.log |grep "not exist"
[2022-09-09 11:17:54.141943] INFO [SHARE.SCHEMA] ob_schema_getter_guard.cpp:6335 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=9] [dc=0] udf not exist(tenant_id=1, name=dayname)
[2022-09-09 11:17:54.141953] WARN [SQL.RESV] do_recursive_resolve (ob_raw_expr_resolver_impl.cpp:798) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=7] [dc=0] function does not exist(node->children_[0]->str_value_="DAYNAME")
[2022-09-09 11:17:54.141966] WARN do_recursive_resolve (ob_raw_expr_resolver_impl.cpp:800) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=11] [dc=0] FUNCTION DAYNAME does not exist
[2022-09-09 11:17:54.142091] INFO [SERVER] obmp_base.cpp:1237 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] send error package.(user_error_code=1305, err=-5055, sql_state="42000", message=FUNCTION DAYNAME does not exist
)
[5]+ Stopped tail -f observer.log | grep --color=auto "not exist"
[root@h12-storage03 log]# grep "YB427F000001-0005E8344D6D28DF" observer.log
[2022-09-09 11:17:54.141719] INFO [SQL] ob_sql.cpp:163 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=8] [dc=0] Begin to handle text statement(trunc_stmt=SELECT DAYNAME("2017-06-15"), sess_id=3221487631, execution_id=194262)
[2022-09-09 11:17:54.141943] INFO [SHARE.SCHEMA] ob_schema_getter_guard.cpp:6335 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=9] [dc=0] udf not exist(tenant_id=1, name=dayname)
[2022-09-09 11:17:54.141953] WARN [SQL.RESV] do_recursive_resolve (ob_raw_expr_resolver_impl.cpp:798) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=7] [dc=0] function does not exist(node->children_[0]->str_value_="DAYNAME")
[2022-09-09 11:17:54.141966] WARN do_recursive_resolve (:800) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=11] [dc=0] FUNCTION DAYNAME does not exist
[2022-09-09 11:17:54.141975] WARN [SQL.RESV] resolve_sql_expr (ob_dml_resolver.cpp:208) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] fail to exec expr_resolver.resolve( &node, expr, *output_columns, sys_vars, sub_query_info, aggr_exprs, win_exprs, op_exprs, user_var_exprs)(ret=-5055, &node=0x7f07f2e6aa18, expr=NULL, *output_columns=[], sys_vars=[], sub_query_info=[], aggr_exprs=[], win_exprs=[], op_exprs=[], user_var_exprs=[])
[2022-09-09 11:17:54.141985] WARN [SQL.RESV] resolve_field_list :1399) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=5] [dc=0] resolve sql expr failed(ret=-5055)
[2022-09-09 11:17:54.141989] WARN [SQL.RESV] resolve_normal_query (ob_select_resolver.cpp:801) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] fail to exec resolve_field_list(*(parse_tree.children_[PARSE_SELECT_SELECT]))(ret=-5055)
[2022-09-09 11:17:54.141992] WARN [SQL.RESV] resolve (ob_select_resolver.cpp:934) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] resolve normal query failed(ret=-5055)
[2022-09-09 11:17:54.141996] WARN [SQL.RESV] select_stmt_resolver_func (ob_resolver.cpp:142) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] execute stmt_resolver failed(ret=-5055, parse_tree.type_=3035)
[2022-09-09 11:17:54.142005] WARN [SQL] generate_stmt (ob_sql.cpp:1443) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] failed to resolve(ret=-5055)
[2022-09-09 11:17:54.142010] WARN [SQL] generate_physical_plan (ob_sql.cpp:1531) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=3] [dc=0] Failed to generate stmt(ret=-5055, result.get_exec_context().need_disconnect()=false)
[2022-09-09 11:17:54.142014] WARN [SQL] handle_physical_plan (ob_sql.cpp:3231) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] Failed to generate plan(ret=-5055, result.get_exec_context().need_disconnect()=false)
[2022-09-09 11:17:54.142018] WARN [SQL] handle_text_query (ob_sql.cpp:1212) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] fail to handle physical plan(ret=-5055)
[2022-09-09 11:17:54.142023] WARN [SQL] stmt_query (ob_sql.cpp:171) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=2] [dc=0] fail to handle text query(stmt=SELECT DAYNAME("2017-06-15"), ret=-5055)
[2022-09-09 11:17:54.142035] WARN [SERVER] test_and_save_retry_state (ob_query_retry_ctrl.cpp:446) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=3] [dc=0] do not need retry(client_ret=-5055, err=-5055, expected_stmt=true, THIS_WORKER.get_timeout_ts()=1662693484141630, retry_type_=0, result.get_stmt_type()=1, result.get_exec_context().need_change_timeout_ret()=true, session->get_retry_info().get_last_query_retry_err()=0)
[2022-09-09 11:17:54.142042] INFO [SERVER] ob_query_retry_ctrl.cpp:460 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] check if need retry(client_ret=-5055, err=-5055, retry_type_=0, retry_times=1, multi_stmt_item={is_part_of_multi_stmt:true, seq_num:0, sql:"SELECT DAYNAME("2017-06-15")"})
[2022-09-09 11:17:54.142049] WARN [SERVER] do_process (obmp_query.cpp:638) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] run stmt_query failed, check if need retry(ret=-5055, cli_ret=-5055, retry_ctrl_.need_retry()=0, sql=SELECT DAYNAME("2017-06-15"))
[2022-09-09 11:17:54.142063] WARN [SERVER] do_process (obmp_query.cpp:745) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] query failed(ret=-5055, retry_ctrl_.need_retry()=0)
[2022-09-09 11:17:54.142083] INFO [SERVER] obmp_base.cpp:1163 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] sending error packet(err=-5055, bt="0xb553645 0xa899d40 0xa92d3cd 0xa8c70ce 0xa8c151b 0xb6d881d 0xa740c40 0xa71d3f9 0xa73e9d6 0xa71b2ff 0xa71b7cc 0x1e7613c 0x1e75fcd 0x1e7a00e 0xb4fbd75 0xb4fa515 0xb20b1cf", extra_err_info=0x7f07f2e578c8)
[2022-09-09 11:17:54.142091] INFO [SERVER] obmp_base.cpp:1237 [112642][466][YB427F000001-0005E8344D6D28DF] [lt=4] [dc=0] send error package.(user_error_code=1305, err=-5055, sql_state="42000", message=FUNCTION DAYNAME does not exist)
[2022-09-09 11:17:54.142161] WARN [SERVER] process (obmp_query.cpp:291) [112642][466][YB427F000001-0005E8344D6D28DF] [lt=3] [dc=0] fail execute sql(sql_id="", sql=SELECT DAYNAME("2017-06-15"), sessid=3221487631, ret=-5055, ret="OB_ERR_FUNCTION_UNKNOWN", need_disconnect=false)
[root@h12-storage03 log]#
SELECT DAYNAME("2022-09-20");
SELECT DAYOFWEEK('2022-09-20');
SELECT MONTHNAME('2022-09-20');
cp /root/src/oceanbase/build_debug/src/observer/observer /root/src/observer/bin/observer
obd cluster stop test
|