Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
None
Description
preview-10.8-MDEV-27265-misc 6e615c62b8 |
MariaDB [test]> create table tc (a int unsigned, b varchar(8)) engine=Columnstore; |
Query OK, 0 rows affected (0.374 sec) |
|
MariaDB [test]> insert into tc values (1,'foo'); |
Query OK, 1 row affected (0.224 sec)
|
|
MariaDB [test]> select a, b, crc32(a,b), crc32(a,'foo'), crc32(1,b), crc32(1,'foo') from tc; |
+------+------+------------+----------------+------------+----------------+ |
| a | b | crc32(a,b) | crc32(a,'foo') | crc32(1,b) | crc32(1,'foo') | |
+------+------+------------+----------------+------------+----------------+ |
| 1 | foo | 2212294583 | 2212294583 | 2212294583 | 2377191190 |
|
+------+------+------------+----------------+------------+----------------+ |
1 row in set (0.076 sec) |
So, whichever argument of the function is read from the table, the result ends up to be wrong.
With a one-argument version it seems to work all right:
MariaDB [test]> select a, b, crc32(b), crc32('foo') from tc; |
+------+------+------------+--------------+ |
| a | b | crc32(b) | crc32('foo') | |
+------+------+------------+--------------+ |
| 1 | foo | 2356372769 | 2356372769 |
|
+------+------+------------+--------------+ |
1 row in set (0.011 sec) |
With a two-argument function and a more conventional engine it also works all right:
MariaDB [test]> create table ti (a int unsigned, b varchar(8)) engine=InnoDB; |
Query OK, 0 rows affected (0.012 sec) |
|
MariaDB [test]> insert into ti values (1,'foo'); |
Query OK, 1 row affected (0.002 sec)
|
|
MariaDB [test]> select a, b, crc32(a,b), crc32(a,'foo'), crc32(1,b), crc32(1,'foo') from ti; |
+------+------+------------+----------------+------------+----------------+ |
| a | b | crc32(a,b) | crc32(a,'foo') | crc32(1,b) | crc32(1,'foo') | |
+------+------+------------+----------------+------------+----------------+ |
| 1 | foo | 2377191190 | 2377191190 | 2377191190 | 2377191190 |
|
+------+------+------------+----------------+------------+----------------+ |
1 row in set (0.000 sec) |
CRC32C function is not a subject of this report, because it's rejected as unsupported by Columnstore right away:
MariaDB [test]> select crc32c(a,b) from tc; |
ERROR 1178 (42000): The storage engine for the table doesn't support MCS-1001: Function 'crc32c' isn't supported. |
Attachments
Issue Links
- is caused by
-
MDEV-27208 Implement 2-ary CRC32() and the CRC32C() function
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is caused by |
Summary | 2-argument CRC32 upon Columnstore table returns a different value | 2-argument CRC32 upon Columnstore table returns a wrong value |
Summary | 2-argument CRC32 upon Columnstore table returns a wrong value | 2-argument CRC32 call upon Columnstore table returns a wrong value |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Marko Mäkelä [ marko ] | Roman [ drrtuy ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Component/s | Server [ 13907 ] | |
Component/s | Storage Engine - ColumnStore [ 17600 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Key |
|
|
Affects Version/s | N/A [ 24311 ] | |
Affects Version/s | N/A [ 14700 ] | |
Workflow | MariaDB v4 [ 161463 ] | MariaDB ColumnStore workflow [ 161616 ] |
Project | MariaDB Server [ 10000 ] | MariaDB ColumnStore [ 10902 ] |
Priority | Critical [ 2 ] | Major [ 3 ] |
Component/s | PrimProc [ 13700 ] | |
Fix Version/s | 6.2.4 [ 27301 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Fix Version/s | 6.3.1 [ 25801 ] | |
Fix Version/s | 6.2.4 [ 27301 ] |