[MDEV-30263] Assertion failure in Protocol::end_statement upon HANDLER READ with invalid timestamp Created: 2022-12-19  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Server, Temporal Types
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

CREATE TABLE t (a TIMESTAMP, KEY(a));
HANDLER t OPEN;
HANDLER t READ a > ('2022-12');
 
# Cleanup
HANDLER t CLOSE;
DROP TABLE t;

10.3 0ca3aaa7

mysqld: /sql/protocol.cc:601: void Protocol::end_statement(): Assertion `0' failed.
221219  2:24:02 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f2c9d1d6662 in __GI___assert_fail (assertion=0x55da312e5be0 "0", file=0x55da312e50e0 "/sql/protocol.cc", line=601, function=0x55da312e5b20 "void Protocol::end_statement()") at assert.c:101
#8  0x000055da2f495d66 in Protocol::end_statement (this=0x62a0000607e8) at /sql/protocol.cc:601
#9  0x000055da2f71faab in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "HANDLER t READ a > ('2022-12')", packet_length=30, is_com_multi=false, is_next_command=false) at /sql/sql_parse.cc:2410
#10 0x000055da2f719154 in do_command (thd=0x62a000060208) at /sql/sql_parse.cc:1398
#11 0x000055da2fadcf88 in do_handle_one_connection (connect=0x608000000ca8) at /sql/sql_connect.cc:1404
#12 0x000055da2fadc884 in handle_one_connection (arg=0x608000000ca8) at /sql/sql_connect.cc:1309
#13 0x000055da3108a375 in pfs_spawn_thread (arg=0x615000004e08) at /storage/perfschema/pfs.cc:1869
#14 0x00007f2c9d381ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x00007f2c9d2a1aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

No obvious immediate problem on a non-debug build.



 Comments   
Comment by Oleksandr Byelkin [ 2023-09-26 ]

Nothing was sent to the client (no error no OK/EOF)

because it goes to an ERROR without actually sending error

Comment by Oleksandr Byelkin [ 2023-09-26 ]

Field_timestamp::store_TIME_with_warning return warning (which is not protocol error) and return error as a result (so upper levels thing error returnned

Generated at Thu Feb 08 10:14:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.