[MCOL-3695] ALTER TABLE .. DEFAULT CHARSET does not work Created: 2019-12-25  Updated: 2023-07-02  Resolved: 2023-07-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.4.2
Fix Version/s: Icebox

Type: New Feature Priority: Major
Reporter: Elena Stepanova Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 0
Labels: Compatibility

Issue Links:
Relates
relates to MCOL-130 ALTER TABLE does not support changing... Closed
Epic Link: ColumnStore Compatibility Improvements

 Description   

According to documentation, ALTER TABLE is supposed to allow the same table options as CREATE TABLE. However, it does not seem so:

drop table if exists t1;
create table t1 (a timestamp) engine=Columnstore default charset=utf8;
alter table t1 default charset=utf8;

MariaDB f93bfb9288d020b190f5c73a31223fff6439687d

MariaDB [db]> create table t1 (a timestamp) engine=Columnstore default charset=utf8;
Query OK, 0 rows affected (0.574 sec)
 
MariaDB [db]> alter table t1 default charset=utf8;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

Please also note that something is missing in the error message after "doesn't support".



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-12-26 ]

This is a duplicate of several other feature requests, just can't find them right now. A quick reminder for me to find it later.

Comment by Elena Stepanova [ 2019-12-26 ]

The documentation needs to be fixed accordingly.

Comment by Andrew Hutchings (Inactive) [ 2019-12-26 ]

Documentation doesn't state this is supported: https://mariadb.com/kb/en/columnstore-alter-table/

Comment by Elena Stepanova [ 2019-12-26 ]

Unless I'm missing something, it does.

ALTER TABLE tbl_name
    alter_specification [, alter_specification] ...

alter_specification:
    table_option ...
<...>

Now, there is no table_option definition, but there is table_options which says

table_options:
    table_option [[,] table_option] ...  (see CREATE TABLE options)

and finally at CREATE TABLE options,

CREATE TABLE [IF NOT EXISTS] tbl_name
    (create_definition,...)  
engine=columnstore  [ DEFAULT CHARSET=character-set] 
[COMMENT '[compression=0|1][;][autoincrement=col_name,start_value’]

Maybe I'm reading it wrong, as this is indeed a confusing specification, which is my point.

Comment by Todd Stoffel (Inactive) [ 2023-07-02 ]

The "create date" on this ticket is pre-convergence with MariaDB server. If the issue still exists in a modern version of the engine/plugin please submit a new ticket.

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