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
857 stars 140 forks source link

crash: StoneDB crash when executing the right shift operator #1947

Open ZhengLin-Li opened 11 months ago

ZhengLin-Li commented 11 months ago

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

Describe the problem

StoneDB crash when executing the right shift operator, this crash can be reproduce stabily.

Note: we need to executing the following commands quickly. To reproduce, you can copy paste the following code:

CREATE TABLE t0(c0 INT); 
INSERT INTO t0(c0) VALUE (DEFAULT);
DELETE FROM t0 WHERE ((t0.c0)>>(t0.c0));  
-- note: to reproduce the crash, need to run all commands quickly. Copy this line to let all commands run quickly
image

Expected behavior

Do not crash

How To Reproduce

DROP DATABASE IF EXISTS database5;
CREATE DATABASE database5;
USE database5;

CREATE TABLE t0(c0 INT); 
INSERT INTO t0(c0) VALUE (DEFAULT);
DELETE FROM t0 WHERE ((t0.c0)>>(t0.c0));  
-- note: to reproduce the crash, need to run all commands quickly. Copy this line to let all commands run quickly

Environment

Docker image v1.0.4

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

haitaoguan commented 11 months ago

You can try turn off insert delayed,but batch insert will be affected。 vi my.cnf tianmu_insert_delayed=off

ZhengLin-Li commented 11 months ago

Ok yes, setting tianmu_insert_delayed=0 solved this issue.

By the way, I am developing SQLancer to let it support StoneDB. Do you developers consider this issue as a bug or not?

If it is not a bug, we will do the above operation to avoid this probelm.

haitaoguan commented 11 months ago

We will fix these issues,and you can turn off the insert delay during testing.