[MCOL-710] Adding a column failed if the column being added is of TEXT/LONGTEXT/BLOB/LONGBLOB Created: 2017-05-09  Updated: 2017-05-10  Resolved: 2017-05-10

Status: Closed
Project: MariaDB ColumnStore
Component/s: DDLProc
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0

Type: Bug Priority: Critical
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-10

 Description   

Build tested: Github source

[root@localhost mariadb-columnstore-server]# git show
commit 349cae544b6bc71910267a3b3b0fa3fb57b0a587
Merge: bd13090 2ecb85c
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu May 4 16:06:16 2017 -0500

Merge pull request #50 from mariadb-corporation/10.2-fixes

10.2 fixes

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 9ef603c14aa3cb8e9fe7f21c9965f6cf3f0a11d8
Merge: 19342ef 82c983e
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Fri May 5 13:09:34 2017 -0500

Merge pull request #169 from mariadb-corporation/MCOL-701

MCOL-701 stop join on BLOB columns

MariaDB [mytest]> alter table datatypetestm add column ctext integer;
Query OK, 0 rows affected (0.08 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]> alter table datatypetestm drop column ctext;
Query OK, 0 rows affected (0.22 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]>
MariaDB [mytest]>
MariaDB [mytest]>
MariaDB [mytest]> alter table datatypetestm add column ctext text;
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: AlterTableProcessor::addColumn CAL0001: we_readthread caught exception boost::bad_any_cast: failed conversion using boost::any_cast
MariaDB [mytest]> alter table datatypetestm add column ctext longtext;
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: AlterTableProcessor::addColumn CAL0001: we_readthread caught exception boost::bad_any_cast: failed conversion using boost::any_cast
MariaDB [mytest]> alter table datatypetestm add column ctext blob;
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: AlterTableProcessor::addColumn CAL0001: we_readthread caught exception boost::bad_any_cast: failed conversion using boost::any_cast
MariaDB [mytest]> alter table datatypetestm add column ctext longblob;
ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed: AlterTableProcessor::addColumn CAL0001: we_readthread caught exception boost::bad_any_cast: failed conversion using boost::any_cast
MariaDB [mytest]>



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2017-05-10 ]

Didn't detect this was a BLOB/TEXT during column fill phase of adding a column. Detection added.

Comment by Daniel Lee (Inactive) [ 2017-05-10 ]

Build verified: Github source 1.1.0

[root@localhost mariadb-columnstore-server]# git show
commit 349cae544b6bc71910267a3b3b0fa3fb57b0a587
Merge: bd13090 2ecb85c
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu May 4 16:06:16 2017 -0500

Merge pull request #50 from mariadb-corporation/10.2-fixes

10.2 fixes

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 03c62656b3750fd5f9759897f048bda8423c4aae
Author: david hill <david.hill@mariadb.com>
Date: Wed May 10 10:35:56 2017 -0500

update post-install

removed test lines of echo adn early exit

diff --git a/oam/install_scripts/post-install b/oam/install_scripts/post-install
index c09e7d5..69dfb58 100755
— a/oam/install_scripts/post-install
+++ b/oam/install_scripts/post-install
@@ -36,10 +36,6 @@ for arg in "$@"; do
echo "post-install: ignoring unknown argument: $arg" 1>&2
fi
done
-
-echo $installdir
-echo $prefix
-exit 0

if [ $user != "root" ]; then
export COLUMNSTORE_INSTALL_DIR=$installdir

[root@localhost ~]# mcsmysql mytest
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 253
Server version: 10.2.5-MariaDB-log Columnstore 1.1.0-1

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]> show tables;
------------------

Tables_in_mytest

------------------

datatypetestm
orders
t1

------------------
3 rows in set (0.00 sec)

MariaDB [mytest]> alter table t1 add column c3 text;
Query OK, 0 rows affected (0.17 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]> alter table t1 add column c4 longtext;
Query OK, 0 rows affected (0.11 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]> alter table t1 add column c5 blob;;
Query OK, 0 rows affected (0.16 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]> alter table t1 add column c6 longblob;
Query OK, 0 rows affected (0.12 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [mytest]> desc t1;
----------------------------------+

Field Type Null Key Default Extra

----------------------------------+

cidx int(11) YES   NULL  
ctext text YES   NULL  
c3 text YES   NULL  
c4 longtext YES   NULL  
c5 blob YES   NULL  
c6 longblob YES   NULL  

----------------------------------+
6 rows in set (0.00 sec)

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