mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
ALTER TABLE t1 CONVERT TO should also change the default character set.
Forgot to do it in the previous commit.
This commit is contained in:
@@ -360,7 +360,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(10) character set koi8r default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1, DEFAULT CHARACTER SET latin1;
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@@ -214,7 +214,7 @@ select a,hex(a) from t1;
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1, DEFAULT CHARACTER SET latin1;
|
||||
alter table t1 CONVERT TO CHARACTER SET latin1;
|
||||
show create table t1;
|
||||
alter table t1 DEFAULT CHARACTER SET cp1251;
|
||||
show create table t1;
|
||||
|
@@ -1797,8 +1797,12 @@ alter_list_item:
|
||||
$5->name,$4->csname);
|
||||
YYABORT;
|
||||
}
|
||||
Lex->create_info.table_charset= $5;
|
||||
Lex->create_info.used_fields|= HA_CREATE_USED_CHARSET;
|
||||
LEX *lex= Lex;
|
||||
lex->create_info.table_charset= $5;
|
||||
lex->create_info.used_fields|= HA_CREATE_USED_CHARSET;
|
||||
lex->create_info.default_table_charset= $5;
|
||||
lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
|
||||
lex->simple_alter= 0;
|
||||
}
|
||||
| create_table_options_space_separated { Lex->simple_alter=0; }
|
||||
| order_clause { Lex->simple_alter=0; };
|
||||
|
Reference in New Issue
Block a user