Open davidshiz opened 1 year ago
In StoneDB 8.0, return syntax not supported
:
mysql> CREATE TABLE test_having (a int, b int, c char(8), d char);
Query OK, 0 rows affected (0.04 sec)
mysql> INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A');
Query OK, 1 row affected (0.06 sec)
mysql> SELECT 1 AS one FROM test_having HAVING 1 > 2;
ERROR 6 (HY000): The query includes syntax that is not supported by the storage engine. Either restructure the query with supported syntax, or enable the MySQL core::Query Path in config file to execute the query with reduced performance.
mysql> SELECT 1 FROM test_having HAVING 1 > 2;
In StoneDB 8.0, return
syntax not supported
:mysql> CREATE TABLE test_having (a int, b int, c char(8), d char); Query OK, 0 rows affected (0.04 sec) mysql> INSERT INTO test_having VALUES (0, 1, 'XXXX', 'A'); Query OK, 1 row affected (0.06 sec) mysql> SELECT 1 AS one FROM test_having HAVING 1 > 2; ERROR 6 (HY000): The query includes syntax that is not supported by the storage engine. Either restructure the query with supported syntax, or enable the MySQL core::Query Path in config file to execute the query with reduced performance. mysql> SELECT 1 FROM test_having HAVING 1 > 2;
having 1 > 2
not supported in 8.0, not in 5.7.
this scenario also crash
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2), (1), (3), (2), (1);
SELECT a FROM t1 GROUP BY a HAVING 1 != 1 AND a > 1;
add crash scenario
CREATE TABLE t1(f1 INT, f2 INT);
INSERT INTO t1 VALUES (10,8);
CREATE TABLE t2 (f1 INT);
INSERT INTO t2 VALUES (5);
SELECT COUNT(f1) FROM t2
HAVING (7, 9) IN (SELECT f1, MIN(f2) FROM t1);
#0 0x0000000002d251c2 in Tianmu::core::Query::Compile (this=0x7fc31abd67d0, compiled_query=0x7fc31abd6700, selects_list=0x7fbdd8067f30, 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-20230506/storage/tianmu/core/query_compile.cpp:1116
#1 0x0000000002ceb42c in Tianmu::core::Engine::Execute (this=0x66bf7a0, thd=0x7fbdd80636d0, lex=0x7fbdd80659f8, result_output=0x7fbdd8d30e30, unit_for_union=0x0)
at /root/work/stonedb-dev-20230506/storage/tianmu/core/engine_execute.cpp:472
#2 0x0000000002cea5b5 in Tianmu::core::Engine::HandleSelect (this=0x66bf7a0, thd=0x7fbdd80636d0, lex=0x7fbdd80659f8, result=@0x7fc31abd6dc8: 0x7fbdd8d30e30, setup_tables_done_option=0,
res=@0x7fc31abd6dc4: 0, is_optimize_after_tianmu=@0x7fc31abd6dbc: 1, tianmu_free_join=@0x7fc31abd6dc0: 1, with_insert=0) at /root/work/stonedb-dev-20230506/storage/tianmu/core/engine_execute.cpp:243
#3 0x0000000003083b76 in Tianmu::DBHandler::ha_my_tianmu_query (thd=0x7fbdd80636d0, lex=0x7fbdd80659f8, result_output=@0x7fc31abd6dc8: 0x7fbdd8d30e30, setup_tables_done_option=0, res=@0x7fc31abd6dc4: 0,
is_optimize_after_tianmu=@0x7fc31abd6dbc: 1, tianmu_free_join=@0x7fc31abd6dc0: 1, with_insert=0) at /root/work/stonedb-dev-20230506/storage/tianmu/sql/ha_my_tianmu.cpp:95
#4 0x000000000242789c in execute_sqlcom_select (thd=0x7fbdd80636d0, all_tables=0x7fbdd8d2fb10) at /root/work/stonedb-dev-20230506/sql/sql_parse.cc:5204
#5 0x0000000002420c12 in mysql_execute_command (thd=0x7fbdd80636d0, first_level=true) at /root/work/stonedb-dev-20230506/sql/sql_parse.cc:2847
#6 0x0000000002428901 in mysql_parse (thd=0x7fbdd80636d0, parser_state=0x7fc31abd7f90) at /root/work/stonedb-dev-20230506/sql/sql_parse.cc:5642
#7 0x000000000241d8f8 in dispatch_command (thd=0x7fbdd80636d0, com_data=0x7fc31abd8730, command=COM_QUERY) at /root/work/stonedb-dev-20230506/sql/sql_parse.cc:1495
#8 0x000000000241c739 in do_command (thd=0x7fbdd80636d0) at /root/work/stonedb-dev-20230506/sql/sql_parse.cc:1034
#9 0x000000000254eccf in handle_connection (arg=0xb7bcc50) at /root/work/stonedb-dev-20230506/sql/conn_handler/connection_handler_per_thread.cc:313
#10 0x0000000002c1e50e in pfs_spawn_thread (arg=0xb134420) at /root/work/stonedb-dev-20230506/storage/perfschema/pfs.cc:2197
#11 0x00007fc3250c31ca in start_thread () from /lib64/libpthread.so.0
#12 0x00007fc321d42e73 in clone () from /lib64/libc.so.6
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
Expected behavior
No response
How To Reproduce
Environment
Are you interested in submitting a PR to solve the problem?