Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: select...in...An error was reported when the date was included #829

Closed
3 tasks done
shangyanwen opened this issue Oct 27, 2022 · 0 comments · Fixed by #961
Closed
3 tasks done

bug: select...in...An error was reported when the date was included #829

shangyanwen opened this issue Oct 27, 2022 · 0 comments · Fixed by #961
Assignees
Labels
A-bug Something isn't working prio: high High priority

Comments

@shangyanwen
Copy link
Contributor

shangyanwen commented Oct 27, 2022

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 t1 WHERE t1_datetime IN ('1111-11-11 11:11:11','1111-11-13 0:0:0');

ERROR 1105 (HY000): Tianmu other specific error

Expected behavior

#####Here is the result of innodb execution
SELECT * FROM t1 WHERE t1_datetime IN ('1111-11-11 11:11:11','1111-11-13 0:0:0');

+------------+----------+------------+------------+----------------------+---------+----------------------+---------------------+
| t1_tinyint | t1_int   | t1_bigint  | t1_decimal | t1_text              | t1_char | t1_varchar           | t1_datetime         |
+------------+----------+------------+------------+----------------------+---------+----------------------+---------------------+
|          1 |   123456 |  987654321 |     122.32 | zzzzzzzzzzzzzzzzzzzz | aaa     | aaaaaaaaaaaaaaaaaaaa | 1111-11-11 11:11:11 |
|          0 |  1023456 |  887654321 |     222.32 | yyyyyyyyyyyyyyyyyyyy | aaa     | bbbbbbbbbbbbbbbbbbbb | 1111-11-11 11:11:11 |
|          1 |  -123456 | -987654321 |    -122.32 | zzzzzzzzzzzzzzzzzzzz | bbb     | aaaaaaaaaaaaaaaaaaaa | 1111-11-11 11:11:11 |
|          0 | -1023456 | -887654321 |    -222.32 | xxxxxxxxxxxxxxxxxxxx | bbb     | bbbbbbbbbbbbbbbbbbbb | 1111-11-11 11:11:11 |
+------------+----------+------------+------------+----------------------+---------+----------------------+---------------------+
4 rows in set (0.00 sec)

How To Reproduce

CREATE TABLE t1
(
 t1_tinyint TINYINT DEFAULT 0,
 t1_int INT DEFAULT NULL,
 t1_bigint BIGINT,
 t1_decimal DECIMAL(5,2),
 t1_text TEXT,
 t1_char CHAR(5),
 t1_varchar VARCHAR(255) DEFAULT 'hello world!',
 t1_datetime DATETIME
)ENGINE=tianmu;

INSERT INTO t1 VALUES();
INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, '', '', '', NULL);
INSERT INTO t1 VALUES(1, 123456, 987654321, 122.32, repeat('z', 20), 'aaa', repeat('a', 20), '1111-11-11 11:11:11');
INSERT INTO t1 VALUES(0, 1023456, 887654321, 222.32, repeat('y', 20), 'aaa', repeat('b', 20), '1111-11-11 11:11:11');
INSERT INTO t1 VALUES(1, -123456, -987654321, -122.32, repeat('z', 20), 'bbb', repeat('a', 20), '1111-11-11 11:11:11');
INSERT INTO t1 VALUES(0, -1023456, -887654321, -222.32, repeat('x', 20), 'bbb', repeat('b', 20), '1111-11-11 11:11:11');

SELECT * FROM t1 WHERE t1_datetime IN ('1111-11-11 11:11:11','1111-11-13 0:0:0');

Environment

Ver 14.14 Distrib 5.7.36-StoneDB, for Linux (x86_64) using EditLine wrapper

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

  • Yes, I will!
@shangyanwen shangyanwen added the A-bug Something isn't working label Oct 27, 2022
@konghaiya konghaiya self-assigned this Oct 27, 2022
@shangyanwen shangyanwen added P01 Low-severity bugs refer to minor errors B-testing Testing tools and infrastructure labels Oct 27, 2022
@shangyanwen shangyanwen added this to the stonedb_5.7_v1.0.2 milestone Oct 27, 2022
@shangyanwen shangyanwen added prio: high High priority and removed B-testing Testing tools and infrastructure P01 Low-severity bugs refer to minor errors labels Oct 31, 2022
konghaiya added a commit to konghaiya/stonedb that referenced this issue Nov 17, 2022
…luded(stoneatom#829)

Cause:
There is a problem with the initialization function of datetime type. The object type is not assigned.
Solution:
Add assignment logic for types.
konghaiya added a commit to konghaiya/stonedb that referenced this issue Nov 17, 2022
…luded(stoneatom#829)

Cause:
There is a problem with the initialization function of datetime type. The object type is not assigned.
Solution:
Add assignment logic for types.
mergify bot pushed a commit that referenced this issue Nov 17, 2022
…luded(#829)

Cause:
There is a problem with the initialization function of datetime type. The object type is not assigned.
Solution:
Add assignment logic for types.
@mergify mergify bot closed this as completed in #961 Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working prio: high High priority
Projects
Development

Successfully merging a pull request may close this issue.

2 participants