mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SHOW FIELDS changes, more SQL99 INFORMATION_SCHEMA.COLUMNS compatibility:
Character set is not displayed in "Type" column anymore In "Collation" column NULL instead of BINARY is now displayd for for non-character data types
This commit is contained in:
@ -51,8 +51,8 @@ KEY NAME (NAME));
|
||||
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
|
||||
SHOW FULL COLUMNS FROM t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
GROUP_ID int(10) unsigned binary PRI 0 select,insert,update,references
|
||||
LANG_ID smallint(5) unsigned binary PRI 0 select,insert,update,references
|
||||
GROUP_ID int(10) unsigned NULL PRI 0 select,insert,update,references
|
||||
LANG_ID smallint(5) unsigned NULL PRI 0 select,insert,update,references
|
||||
NAME char(80) latin1_swedish_ci MUL select,insert,update,references
|
||||
DROP TABLE t1;
|
||||
create table t1 (n int);
|
||||
@ -157,7 +157,7 @@ alter table t1 rename t2;
|
||||
alter table t2 rename t1, add c char(10) comment "no comment";
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
i int(10) unsigned binary PRI NULL auto_increment
|
||||
i int(10) unsigned NULL PRI NULL auto_increment
|
||||
c char(10) latin1_swedish_ci YES NULL
|
||||
drop table t1;
|
||||
create table t1 (a int, b int);
|
||||
|
@ -91,28 +91,28 @@ 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;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a datetime latin1_swedish_ci 0000-00-00 00:00:00
|
||||
b time latin1_swedish_ci 00:00:00
|
||||
c date latin1_swedish_ci 0000-00-00
|
||||
d bigint(17) binary 0
|
||||
e double(18,1) binary 0.0
|
||||
f bigint(17) binary 0
|
||||
a datetime NULL 0000-00-00 00:00:00
|
||||
b time NULL 00:00:00
|
||||
c date NULL 0000-00-00
|
||||
d bigint(17) NULL 0
|
||||
e double(18,1) NULL 0.0
|
||||
f bigint(17) NULL 0
|
||||
drop table t2;
|
||||
create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29 20:45:11" AS DATETIME) as dt;
|
||||
describe t2;
|
||||
Field Type Collation Null Key Default Extra
|
||||
d date latin1_swedish_ci 0000-00-00
|
||||
t time latin1_swedish_ci 00:00:00
|
||||
dt datetime latin1_swedish_ci 0000-00-00 00:00:00
|
||||
d date NULL 0000-00-00
|
||||
t time NULL 00:00:00
|
||||
dt datetime NULL 0000-00-00 00:00:00
|
||||
drop table t1,t2;
|
||||
create table t1 (a tinyint);
|
||||
create table t2 (a int) select * from t1;
|
||||
describe t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a tinyint(4) binary YES NULL
|
||||
a tinyint(4) NULL YES NULL
|
||||
describe t2;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a int(11) binary YES NULL
|
||||
a int(11) NULL YES NULL
|
||||
drop table if exists t2;
|
||||
create table t2 (a int, a float) select * from t1;
|
||||
Duplicate column name 'a'
|
||||
|
@ -500,7 +500,7 @@ t1 CREATE TABLE `t1` (
|
||||
) TYPE=MyISAM CHARSET=latin1
|
||||
SHOW FIELDS FROM t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
latin1_f char(32) character set latin1 latin1_bin YES NULL
|
||||
latin1_f char(32) latin1_bin YES NULL
|
||||
ALTER TABLE t1 CHARACTER SET latin1 COLLATE latin1_bin;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
|
@ -14,7 +14,7 @@ Table Create Table
|
||||
) TYPE=MyISAM CHARSET=latin1
|
||||
SHOW FIELDS FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
Field Type Collation Null Key Default Extra
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> char(32) character set koi8r koi8r_general_ci
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> char(32) koi8r_general_ci
|
||||
SET CHARACTER SET cp1251;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
@ -26,7 +26,7 @@ Table Create Table
|
||||
) TYPE=MyISAM CHARSET=latin1
|
||||
SHOW FIELDS FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
Field Type Collation Null Key Default Extra
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> char(32) character set koi8r koi8r_general_ci
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> char(32) koi8r_general_ci
|
||||
SET CHARACTER SET utf8;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
@ -38,7 +38,7 @@ Table Create Table
|
||||
) TYPE=MyISAM CHARSET=latin1
|
||||
SHOW FIELDS FROM таблица;
|
||||
Field Type Collation Null Key Default Extra
|
||||
поле char(32) character set koi8r koi8r_general_ci
|
||||
поле char(32) koi8r_general_ci
|
||||
SET CHARACTER SET koi8r;
|
||||
DROP TABLE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
||||
SET CHARACTER SET default;
|
||||
|
@ -9,36 +9,36 @@ CREATE TABLE gc (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRYCOLLECTION);
|
||||
CREATE TABLE geo (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY);
|
||||
SHOW FIELDS FROM pt;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g point binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g point NULL YES NULL
|
||||
SHOW FIELDS FROM ls;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g linestring binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g linestring NULL YES NULL
|
||||
SHOW FIELDS FROM p;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g polygon binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g polygon NULL YES NULL
|
||||
SHOW FIELDS FROM mpt;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g multipoint binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g multipoint NULL YES NULL
|
||||
SHOW FIELDS FROM mls;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g multilinestring binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g multilinestring NULL YES NULL
|
||||
SHOW FIELDS FROM mp;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g multipolygon binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g multipolygon NULL YES NULL
|
||||
SHOW FIELDS FROM gc;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g geometrycollection binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g geometrycollection NULL YES NULL
|
||||
SHOW FIELDS FROM geo;
|
||||
Field Type Collation Null Key Default Extra
|
||||
fid int(11) binary PRI 0
|
||||
g geometry binary YES NULL
|
||||
fid int(11) NULL PRI 0
|
||||
g geometry NULL YES NULL
|
||||
INSERT INTO pt VALUES
|
||||
(101, PointFromText('POINT(10 10)')),
|
||||
(102, PointFromText('POINT(20 10)')),
|
||||
@ -367,26 +367,26 @@ gm geometry
|
||||
);
|
||||
SHOW FIELDS FROM g1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
pt point binary YES NULL
|
||||
ln linestring binary YES NULL
|
||||
pg polygon binary YES NULL
|
||||
mpt multipoint binary YES NULL
|
||||
mln multilinestring binary YES NULL
|
||||
mpg multipolygon binary YES NULL
|
||||
gc geometrycollection binary YES NULL
|
||||
gm geometry binary YES NULL
|
||||
pt point NULL YES NULL
|
||||
ln linestring NULL YES NULL
|
||||
pg polygon NULL YES NULL
|
||||
mpt multipoint NULL YES NULL
|
||||
mln multilinestring NULL YES NULL
|
||||
mpg multipolygon NULL YES NULL
|
||||
gc geometrycollection NULL YES NULL
|
||||
gm geometry NULL YES NULL
|
||||
ALTER TABLE g1 ADD fid INT NOT NULL;
|
||||
SHOW FIELDS FROM g1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
pt point binary YES NULL
|
||||
ln linestring binary YES NULL
|
||||
pg polygon binary YES NULL
|
||||
mpt multipoint binary YES NULL
|
||||
mln multilinestring binary YES NULL
|
||||
mpg multipolygon binary YES NULL
|
||||
gc geometrycollection binary YES NULL
|
||||
gm geometry binary YES NULL
|
||||
fid int(11) binary 0
|
||||
pt point NULL YES NULL
|
||||
ln linestring NULL YES NULL
|
||||
pg polygon NULL YES NULL
|
||||
mpt multipoint NULL YES NULL
|
||||
mln multilinestring NULL YES NULL
|
||||
mpg multipolygon NULL YES NULL
|
||||
gc geometrycollection NULL YES NULL
|
||||
gm geometry NULL YES NULL
|
||||
fid int(11) NULL 0
|
||||
DROP TABLE g1;
|
||||
SELECT AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))));
|
||||
AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)'))))
|
||||
|
@ -907,7 +907,7 @@ drop table t1;
|
||||
create table t1 (t int not null default 1, key (t)) type=innodb;
|
||||
desc t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
t int(11) binary MUL 1
|
||||
t int(11) NULL MUL 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
number bigint(20) NOT NULL default '0',
|
||||
|
@ -3218,16 +3218,16 @@ show tables from test like "t?";
|
||||
Tables_in_test (t?)
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(11) binary PRI NULL auto_increment select,insert,update,references
|
||||
fld1 int(6) unsigned zerofill binary UNI 000000 select,insert,update,references
|
||||
companynr tinyint(2) unsigned zerofill binary 00 select,insert,update,references
|
||||
auto int(11) NULL PRI NULL auto_increment select,insert,update,references
|
||||
fld1 int(6) unsigned zerofill NULL UNI 000000 select,insert,update,references
|
||||
companynr tinyint(2) unsigned zerofill NULL 00 select,insert,update,references
|
||||
fld3 char(30) latin1_swedish_ci MUL select,insert,update,references
|
||||
fld4 char(35) latin1_swedish_ci select,insert,update,references
|
||||
fld5 char(35) latin1_swedish_ci select,insert,update,references
|
||||
fld6 char(4) latin1_swedish_ci select,insert,update,references
|
||||
show full columns from t2 from test like 'f%';
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
fld1 int(6) unsigned zerofill binary UNI 000000 select,insert,update,references
|
||||
fld1 int(6) unsigned zerofill NULL UNI 000000 select,insert,update,references
|
||||
fld3 char(30) latin1_swedish_ci MUL select,insert,update,references
|
||||
fld4 char(35) latin1_swedish_ci select,insert,update,references
|
||||
fld5 char(35) latin1_swedish_ci select,insert,update,references
|
||||
|
@ -101,7 +101,7 @@ show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
test_set set('val1','val2','val3') latin1_swedish_ci select,insert,update,references
|
||||
name char(20) latin1_swedish_ci YES O'Brien select,insert,update,references O'Brien as default
|
||||
c int(11) binary 0 select,insert,update,references int column
|
||||
c int(11) NULL 0 select,insert,update,references int column
|
||||
drop table t1;
|
||||
create table t1 (a int not null, unique aa (a));
|
||||
show create table t1;
|
||||
@ -156,20 +156,20 @@ drop table t1;
|
||||
create table t1 (a decimal(9,2), b decimal (9,0), e double(9,2), f double(5,0), h float(3,2), i float(3,0));
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a decimal(9,2) binary YES NULL
|
||||
b decimal(9,0) binary YES NULL
|
||||
e double(9,2) binary YES NULL
|
||||
f double(5,0) binary YES NULL
|
||||
h float(3,2) binary YES NULL
|
||||
i float(3,0) binary YES NULL
|
||||
a decimal(9,2) NULL YES NULL
|
||||
b decimal(9,0) NULL YES NULL
|
||||
e double(9,2) NULL YES NULL
|
||||
f double(5,0) NULL YES NULL
|
||||
h float(3,2) NULL YES NULL
|
||||
i float(3,0) NULL YES NULL
|
||||
show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
a decimal(9,2) binary YES NULL select,insert,update,references
|
||||
b decimal(9,0) binary YES NULL select,insert,update,references
|
||||
e double(9,2) binary YES NULL select,insert,update,references
|
||||
f double(5,0) binary YES NULL select,insert,update,references
|
||||
h float(3,2) binary YES NULL select,insert,update,references
|
||||
i float(3,0) binary YES NULL select,insert,update,references
|
||||
a decimal(9,2) NULL YES NULL select,insert,update,references
|
||||
b decimal(9,0) NULL YES NULL select,insert,update,references
|
||||
e double(9,2) NULL YES NULL select,insert,update,references
|
||||
f double(5,0) NULL YES NULL select,insert,update,references
|
||||
h float(3,2) NULL YES NULL select,insert,update,references
|
||||
i float(3,0) NULL YES NULL select,insert,update,references
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
type_bool bool not null,
|
||||
@ -230,15 +230,15 @@ drop table t1;
|
||||
create table t1 (c decimal, d double, f float, r real);
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
c decimal(10,0) binary YES NULL
|
||||
d double binary YES NULL
|
||||
f float binary YES NULL
|
||||
r double binary YES NULL
|
||||
c decimal(10,0) NULL YES NULL
|
||||
d double NULL YES NULL
|
||||
f float NULL YES NULL
|
||||
r double NULL YES NULL
|
||||
drop table t1;
|
||||
create table t1 (c decimal(3,3), d double(3,3), f float(3,3));
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
c decimal(4,3) binary YES NULL
|
||||
d double(4,3) binary YES NULL
|
||||
f float(4,3) binary YES NULL
|
||||
c decimal(4,3) NULL YES NULL
|
||||
d double(4,3) NULL YES NULL
|
||||
f float(4,3) NULL YES NULL
|
||||
drop table t1;
|
||||
|
@ -2,9 +2,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7;
|
||||
CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000));
|
||||
show columns from t1;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a blob binary YES NULL
|
||||
a blob NULL YES NULL
|
||||
b text latin1_swedish_ci YES NULL
|
||||
c blob binary YES NULL
|
||||
c blob NULL YES NULL
|
||||
d mediumtext latin1_swedish_ci YES NULL
|
||||
e longtext latin1_swedish_ci YES NULL
|
||||
CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000));
|
||||
@ -15,7 +15,7 @@ Warning 1244 Converting column 'c' from CHAR to TEXT
|
||||
show columns from t2;
|
||||
Field Type Collation Null Key Default Extra
|
||||
a text latin1_swedish_ci YES NULL
|
||||
b mediumblob binary YES NULL
|
||||
b mediumblob NULL YES NULL
|
||||
c longtext latin1_swedish_ci YES NULL
|
||||
create table t3 (a long, b long byte);
|
||||
show create TABLE t3;
|
||||
@ -72,15 +72,15 @@ show full fields from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
t text latin1_swedish_ci YES NULL select,insert,update,references
|
||||
c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
b blob binary YES NULL select,insert,update,references
|
||||
d varchar(10) binary binary YES NULL select,insert,update,references
|
||||
b blob NULL 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 Collation Null Key Default Extra Privileges Comment
|
||||
t text latin1_swedish_ci YES NULL select,insert,update,references
|
||||
c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
b blob binary YES NULL select,insert,update,references
|
||||
d varchar(10) binary binary YES NULL select,insert,update,references
|
||||
b blob NULL YES NULL select,insert,update,references
|
||||
d varchar(10) binary YES NULL select,insert,update,references
|
||||
unlock tables;
|
||||
select t from t1 where t like "hello";
|
||||
t
|
||||
|
@ -11,8 +11,8 @@ SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
|
||||
create table t1 (f1 float(24),f2 float(52));
|
||||
show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
f1 float binary YES NULL select,insert,update,references
|
||||
f2 double binary YES NULL select,insert,update,references
|
||||
f1 float NULL YES NULL select,insert,update,references
|
||||
f2 double NULL YES NULL select,insert,update,references
|
||||
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
|
||||
Warnings:
|
||||
Warning 1262 Data truncated, out of range for column 'f1' at row 7
|
||||
@ -73,18 +73,18 @@ drop table t1;
|
||||
create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(5,6));
|
||||
show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
f float binary YES NULL select,insert,update,references
|
||||
f2 float binary YES NULL select,insert,update,references
|
||||
f3 float(6,2) binary YES NULL select,insert,update,references
|
||||
d double binary YES NULL select,insert,update,references
|
||||
d2 double binary YES NULL select,insert,update,references
|
||||
d3 double(10,3) binary YES NULL select,insert,update,references
|
||||
de decimal(10,0) binary YES NULL select,insert,update,references
|
||||
de2 decimal(6,0) binary YES NULL select,insert,update,references
|
||||
de3 decimal(5,2) binary YES NULL select,insert,update,references
|
||||
n decimal(10,0) binary YES NULL select,insert,update,references
|
||||
n2 decimal(8,0) binary YES NULL select,insert,update,references
|
||||
n3 decimal(7,6) binary YES NULL select,insert,update,references
|
||||
f float NULL YES NULL select,insert,update,references
|
||||
f2 float NULL YES NULL select,insert,update,references
|
||||
f3 float(6,2) NULL YES NULL select,insert,update,references
|
||||
d double NULL YES NULL select,insert,update,references
|
||||
d2 double NULL YES NULL select,insert,update,references
|
||||
d3 double(10,3) NULL YES NULL select,insert,update,references
|
||||
de decimal(10,0) NULL YES NULL select,insert,update,references
|
||||
de2 decimal(6,0) NULL YES NULL select,insert,update,references
|
||||
de3 decimal(5,2) NULL YES NULL select,insert,update,references
|
||||
n decimal(10,0) NULL YES NULL select,insert,update,references
|
||||
n2 decimal(8,0) NULL YES NULL select,insert,update,references
|
||||
n3 decimal(7,6) NULL YES NULL select,insert,update,references
|
||||
drop table t1;
|
||||
create table t1 (a decimal(7,3) not null, key (a));
|
||||
insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1");
|
||||
|
@ -39,28 +39,28 @@ KEY (options,flags)
|
||||
);
|
||||
show full fields from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(5) unsigned binary PRI NULL auto_increment select,insert,update,references
|
||||
auto int(5) unsigned NULL PRI NULL auto_increment select,insert,update,references
|
||||
string varchar(10) latin1_swedish_ci YES hello select,insert,update,references
|
||||
tiny tinyint(4) binary MUL 0 select,insert,update,references
|
||||
short smallint(6) binary MUL 1 select,insert,update,references
|
||||
medium mediumint(8) binary MUL 0 select,insert,update,references
|
||||
long_int int(11) binary 0 select,insert,update,references
|
||||
longlong bigint(13) binary MUL 0 select,insert,update,references
|
||||
real_float float(13,1) binary MUL 0.0 select,insert,update,references
|
||||
real_double double(16,4) binary YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned binary MUL 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill binary MUL 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned binary MUL 0 select,insert,update,references
|
||||
ulong int(11) unsigned binary MUL 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned binary MUL 0 select,insert,update,references
|
||||
time_stamp timestamp latin1_swedish_ci YES NULL select,insert,update,references
|
||||
date_field date latin1_swedish_ci YES NULL select,insert,update,references
|
||||
time_field time latin1_swedish_ci YES NULL select,insert,update,references
|
||||
date_time datetime latin1_swedish_ci YES NULL select,insert,update,references
|
||||
blob_col blob binary YES NULL select,insert,update,references
|
||||
tinyblob_col tinyblob binary YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob binary select,insert,update,references
|
||||
longblob_col longblob binary select,insert,update,references
|
||||
tiny tinyint(4) NULL MUL 0 select,insert,update,references
|
||||
short smallint(6) NULL MUL 1 select,insert,update,references
|
||||
medium mediumint(8) NULL MUL 0 select,insert,update,references
|
||||
long_int int(11) NULL 0 select,insert,update,references
|
||||
longlong bigint(13) NULL MUL 0 select,insert,update,references
|
||||
real_float float(13,1) NULL MUL 0.0 select,insert,update,references
|
||||
real_double double(16,4) NULL YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned NULL MUL 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill NULL MUL 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned NULL MUL 0 select,insert,update,references
|
||||
ulong int(11) unsigned NULL MUL 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned NULL MUL 0 select,insert,update,references
|
||||
time_stamp timestamp NULL YES NULL select,insert,update,references
|
||||
date_field date NULL YES NULL select,insert,update,references
|
||||
time_field time NULL YES NULL select,insert,update,references
|
||||
date_time datetime NULL YES NULL select,insert,update,references
|
||||
blob_col blob NULL YES NULL select,insert,update,references
|
||||
tinyblob_col tinyblob NULL YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob NULL select,insert,update,references
|
||||
longblob_col longblob NULL select,insert,update,references
|
||||
options enum('one','two','tree') latin1_swedish_ci MUL one select,insert,update,references
|
||||
flags set('one','two','tree') latin1_swedish_ci select,insert,update,references
|
||||
show keys from t1;
|
||||
@ -206,53 +206,53 @@ Warning 1263 Data truncated for column 'options' at row 6
|
||||
update t2 set string="changed" where auto=16;
|
||||
show full columns from t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(5) unsigned binary MUL NULL auto_increment select,insert,update,references
|
||||
auto int(5) unsigned NULL MUL NULL auto_increment select,insert,update,references
|
||||
string varchar(10) latin1_swedish_ci YES new defaul select,insert,update,references
|
||||
tiny tinyint(4) binary MUL 0 select,insert,update,references
|
||||
short smallint(6) binary MUL 0 select,insert,update,references
|
||||
medium mediumint(8) binary MUL 0 select,insert,update,references
|
||||
long_int int(11) binary 0 select,insert,update,references
|
||||
longlong bigint(13) binary MUL 0 select,insert,update,references
|
||||
real_float float(13,1) binary MUL 0.0 select,insert,update,references
|
||||
real_double double(16,4) binary YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned binary 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill binary 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned binary MUL 0 select,insert,update,references
|
||||
ulong int(11) unsigned binary MUL 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned binary MUL 0 select,insert,update,references
|
||||
time_stamp timestamp latin1_swedish_ci YES NULL select,insert,update,references
|
||||
tiny tinyint(4) NULL MUL 0 select,insert,update,references
|
||||
short smallint(6) NULL MUL 0 select,insert,update,references
|
||||
medium mediumint(8) NULL MUL 0 select,insert,update,references
|
||||
long_int int(11) NULL 0 select,insert,update,references
|
||||
longlong bigint(13) NULL MUL 0 select,insert,update,references
|
||||
real_float float(13,1) NULL MUL 0.0 select,insert,update,references
|
||||
real_double double(16,4) NULL YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned NULL 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill NULL 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned NULL MUL 0 select,insert,update,references
|
||||
ulong int(11) unsigned NULL MUL 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned NULL MUL 0 select,insert,update,references
|
||||
time_stamp timestamp NULL YES NULL select,insert,update,references
|
||||
date_field varchar(10) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
time_field time latin1_swedish_ci YES NULL select,insert,update,references
|
||||
date_time datetime latin1_swedish_ci YES NULL select,insert,update,references
|
||||
time_field time NULL YES NULL select,insert,update,references
|
||||
date_time datetime NULL YES NULL select,insert,update,references
|
||||
new_blob_col varchar(20) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
tinyblob_col tinyblob binary YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob binary select,insert,update,references
|
||||
tinyblob_col tinyblob NULL YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob NULL select,insert,update,references
|
||||
options enum('one','two','tree') latin1_swedish_ci MUL one select,insert,update,references
|
||||
flags set('one','two','tree') latin1_swedish_ci select,insert,update,references
|
||||
new_field varchar(10) latin1_swedish_ci new select,insert,update,references
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(5) unsigned binary 0 select,insert,update,references
|
||||
auto int(5) unsigned NULL 0 select,insert,update,references
|
||||
string varchar(10) latin1_swedish_ci YES new defaul select,insert,update,references
|
||||
tiny tinyint(4) binary 0 select,insert,update,references
|
||||
short smallint(6) binary 0 select,insert,update,references
|
||||
medium mediumint(8) binary 0 select,insert,update,references
|
||||
long_int int(11) binary 0 select,insert,update,references
|
||||
longlong bigint(13) binary 0 select,insert,update,references
|
||||
real_float float(13,1) binary 0.0 select,insert,update,references
|
||||
real_double double(16,4) binary YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned binary 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill binary 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned binary 0 select,insert,update,references
|
||||
ulong int(11) unsigned binary 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned binary 0 select,insert,update,references
|
||||
time_stamp timestamp latin1_swedish_ci YES NULL select,insert,update,references
|
||||
tiny tinyint(4) NULL 0 select,insert,update,references
|
||||
short smallint(6) NULL 0 select,insert,update,references
|
||||
medium mediumint(8) NULL 0 select,insert,update,references
|
||||
long_int int(11) NULL 0 select,insert,update,references
|
||||
longlong bigint(13) NULL 0 select,insert,update,references
|
||||
real_float float(13,1) NULL 0.0 select,insert,update,references
|
||||
real_double double(16,4) NULL YES NULL select,insert,update,references
|
||||
utiny tinyint(3) unsigned NULL 0 select,insert,update,references
|
||||
ushort smallint(5) unsigned zerofill NULL 00000 select,insert,update,references
|
||||
umedium mediumint(8) unsigned NULL 0 select,insert,update,references
|
||||
ulong int(11) unsigned NULL 0 select,insert,update,references
|
||||
ulonglong bigint(13) unsigned NULL 0 select,insert,update,references
|
||||
time_stamp timestamp NULL YES NULL select,insert,update,references
|
||||
date_field varchar(10) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
time_field time latin1_swedish_ci YES NULL select,insert,update,references
|
||||
date_time datetime latin1_swedish_ci YES NULL select,insert,update,references
|
||||
time_field time NULL YES NULL select,insert,update,references
|
||||
date_time datetime NULL YES NULL select,insert,update,references
|
||||
new_blob_col varchar(20) latin1_swedish_ci YES NULL select,insert,update,references
|
||||
tinyblob_col tinyblob binary YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob binary select,insert,update,references
|
||||
tinyblob_col tinyblob NULL YES NULL select,insert,update,references
|
||||
mediumblob_col mediumblob NULL select,insert,update,references
|
||||
options enum('one','two','tree') latin1_swedish_ci one select,insert,update,references
|
||||
flags set('one','two','tree') latin1_swedish_ci select,insert,update,references
|
||||
new_field varchar(10) latin1_swedish_ci new select,insert,update,references
|
||||
@ -266,11 +266,11 @@ drop table t2;
|
||||
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, "a" as t2, repeat("a",256) as t3, binary repeat("b",256) as t4 from t1;
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto bigint(17) unsigned binary PRI 0 select,insert,update,references
|
||||
t1 bigint(1) binary 0 select,insert,update,references
|
||||
auto bigint(17) unsigned NULL PRI 0 select,insert,update,references
|
||||
t1 bigint(1) NULL 0 select,insert,update,references
|
||||
t2 char(1) latin1_swedish_ci select,insert,update,references
|
||||
t3 mediumtext latin1_swedish_ci select,insert,update,references
|
||||
t4 mediumtext character set latin1 latin1_bin select,insert,update,references
|
||||
t4 mediumtext latin1_bin select,insert,update,references
|
||||
select * from t2;
|
||||
auto t1 t2 t3 t4
|
||||
11 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
@ -289,9 +289,9 @@ Duplicate column name 'c'
|
||||
create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
|
||||
show full columns from t3;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
c1 int(11) binary YES NULL select,insert,update,references
|
||||
c2 int(11) binary YES NULL select,insert,update,references
|
||||
const bigint(1) binary 0 select,insert,update,references
|
||||
c1 int(11) NULL YES NULL select,insert,update,references
|
||||
c2 int(11) NULL YES NULL select,insert,update,references
|
||||
const bigint(1) NULL 0 select,insert,update,references
|
||||
drop table t1,t2,t3;
|
||||
create table t1 ( myfield INT NOT NULL, UNIQUE INDEX (myfield), unique (myfield), index(myfield));
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user