matrixorigin / matrixone

Hyperconverged cloud-edge native database

Home Page:https://docs.matrixorigin.cn/en

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Error in query from result_scan which saved query results

qingxinhome opened this issue · comments

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

last

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

硬件指令架构:
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4

Actual Behavior

mysql> create database db1;
Query OK, 1 row affected (0.01 sec)

mysql> use db1;
Database changed
mysql> set save_query_result = on;
Query OK, 0 rows affected (0.00 sec)

mysql> drop table if exists tt;
Query OK, 0 rows affected (0.00 sec)

mysql> create table tt (a int);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into tt values(1), (2);
Query OK, 2 rows affected (0.01 sec)

mysql> /* save_result */select * from tt;
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)

mysql> select * from result_scan(last_query_id()) as u;
ERROR 20440 (HY000): result file query_result_meta/sys_01900fa0-62a1-7253-adf4-00b2eb6123c2.blk not found

Expected Behavior

mysql> create database db1;
Query OK, 1 row affected (0.01 sec)

mysql> use db1;
Database changed
mysql> set save_query_result = on;
Query OK, 0 rows affected (0.00 sec)

mysql> drop table if exists tt;
Query OK, 0 rows affected (0.00 sec)

mysql> create table tt (a int);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into tt values(1), (2);
Query OK, 2 rows affected (0.01 sec)

mysql> /* save_result */select * from tt;
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)

mysql> select * from result_scan(last_query_id()) as u;
+------+
| a |
+------+
| 1 |
| 2 |
+------+

Steps to Reproduce

create database db1;
use db1;
set save_query_result = on;
drop table if exists tt;
create table tt (a int);
insert into tt values(1), (2);
/* save_result */select * from tt;
select * from result_scan(last_query_id()) as u;

Additional information

No response

mysql client会吞掉/* ... */ 到不了server 所以没保存。

直接用mysql-client跑完之后mo-data/shared/query_resultmo-data/shared/query_result_meta两个目录都是空的,但是用mo-tester跑query_result.sql,两个目录下面是有内容的。

现在非系统租户无法保存query_result了吗?

企业微信截图_17183338437286 可以试试mysql client -c 连接mo 应该就可以保存了