stonedb icon indicating copy to clipboard operation
stonedb copied to clipboard

crash: StoneDB crash when executing the right shift operator

Open zhenglin-charlie-li opened this issue 2 years ago • 3 comments
trafficstars

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • [X] I confirm there is no existing issue for this

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?

  • [ ] Yes, I will!

zhenglin-charlie-li avatar Jul 18 '23 05:07 zhenglin-charlie-li

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

haitaoguan avatar Jul 18 '23 06:07 haitaoguan

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.

zhenglin-charlie-li avatar Jul 18 '23 07:07 zhenglin-charlie-li

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

haitaoguan avatar Jul 18 '23 07:07 haitaoguan