[MCOL-3635] Inserting string literals containing '\0' truncates the string after the null terminating character. Created: 2019-11-28  Updated: 2023-03-06  Resolved: 2023-03-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: DMLProc
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Gagan Goel (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None


 Description   

During insertion, CS is truncating a string literal containing a null terminating character to the string before the character. InnoDB however does the insert correctly.

Here is an example:

MariaDB [test]> create table c1 (a varchar(10))engine=columnstore;
Query OK, 0 rows affected (0.218 sec)
 
MariaDB [test]> insert into c1 values ('a\0b');
Query OK, 1 row affected (0.235 sec)
 
MariaDB [test]> select * from c1;
+------+
| a    |
+------+
| a    |
+------+
1 row in set (0.076 sec)
 
MariaDB [test]> create table i1 (a varchar(10));
Query OK, 0 rows affected (0.008 sec)
 
MariaDB [test]> insert into i1 values ('a\0b');
Query OK, 1 row affected (0.052 sec)
 
MariaDB [test]> select * from i1;
+------+
| a    |
+------+
| a b  |
+------+
1 row in set (0.001 sec)



 Comments   
Comment by Todd Stoffel (Inactive) [ 2023-03-06 ]

This ticket was created prior to convergence with the server and may be obsolete. If you find this issue still exists in a modern version, please open a new ticket.

Generated at Thu Feb 08 02:44:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.