stonedb
stonedb copied to clipboard
feature: incorrect result set.INSERT INTO t1 (a) VALUES(x'FFA5A4ABACA9');The query result is empty
Describe the problem
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
a VARCHAR(100) CHARACTER SET ARMSCII8
)engine=tianmu;
INSERT INTO t1 (a) VALUES(x'616263AC646566');
INSERT INTO t1 (a) VALUES(x'FFA5A4ABACA9');
SELECT *, HEX(a) FROM t1 WHERE a = x'616263AC646566';
#Incorrect test results
Empty set (0.00 sec)
SELECT *, HEX(a) FROM t1 WHERE a = x'FFA5A4ABACA9';
#Incorrect test results
Empty set (0.00 sec)
DROP TABLE t1;
Expected behavior
# Correct test results(note:Innodb test verification, test results are as follows)
SELECT *, HEX(a) FROM t1 WHERE a = x'616263AC646566';
+----+---------+----------------+
| id | a | HEX(a) |
+----+---------+----------------+
| 1 | abc-def | 616263AC646566 |
+----+---------+----------------+
SELECT *, HEX(a) FROM t1 WHERE a = x'FFA5A4ABACA9';
+----+--------+--------------+
| id | a | HEX(a) |
+----+--------+--------------+
| 2 | '(),-. | FFA5A4ABACA9 |
+----+--------+--------------+
How To Reproduce
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
a VARCHAR(100) CHARACTER SET ARMSCII8
)engine=tianmu;
INSERT INTO t1 (a) VALUES(x'616263AC646566');
INSERT INTO t1 (a) VALUES(x'FFA5A4ABACA9');
SELECT *, HEX(a) FROM t1 WHERE a = x'616263AC646566';
SELECT *, HEX(a) FROM t1 WHERE a = x'FFA5A4ABACA9';
DROP TABLE t1;
Environment
[root@dev bin]# ./mysqld --version
./mysqld Ver 5.7.36_v1.0.0_beta-StoneDB for Linux on x86_64 (build-)
build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7
Branch name: stonedb-5.7
Last commit ID: eed32f6
Last commit time: Date: Wed Aug 3 11:19:48 2022 +0800
Build time: Date: Wed Aug 3 13:01:31 CST 2022
Are you interested in submitting a PR to solve the problem?
- [ ] Yes, I will!
mysql> create database test;
Query OK, 1 row affected (0.00 sec)
mysql> use test;
Database changed
mysql> CREATE TABLE t1 (
-> id INT AUTO_INCREMENT PRIMARY KEY,
-> a VARCHAR(100) CHARACTER SET ARMSCII8
-> )engine=tianmu;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO t1 (a) VALUES(x'616263AC646566');
Query OK, 1 row affected (0.01 sec)
mysql> INSERT INTO t1 (a) VALUES(x'FFA5A4ABACA9');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> select * from t1;
+----+---------+
| id | a |
+----+---------+
| 1 | abc-def |
| 2 | '(),-. |
+----+---------+
2 rows in set (0.00 sec)
mysql> INSERT INTO t1 (a) VALUES('FFA5A4ABACA9');
Query OK, 1 row affected (0.00 sec)
mysql> select * from t1;
+----+--------------+
| id | a |
+----+--------------+
| 1 | abc-def |
| 2 | '(),-. |
| 3 | FFA5A4ABACA9 |
+----+--------------+
3 rows in set (0.00 sec)
mysql> select * from t1 where a='FFA5A4ABACA9';
+----+--------------+
| id | a |
+----+--------------+
| 3 | FFA5A4ABACA9 |
+----+--------------+
1 row in set (0.00 sec)
stonedb 5.7_v1.0.1,Reverting to this bug, the problem remains