From 6c2dcd86a3145177028b114def5c9fd3327cfb61 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jun 2002 17:23:33 +0500 Subject: Charset of any string field now can be specified during CREATE TABLE mysql-test/r/alter_table.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/create.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/fulltext.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/innodb.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/merge.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/select.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/show_check.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/symlink.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/type_blob.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS mysql-test/r/type_ranges.result: Fix test result according to new SHOW CREATE TABLE and SHOW FIELDS sql/field.cc: New format for string fields in SHOW CREATE TABLE and SHOW FIELDS sql/mysql_priv.h: pass charset sql/sql_parse.cc: QQ is now fixed :) sql/sql_yacc.yy: New format for string fields in SHOW CREATE TABLE and SHOW FIELDS --- mysql-test/r/alter_table.result | 4 ++-- mysql-test/r/create.result | 4 ++-- mysql-test/r/fulltext.result | 2 +- mysql-test/r/innodb.result | 2 +- mysql-test/r/merge.result | 2 +- mysql-test/r/select.result | 16 ++++++++-------- mysql-test/r/show_check.result | 10 +++++----- mysql-test/r/symlink.result | 4 ++-- mysql-test/r/type_blob.result | 8 ++++---- mysql-test/r/type_ranges.result | 22 +++++++++++----------- 10 files changed, 37 insertions(+), 37 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 0356f14db8a..159421e8f88 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -53,7 +53,7 @@ SHOW FULL COLUMNS FROM t1; Field Type Null Key Default Extra Privileges Comment GROUP_ID int(10) unsigned PRI 0 select,insert,update,references LANG_ID smallint(5) unsigned PRI 0 select,insert,update,references -NAME char(80) MUL select,insert,update,references +NAME char(80) character set latin1 MUL select,insert,update,references DROP TABLE t1; create table t1 (n int); insert into t1 values(9),(3),(12),(10); @@ -120,5 +120,5 @@ alter table t2 rename t1, add c char(10) comment "no comment"; show columns from t1; Field Type Null Key Default Extra i int(10) unsigned PRI NULL auto_increment -c char(10) YES NULL +c char(10) character set latin1 YES NULL drop table t1; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index ef44e840a79..c3438ae211a 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -72,10 +72,10 @@ create table t1(x varchar(50) ); create table t2 select x from t1 where 1=2; describe t1; Field Type Null Key Default Extra -x varchar(50) YES NULL +x varchar(50) character set latin1 YES NULL describe t2; Field Type Null Key Default Extra -x char(50) YES NULL +x char(50) character set latin1 YES NULL drop table t2; create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f; describe t2; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 5ecab7278db..e6598ca9ca4 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -136,7 +136,7 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `ticket` int(11) default NULL, - `inhalt` text, + `inhalt` text character set latin1, KEY `tig` (`ticket`), FULLTEXT KEY `tix` (`inhalt`) ) TYPE=MyISAM diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 89a857ef098..b75248b5d5a 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -805,7 +805,7 @@ create table t1 (a char(20), index (a(5))) type=innodb; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(20) default NULL, + `a` char(20) character set latin1 default NULL, KEY `a` (`a`) ) TYPE=InnoDB drop table t1; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9b72ff26350..6de77f7bdaa 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -172,7 +172,7 @@ show create table t3; Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL default '0', - `b` char(20) default NULL, + `b` char(20) character set latin1 default NULL, KEY `a` (`a`) ) TYPE=MRG_MyISAM UNION=(t1,t2) create table t4 (a int not null, b char(10), key(a)) type=MERGE UNION=(t1,t2); diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 8c8e3b492b6..49ce0608fc5 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3211,17 +3211,17 @@ Field Type Null Key Default Extra Privileges Comment auto int(11) PRI NULL auto_increment select,insert,update,references fld1 int(6) unsigned zerofill UNI 000000 select,insert,update,references companynr tinyint(2) unsigned zerofill 00 select,insert,update,references -fld3 char(30) MUL select,insert,update,references -fld4 char(35) select,insert,update,references -fld5 char(35) select,insert,update,references -fld6 char(4) select,insert,update,references +fld3 char(30) character set latin1 MUL select,insert,update,references +fld4 char(35) character set latin1 select,insert,update,references +fld5 char(35) character set latin1 select,insert,update,references +fld6 char(4) character set latin1 select,insert,update,references show full columns from t2 from test like 'f%'; Field Type Null Key Default Extra Privileges Comment fld1 int(6) unsigned zerofill UNI 000000 select,insert,update,references -fld3 char(30) MUL select,insert,update,references -fld4 char(35) select,insert,update,references -fld5 char(35) select,insert,update,references -fld6 char(4) select,insert,update,references +fld3 char(30) character set latin1 MUL select,insert,update,references +fld4 char(35) character set latin1 select,insert,update,references +fld5 char(35) character set latin1 select,insert,update,references +fld6 char(4) character set latin1 select,insert,update,references show full columns from t2 from test like 's%'; Field Type Null Key Default Extra Privileges Comment show keys from t2; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 3766332cf39..1f83bc61cdc 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -94,13 +94,13 @@ show create table t1 ; Table Create Table t1 CREATE TABLE `t1` ( `test_set` set('val1','val2','val3') NOT NULL default '', - `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', + `name` char(20) character set latin1 default 'O''Brien' COMMENT 'O''Brien as default', `c` int(11) NOT NULL default '0' COMMENT 'int column' ) TYPE=MyISAM COMMENT='it''s a table' show full columns from t1; Field Type Null Key Default Extra Privileges Comment test_set set('val1','val2','val3') select,insert,update,references -name char(20) YES O'Brien select,insert,update,references O'Brien as default +name char(20) character set latin1 YES O'Brien select,insert,update,references O'Brien as default c int(11) 0 select,insert,update,references int column drop table t1; create table t1 (a int not null, unique aa (a)); @@ -133,7 +133,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', - `b` char(10) default NULL, + `b` char(10) character set latin1 default NULL, KEY `b` (`b`) ) TYPE=MyISAM MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; @@ -141,7 +141,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', - `b` varchar(10) default NULL, + `b` varchar(10) character set latin1 default NULL, KEY `b` (`b`) ) TYPE=MyISAM MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK_KEYS=DEFAULT DELAY_KEY_WRITE=0 ROW_FORMAT=default; @@ -149,7 +149,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL default '0', - `b` varchar(10) default NULL, + `b` varchar(10) character set latin1 default NULL, KEY `b` (`b`) ) TYPE=MyISAM drop table t1; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 5626bc0fe11..b5b5b774ee5 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -36,7 +36,7 @@ show create table t9; Table Create Table t9 CREATE TABLE `t9` ( `a` int(11) NOT NULL auto_increment, - `b` char(16) NOT NULL default '', + `b` char(16) character set latin1 NOT NULL default '', `c` int(11) NOT NULL default '0', PRIMARY KEY (`a`) ) TYPE=MyISAM @@ -57,7 +57,7 @@ show create table test_mysqltest.t9; Table Create Table t9 CREATE TABLE `t9` ( `a` int(11) NOT NULL auto_increment, - `b` char(16) NOT NULL default '', + `b` char(16) character set latin1 NOT NULL default '', `c` int(11) NOT NULL default '0', `d` int(11) NOT NULL default '0', PRIMARY KEY (`a`) diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 6778679bda9..c99d22c2889 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -38,15 +38,15 @@ update t1 set c="",b=null where c="1"; lock tables t1 READ; show full fields from t1; Field Type Null Key Default Extra Privileges Comment -t text YES NULL select,insert,update,references -c varchar(10) YES NULL select,insert,update,references +t text character set latin1 YES NULL select,insert,update,references +c varchar(10) character set latin1 YES NULL select,insert,update,references b blob YES NULL select,insert,update,references d varchar(10) binary YES NULL select,insert,update,references lock tables t1 WRITE; show full fields from t1; Field Type Null Key Default Extra Privileges Comment -t text YES NULL select,insert,update,references -c varchar(10) YES NULL select,insert,update,references +t text character set latin1 YES NULL select,insert,update,references +c varchar(10) character set latin1 YES NULL select,insert,update,references b blob YES NULL select,insert,update,references d varchar(10) binary YES NULL select,insert,update,references unlock tables; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 54d8ff87b37..01149b68935 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -40,7 +40,7 @@ KEY (options,flags) show full fields from t1; Field Type Null Key Default Extra Privileges Comment auto int(5) unsigned PRI NULL auto_increment select,insert,update,references -string varchar(10) YES hello select,insert,update,references +string varchar(10) character set latin1 YES hello select,insert,update,references tiny tinyint(4) MUL 0 select,insert,update,references short smallint(6) MUL 1 select,insert,update,references medium mediumint(8) MUL 0 select,insert,update,references @@ -170,7 +170,7 @@ update t2 set string="changed" where auto=16; show full columns from t1; Field Type Null Key Default Extra Privileges Comment auto int(5) unsigned MUL NULL auto_increment select,insert,update,references -string varchar(10) YES new defaul select,insert,update,references +string varchar(10) character set latin1 YES new defaul select,insert,update,references tiny tinyint(4) MUL 0 select,insert,update,references short smallint(6) MUL 0 select,insert,update,references medium mediumint(8) MUL 0 select,insert,update,references @@ -184,19 +184,19 @@ umedium mediumint(8) unsigned MUL 0 select,insert,update,references ulong int(11) unsigned MUL 0 select,insert,update,references ulonglong bigint(13) unsigned MUL 0 select,insert,update,references time_stamp timestamp(14) YES NULL select,insert,update,references -date_field varchar(10) YES NULL select,insert,update,references +date_field varchar(10) character set latin1 YES NULL select,insert,update,references time_field time YES NULL select,insert,update,references date_time datetime YES NULL select,insert,update,references -new_blob_col varchar(20) YES NULL select,insert,update,references +new_blob_col varchar(20) character set latin1 YES NULL select,insert,update,references tinyblob_col tinyblob YES NULL select,insert,update,references mediumblob_col mediumblob select,insert,update,references options enum('one','two','tree') MUL one select,insert,update,references flags set('one','two','tree') select,insert,update,references -new_field varchar(10) new select,insert,update,references +new_field varchar(10) character set latin1 new select,insert,update,references show full columns from t2; Field Type Null Key Default Extra Privileges Comment auto int(5) unsigned 0 select,insert,update,references -string varchar(10) YES new defaul select,insert,update,references +string varchar(10) character set latin1 YES new defaul select,insert,update,references tiny tinyint(4) 0 select,insert,update,references short smallint(6) 0 select,insert,update,references medium mediumint(8) 0 select,insert,update,references @@ -210,15 +210,15 @@ umedium mediumint(8) unsigned 0 select,insert,update,references ulong int(11) unsigned 0 select,insert,update,references ulonglong bigint(13) unsigned 0 select,insert,update,references time_stamp timestamp(14) YES NULL select,insert,update,references -date_field varchar(10) YES NULL select,insert,update,references +date_field varchar(10) character set latin1 YES NULL select,insert,update,references time_field time YES NULL select,insert,update,references date_time datetime YES NULL select,insert,update,references -new_blob_col varchar(20) YES NULL select,insert,update,references +new_blob_col varchar(20) character set latin1 YES NULL select,insert,update,references tinyblob_col tinyblob YES NULL select,insert,update,references mediumblob_col mediumblob select,insert,update,references options enum('one','two','tree') one select,insert,update,references flags set('one','two','tree') select,insert,update,references -new_field varchar(10) new select,insert,update,references +new_field varchar(10) character set latin1 new select,insert,update,references select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null))); auto auto 16 16 @@ -231,8 +231,8 @@ show full columns from t2; Field Type Null Key Default Extra Privileges Comment auto bigint(17) unsigned PRI 0 select,insert,update,references t1 bigint(1) 0 select,insert,update,references -t2 char(1) select,insert,update,references -t3 mediumtext select,insert,update,references +t2 char(1) character set latin1 select,insert,update,references +t3 mediumtext character set latin1 select,insert,update,references t4 mediumblob select,insert,update,references select * from t2; auto t1 t2 t3 t4 -- cgit v1.2.1