-
-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Have you read the Contributing Guidelines on issues?
- I have 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
###SQL
select b.CREATE_TIME AS create_time
from (tb_finance_period_pay a join tb_finance_company_account_change b)
where ((a.id = b.period_pay_id) and (a.pay_status = 2) and
(a.fee_type = 'TARGET') and (b.type = 2))
union
select a.create_time AS create_time
from (tb_finance_period_account a join tb_finance_company_account_change b)
where ((a.id = b.period_account_id) and (b.type = 1) and (a.pay_type = 1) and
(a.period_status = 1))
###ERROR
ERROR 1105 (HY000): The query includes syntax that is not supported by the storage engine. Tianmu: UNION of non-matching columns (column no 2) .
###tianmu.log
[2022-11-03 03:22:45.817792] [9650] [WARN] [exception.cpp:42] MSG: Exception: UNION of non-matching columns (column no 0) ..
STACK TRACE BEGIN
/data/stonedb57/install/bin/mysqld(+0x89e3dc) [0x55c7586373dc]
/data/stonedb57/install/bin/mysqld(Tianmu::core::Query::Preexecute(Tianmu::core::CompiledQuery&, Tianmu::core::ResultSender*, bool)+0x1d4e) [0x55c759314a4e]
/data/stonedb57/install/bin/mysqld(Tianmu::core::Engine::Execute(THD*, LEX*, Query_result*, st_select_lex_unit*)+0x504) [0x55c7592fa824]
/data/stonedb57/install/bin/mysqld(Tianmu::core::Engine::HandleSelect(THD*, LEX*, Query_result*&, unsigned long, int&, int&, int&, int)+0x356) [0x55c7592fb496]
/data/stonedb57/install/bin/mysqld(Tianmu::dbhandler::TIANMU_HandleSelect(THD*, LEX*, Query_result*&, unsigned long, int&, int&, int&, int)+0x39) [0x55c75937a029]
/data/stonedb57/install/bin/mysqld(+0xf07908) [0x55c758ca0908]
/data/stonedb57/install/bin/mysqld(mysql_execute_command(THD*, bool)+0x463c) [0x55c758ca7bdc]
/data/stonedb57/install/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x445) [0x55c758ca9d85]
/data/stonedb57/install/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0xdc2) [0x55c758caabc2]
/data/stonedb57/install/bin/mysqld(do_command(THD*)+0x227) [0x55c758cac177]
/data/stonedb57/install/bin/mysqld(handle_connection+0x2c8) [0x55c758d6bb88]
/data/stonedb57/install/bin/mysqld(pfs_spawn_thread+0x168) [0x55c75926ffa8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f22ebec2609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f22ebc96133]
STACK TRACE END
[2022-11-03 03:22:45.817925] [9650] [INFO] [engine_execute.cpp:455] MSG: Query terminated with exception: select b.CREATE_TIME AS create_time
from (tb_finance_period_pay a join tb_finance_company_account_change b)
where ((a.id = b.period_pay_id) and (a.pay_status = 2) and
(a.fee_type = 'TARGET') and (b.type = 2))
union
select a.create_time AS create_time
from (tb_finance_period_account a join tb_finance_company_account_change b)
where ((a.id = b.period_account_id) and (b.type = 1) and (a.pay_type = 1) and
(a.period_status = 1))
Expected behavior
No ERROR
How To Reproduce
No response
Environment
IP:192.168.30.122
login:/data/stonedb57/install/bin/mysql -uroot -pstonedb123 -S /data/stonedb57/install/tmp/mysql.sock -D db
./mysqld Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: c91a29e
Last commit time: Date: Mon Oct 24 03:25:06 2022 +0000
Build time: Date: Mon 24 Oct 2022 11:09:00 AM UTC
Are you interested in submitting a PR to solve the problem?
- Yes, I will!