Skip to content

bug: Server crashed, when execute select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A; #981

@davidshiz

Description

@davidshiz

Have you 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

mysql> select * from timetest;
+---------------------+
| val                 |
+---------------------+
| 2010-02-22 18:35:23 |
+---------------------+
1 row in set (0.00 sec)

mysql> select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Expected behavior

mysql> select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A;
+---------------------+------------------------------+
| val                 | val >= '2010-02-22 18:35:23' |
+---------------------+------------------------------+
| 2010-02-22 18:35:23 |                            1 |
+---------------------+------------------------------+
1 row in set (0.00 sec)

How To Reproduce

create table timetest (val timestamp) ENGINE=TIANMU;
insert into timetest values ('2010-02-22 18:35:23');
select val not between '2010-02-22 18:35:23' and '2015-11-23 08:02:45' from (select * from timetest) as A;
select val, val >= '2010-02-22 18:35:23' from (select * from timetest) as A;

Environment

root@ub01:/stonedb57/install/mysql-test# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB-debug 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: 48afa0e19
        Last commit time: Date:   Fri Nov 18 03:22:27 2022 +0000
        Build time: Date: Mon Nov 21 20:13:41 CST 2022
root@ub01:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"

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

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't workingB-SQLSQL layerB-stabilityImprove stonedb stabilization on different platform or archprio: lowLow priority

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions