[MCOL-698] Joining two text/longtext/blob/longblob columns returns an internal error. Created: 2017-05-03 Updated: 2017-05-05 Resolved: 2017-05-05 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Lee (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2017-9 | ||||||||
| Description |
|
Build tested: [root@localhost mariadb-columnstore-server]# git show Merge pull request #45 from mariadb-corporation/FixPackageName Change the package name to match engines format [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #163 from mariadb-corporation/ MariaDB [mytest]> truncate text1; MariaDB [mytest]> truncate text2; MariaDB [mytest]> insert into text1 values (1, "this is a test"); MariaDB [mytest]> insert into text2 values (1, "this is a test"); MariaDB [mytest]> select 'text1' as tableName, length(t1.c2) from text1 t1, text2 t2 where t1.c2 = t2.c2;
------
------ |
| Comments |
| Comment by Daniel Lee (Inactive) [ 2017-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: [root@localhost mariadb-columnstore-server]# git show Merge pull request #45 from mariadb-corporation/FixPackageName Change the package name to match engines format [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #166 from mariadb-corporation/fix-snappy-cpack Fix cpack snappy dependency I got the following error: ERROR 1815 (HY000) at line 2: Internal error: std::bad_alloc | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reopen per my last comment. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This usually means you are out of memory. Please try on a machine with more RAM. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
New review to deal with LONGTEXT eating all the RAM in the datacenter. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: Github source [root@localhost mariadb-columnstore-server]# git show Merge pull request #45 from mariadb-corporation/FixPackageName Change the package name to match engines format [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #164 from mariadb-corporation/ I was already using 18gb of memory. I did another run and here is what I found: There are the two queries I tested: select 'longblob1' as tableName, length(c2) from longblob1 where c2 > ' '; where is c2 is one of the text/longtext/blob/longblob. TEXT: worked BLOB/LONGBLOB: Returned > ERROR 1815 (HY000) at line 1: Internal error: VARBINARY/BLOB in filter or function is not supported. the err.log showed: The first error is expected since VARBINARY/BLOB are not supported in filter. The 2nd error is still an issue. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: Github source [root@localhost mariadb-columnstore-server]# git show Repeat the same tests TEXT: Worked | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I used the following tables for me tests: drop table if exists text1; having one row should work the same, expect two rows back from the join select 'longtext1' as tableName, length(t1.c2) from longtext1 t1, longtext2 t2 where t1.c2 = t2.c2 For BLOB/LONGBLOB, we should handle the condition better, instead of just return an internal error. If such joins joins are not reasonable and it is not supported, then we need failed the query and indicate as such. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Created | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Can't reproduce your longtext problem:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[root@localhost ~]# cd tests Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [mytest]> select count
----------
---------- MariaDB [mytest]> select count
----------
---------- MariaDB [mytest]> select 'longtext1' as tableName, length(t1.c2) from longtext1 t1, longtext2 t2 where t1.c2 = t2.c2; MariaDB [mytest]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It worked with shorter strings. If we cannot handle the query for whatever reason, we need to error it out with appropriate error messages, instead of silently returning an empty set. MariaDB [mytest]> update longtext1 set c2 = 'Hello world'; MariaDB [mytest]> update longtext2 set c2 = 'Hello world'; MariaDB [mytest]> select 'longtext1' as tableName, length(t1.c2) from longtext1 t1, longtext2 t2 where t1.c2 = t2.c2;
----------
---------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Per my last comment | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
New review to error on joins with > 64KB of key data. New behaviour when this is attempted:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: Github source [root@localhost mariadb-columnstore-server]# git show Merge pull request #50 from mariadb-corporation/10.2-fixes 10.2 fixes [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #170 from mariadb-corporation/ > ERROR 1815 (HY000) at line 2: Internal error: Cannot join strings greater than 64KB |