stoneatom / stonedb

StoneDB is an Open-Source MySQL HTAP and MySQL-Native DataBase for OLTP, Real-Time Analytics, a counterpart of MySQLHeatWave. (https://stonedb.io)
https://stonedb.io/
GNU General Public License v2.0
862 stars 139 forks source link

bug: create tmp table select, but tmp table has no data #1615

Open davidshiz opened 1 year ago

davidshiz commented 1 year ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

mysql> set default_tmp_storage_engine=tianmu;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t1 (f1 INT);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into t1 values(1),(2);
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> CREATE TEMPORARY TABLE t2 select * from t1;
Query OK, 2 rows affected (0.02 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from t2;
Empty set (0.00 sec)

Expected behavior

mysql> select * from t2;
+------+
| f1   |
+------+
|    1 |
|    2 |
+------+
2 rows in set (0.00 sec)

How To Reproduce

No response

Environment

root@ub01:/stonedb57/install/bin# ./mysqld --version
./mysqld  Ver 5.7.36-StoneDB-v1.0.3.31919be01 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: 31919be01
        Last commit time: Date:   Thu Apr 20 10:19:54 2023 +0800
        Build time: Date: Sun Apr 23 17:43:35 CST 2023

Are you interested in submitting a PR to solve the problem?

RingsC commented 1 year ago

Maybe, enn, the CTAS does not support very well in tianmu.