Commit 7553eece authored by Timothy Smith's avatar Timothy Smith

Merge from upstream (my:5.0-bugteam)

parents 0632a93e 790edf00
...@@ -1779,7 +1779,7 @@ static int read_and_execute(bool interactive) ...@@ -1779,7 +1779,7 @@ static int read_and_execute(bool interactive)
the very beginning of a text file when the very beginning of a text file when
you save the file using "Unicode UTF-8" format. you save the file using "Unicode UTF-8" format.
*/ */
if (!line_number && if (line && !line_number &&
(uchar) line[0] == 0xEF && (uchar) line[0] == 0xEF &&
(uchar) line[1] == 0xBB && (uchar) line[1] == 0xBB &&
(uchar) line[2] == 0xBF) (uchar) line[2] == 0xBF)
...@@ -2081,37 +2081,6 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2081,37 +2081,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
continue; continue;
} }
} }
else if (!*ml_comment && !*in_string &&
(end_of_line - pos) >= 10 &&
!my_strnncoll(charset_info, (uchar*) pos, 10,
(const uchar*) "delimiter ", 10))
{
// Flush previously accepted characters
if (out != line)
{
buffer.append(line, (uint32) (out - line));
out= line;
}
// Flush possible comments in the buffer
if (!buffer.is_empty())
{
if (com_go(&buffer, 0) > 0) // < 0 is not fatal
DBUG_RETURN(1);
buffer.length(0);
}
/*
Delimiter wants the get rest of the given line as argument to
allow one to change ';' to ';;' and back
*/
buffer.append(pos);
if (com_delimiter(&buffer, pos) > 0)
DBUG_RETURN(1);
buffer.length(0);
break;
}
else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter)) else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
{ {
// Found a statement. Continue parsing after the delimiter // Found a statement. Continue parsing after the delimiter
...@@ -2156,7 +2125,14 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2156,7 +2125,14 @@ static bool add_line(String &buffer,char *line,char *in_string,
} }
else if (!*ml_comment && (!*in_string && (inchar == '#' || else if (!*ml_comment && (!*in_string && (inchar == '#' ||
inchar == '-' && pos[1] == '-' && inchar == '-' && pos[1] == '-' &&
my_isspace(charset_info,pos[2])))) /*
The third byte is either whitespace or is the
end of the line -- which would occur only
because of the user sending newline -- which is
itself whitespace and should also match.
*/
(my_isspace(charset_info,pos[2]) ||
!pos[2]))))
{ {
// Flush previously accepted characters // Flush previously accepted characters
if (out != line) if (out != line)
......
# include/wait_condition.inc
#
# SUMMARY
#
# Waits until the passed statement returns true, or the operation
# times out.
#
# USAGE
#
# let $wait_condition=
# SELECT c = 3 FROM t;
# --source include/wait_condition.inc
#
# OR
#
# let $wait_timeout= 60; # Override default 30 seconds with 60.
# let $wait_condition=
# SELECT c = 3 FROM t;
# --source include/wait_condition.inc
# --echo Executed the test condition $wait_condition_reps times
#
# EXAMPLE
# events_bugs.test, events_time_zone.test
#
--disable_query_log
let $wait_counter= 300;
if ($wait_timeout)
{
let $wait_counter= `SELECT $wait_timeout * 10`;
}
# Reset $wait_timeout so that its value won't be used on subsequent
# calls, and default will be used instead.
let $wait_timeout= 0;
# Keep track of how many times the wait condition is tested
# This is used by some tests (e.g., main.status)
let $wait_condition_reps= 0;
while ($wait_counter)
{
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
{
let $wait_counter= 0;
}
if (!$success)
{
real_sleep 0.1;
dec $wait_counter;
}
}
if (!$success)
{
echo Timeout in wait_condition.inc for $wait_condition;
}
--enable_query_log
...@@ -38,6 +38,8 @@ t2 ...@@ -38,6 +38,8 @@ t2
t3 t3
Tables_in_test Tables_in_test
t1 t1
delimiter
1
_ _
Test delimiter : from command line Test delimiter : from command line
a a
......
...@@ -78,3 +78,34 @@ alter table t1 modify a varchar(255); ...@@ -78,3 +78,34 @@ alter table t1 modify a varchar(255);
select length(a) from t1; select length(a) from t1;
length(a) length(a)
6 6
select 0b01000001;
0b01000001
A
select 0x41;
0x41
A
select b'01000001';
b'01000001'
A
select x'41', 0+x'41';
x'41' 0+x'41'
A 65
select N'abc', length(N'abc');
abc length(N'abc')
abc 3
select N'', length(N'');
length(N'')
0
select '', length('');
length('')
0
select b'', 0+b'';
b'' 0+b''
0
select x'', 0+x'';
x'' 0+x''
0
select 0x;
ERROR 42S22: Unknown column '0x' in 'field list'
select 0b;
ERROR 42S22: Unknown column '0b' in 'field list'
...@@ -84,4 +84,3 @@ SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, ...@@ -84,4 +84,3 @@ SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
FROM information_schema.columns FROM information_schema.columns
$my_where $my_where
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# suite/funcs_1/datadict/tables.inc
#
# Auxiliary script to be sourced by
# is_tables_<engine>.test
#
# The variable $engine_type has to be assigned before sourcing ths script.
#
# Author:
# 2008-06-04 mleich Create this script based on older scripts and new code.
#
# Just have some tables within different databases.
--disable_warnings
DROP DATABASE IF EXISTS test1;
DROP DATABASE IF EXISTS test2;
--enable_warnings
CREATE DATABASE test1;
CREATE DATABASE test2;
--replace_result $engine_type <engine_to_be_used>
eval CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = $engine_type;
--replace_result $engine_type <engine_to_be_used>
eval CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = $engine_type;
--replace_result $engine_type <engine_to_be_used>
eval CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = $engine_type;
--source suite/funcs_1/datadict/tables2.inc
SHOW TABLES FROM test1;
SHOW TABLES FROM test2;
# Create a low privileged user.
# Note: The database db_datadict is just a "home" for the low privileged user
# and not in the focus of testing.
--error 0,ER_CANNOT_USER
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
GRANT SELECT ON test1.* TO testuser1@localhost;
--echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (testuser1,localhost,testuser1,,test1);
--source suite/funcs_1/datadict/tables2.inc
SHOW TABLES FROM test1;
# The lowprivileged user testuser1 will get here an error.
--disable_abort_on_error
SHOW TABLES FROM test2;
--enable_abort_on_error
--echo # Switch to connection default and close connection testuser1
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
DROP DATABASE test1;
DROP DATABASE test2;
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# #
# Auxiliary script to be sourced by # Auxiliary script to be sourced by
# is_tables_mysql.test # is_tables_mysql.test
# is_tables_mysql_embedded.test
# is_tables_is.test # is_tables_is.test
# is_tables_<engine>.test
# #
# Author: # Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
...@@ -12,28 +12,27 @@ ...@@ -12,28 +12,27 @@
# #
--disable_warnings --disable_warnings
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS test1;
--enable_warnings --enable_warnings
CREATE DATABASE db_datadict; CREATE DATABASE test1;
--source suite/funcs_1/datadict/tables2.inc --source suite/funcs_1/datadict/tables2.inc
# Create a low privileged user. # Create a low privileged user.
# Note: The database db_datadict is just a "home" for the low privileged user # Note: The database test1 is just a "home" for the low privileged user
# and not in the focus of testing. # and not in the focus of testing.
--error 0,ER_CANNOT_USER --error 0,ER_CANNOT_USER
DROP USER testuser1@localhost; DROP USER testuser1@localhost;
CREATE USER testuser1@localhost; CREATE USER testuser1@localhost;
GRANT SELECT ON db_datadict.* TO testuser1@localhost; GRANT SELECT ON test1.* TO testuser1@localhost;
--echo # Establish connection testuser1 (user=testuser1) --echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (testuser1,localhost,testuser1,,db_datadict); connect (testuser1,localhost,testuser1,,test1);
--source suite/funcs_1/datadict/tables2.inc --source suite/funcs_1/datadict/tables2.inc
--echo # Switch to connection default and close connection testuser1 --echo # Switch to connection default and close connection testuser1
connection default; connection default;
disconnect testuser1; disconnect testuser1;
DROP USER testuser1@localhost; DROP USER testuser1@localhost;
DROP DATABASE db_datadict; DROP DATABASE test1;
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
let $innodb_pattern = 'InnoDB free'; let $innodb_pattern = 'InnoDB free';
let $ndb_pattern = 'number_of_replicas'; let $ndb_pattern = 'number_of_replicas';
--vertical_results --vertical_results
# We do not unify the engine name here, because the rowformat is
# specific to the engine.
--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#" --replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#"
eval eval
SELECT *, SELECT *,
...@@ -44,4 +46,3 @@ FROM information_schema.tables ...@@ -44,4 +46,3 @@ FROM information_schema.tables
$my_where $my_where
ORDER BY table_schema,table_name; ORDER BY table_schema,table_name;
--horizontal_results --horizontal_results
# Skip tests which suffer from
# Bug#28309 First insert violates unique constraint
# - was "memory" table empty?
# if the folowing conditions are fulfilled:
# - MySQL Version is 5.0 (Bug is fixed in 5.1 and up)
# - use of embedded server
# - run on a case insensitive filesystem
#
let $value= query_get_value(SHOW VARIABLES LIKE 'lower_case_file_system', Value, 1);
if (`SELECT '$value' = 'ON' AND VERSION() LIKE '5.0%embedded%'`)
{
skip # Test requires backport of fix for Bug#28309 First insert violates unique constraint - was "memory" table empty ?;
}
...@@ -7,7 +7,7 @@ create table tb1 ( ...@@ -7,7 +7,7 @@ create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
......
...@@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101', ...@@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
......
...@@ -55,13 +55,13 @@ f223 year(3), ...@@ -55,13 +55,13 @@ f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0),
f236 char(90), f236 char(90),
f237 char(255) ascii, f237 char(255) ascii,
f238 varchar(0), f238 varchar(0),
f239 varchar(20000) binary, f239 varchar(20000) binary,
f240 varchar(2000) unicode, f240 varchar(2000),
f241 char(100) unicode f241 char(100)
) engine = innodb; ) engine = innodb;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
......
...@@ -55,12 +55,12 @@ f223 year(3), ...@@ -55,12 +55,12 @@ f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f236 char(95) unicode, f236 char(95),
f241 char(255) unicode, f241 char(255),
f237 char(130) binary, f237 char(130) binary,
f238 varchar(25000) binary, f238 varchar(25000) binary,
f239 varbinary(0), f239 varbinary(0),
f240 varchar(1200) unicode f240 varchar(1200)
) engine = memory; ) engine = memory;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
......
...@@ -7,7 +7,7 @@ create table tb1 ( ...@@ -7,7 +7,7 @@ create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f4 tinytext unicode, f4 tinytext,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
......
...@@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101', ...@@ -10,7 +10,7 @@ f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
......
...@@ -63,13 +63,13 @@ f231 VARBINARY(192), ...@@ -63,13 +63,13 @@ f231 VARBINARY(192),
f232 VARBINARY(27), f232 VARBINARY(27),
f233 VARBINARY(64), f233 VARBINARY(64),
f234 VARBINARY(192), f234 VARBINARY(192),
f235 char(255) unicode, f235 char(255),
f236 char(60) ascii, f236 char(60) ascii,
f237 char(255) binary, f237 char(255) binary,
f238 varchar(0) binary, f238 varchar(0) binary,
f239 varbinary(1000), f239 varbinary(1000),
f240 varchar(120) unicode, f240 varchar(120),
f241 char(100) unicode, f241 char(100),
f242 bit(30) f242 bit(30)
) engine = myisam; ) engine = myisam;
......
USE test;
drop table if exists tb3 ;
create table tb3 (
f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101',
f121 tinytext,
f122 text,
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99,
f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill,
f154 decimal (0),
f155 decimal (64),
f156 decimal (0) unsigned,
f157 decimal (64) unsigned,
f158 decimal (0) zerofill,
f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill,
f162 decimal (0,0),
f163 decimal (63,30),
f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill,
f170 numeric,
f171 numeric unsigned,
f172 numeric zerofill,
f173 numeric unsigned zerofill,
f174 numeric (0),
f175 numeric (64)
) engine = innodb;
Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase x.x.x.1: Testcase x.x.x.1:
----------------- -----------------
DROP TABLE IF EXISTS t0, t1, t2; DROP TABLE IF EXISTS t0, t1, t2;
CREATE TABLE t0 (col1 char(50)) ENGINE=innodb; CREATE TABLE t0 (col1 CHAR(50))
CREATE TABLE t1 (id INT NOT NULL, col1 char(50), ENGINE = <engine_to_be_tested>;
PRIMARY KEY (id)) ENGINE=innodb; CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
ENGINE = <engine_to_be_tested>;
CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
INDEX par_ind (f_id), col1 char(50), INDEX par_ind (f_id), col1 CHAR(50),
FOREIGN KEY (f_id) REFERENCES t1(id) FOREIGN KEY (f_id) REFERENCES t1(id) ON DELETE SET NULL)
ON DELETE SET NULL) ENGINE=innodb; ENGINE = <engine_to_be_tested>;
insert into t1 values (1,'Department A'); INSERT INTO t1 VALUES (1,'Department A');
insert into t1 values (2,'Department B'); INSERT INTO t1 VALUES (2,'Department B');
insert into t1 values (3,'Department C'); INSERT INTO t1 VALUES (3,'Department C');
insert into t2 values (1,2,'Emp 1'); INSERT INTO t2 VALUES (1,2,'Emp 1');
insert into t2 values (2,2,'Emp 2'); INSERT INTO t2 VALUES (2,2,'Emp 2');
insert into t2 values (3,2,'Emp 3'); INSERT INTO t2 VALUES (3,2,'Emp 3');
create trigger trig after insert on t0 for each row CREATE TRIGGER trig AFTER INSERT ON t0 FOR EACH ROW
delete from t1 where col1=new.col1; DELETE FROM t1 WHERE col1 = new.col1;
select * from t2; SELECT * FROM t2;
id f_id col1 id f_id col1
1 2 Emp 1 1 2 Emp 1
2 2 Emp 2 2 2 Emp 2
3 2 Emp 3 3 2 Emp 3
lock tables t0 write, t1 write; LOCK TABLES t0 WRITE, t1 WRITE;
insert into t0 values ('Department B'); INSERT INTO t0 VALUES ('Department B');
unlock tables; UNLOCK TABLES;
select * from t2; SELECT * FROM t2;
id f_id col1 id f_id col1
1 NULL Emp 1 1 NULL Emp 1
2 NULL Emp 2 2 NULL Emp 2
3 NULL Emp 3 3 NULL Emp 3
drop trigger trig; DROP TRIGGER trig;
drop table t2, t1; DROP TABLE t2, t1;
Testcase x.x.x.2: Testcase x.x.x.2:
----------------- -----------------
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (id INT NOT NULL, col1 char(50), CREATE TABLE t1 (id INT NOT NULL, col1 CHAR(50), PRIMARY KEY (id))
PRIMARY KEY (id)) ENGINE=innodb; ENGINE = <engine_to_be_tested>;
CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT, CREATE TABLE t2 (id INT PRIMARY KEY, f_id INT,
INDEX par_ind (f_id), col1 char(50), INDEX par_ind (f_id), col1 CHAR(50),
FOREIGN KEY (f_id) REFERENCES t1(id) FOREIGN KEY (f_id) REFERENCES t1(id) ON UPDATE CASCADE)
ON UPDATE CASCADE) ENGINE=innodb; ENGINE = <engine_to_be_tested>;
insert into t1 values (1,'Department A'); INSERT INTO t1 VALUES (1,'Department A');
insert into t1 values (2,'Department B'); INSERT INTO t1 VALUES (2,'Department B');
insert into t1 values (3,'Department C'); INSERT INTO t1 VALUES (3,'Department C');
insert into t2 values (1,2,'Emp 1'); INSERT INTO t2 VALUES (1,2,'Emp 1');
insert into t2 values (2,3,'Emp 2'); INSERT INTO t2 VALUES (2,3,'Emp 2');
insert into t2 values (3,4,'Emp 3'); insert into t2 VALUES (3,4,'Emp 3');
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test/t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `t1` (`id`) ON UPDATE CASCADE) ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test/t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `t1` (`id`) ON UPDATE CASCADE)
create trigger tr_t2 before insert on t2 for each row CREATE TRIGGER tr_t2 BEFORE INSERT ON t2 FOR EACH ROW
insert into t1 values(new.f_id, concat('New Department ', new.f_id)); INSERT INTO t1 VALUES(new.f_id, CONCAT('New Department ', new.f_id));
lock tables t1 write, t2 write; LOCK TABLES t1 WRITE, t2 WRITE;
insert into t2 values (3,4,'Emp 3'); INSERT INTO t2 VALUES (3,4,'Emp 3');
unlock tables; UNLOCK TABLES;
select * from t1; SELECT * FROM t1;
id col1 id col1
1 Department A 1 Department A
2 Department B 2 Department B
3 Department C 3 Department C
4 New Department 4 4 New Department 4
select * from t2; SELECT * FROM t2;
id f_id col1 id f_id col1
1 2 Emp 1 1 2 Emp 1
2 3 Emp 2 2 3 Emp 2
3 4 Emp 3 3 4 Emp 3
drop trigger tr_t2; DROP TRIGGER tr_t2;
drop table t2, t1, t0; DROP TABLE t2, t1, t0;
Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test) Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test)
------------------------------------------------------------------- -------------------------------------------------------------------
DROP TABLE test.tb3;
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1
(
f1 CHAR UNICODE,
f2 CHAR(0) UNICODE,
f3 CHAR(10) UNICODE,
f5 VARCHAR(0) UNICODE,
f6 VARCHAR(255) UNICODE,
f7 VARCHAR(260) UNICODE,
f8 TEXT UNICODE,
f9 TINYTEXT UNICODE,
f10 MEDIUMTEXT UNICODE,
f11 LONGTEXT UNICODE
) ENGINE = InnoDB;
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references
NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references
NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references
NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 longtext ucs2 ucs2_general_ci
2.0000 mediumtext ucs2 ucs2_general_ci
2.0000 text ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL char ucs2 ucs2_general_ci
NULL varchar ucs2 ucs2_general_ci
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH,
CHARACTER_SET_NAME,
COLLATION_NAME,
COLUMN_TYPE
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text
2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext
2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext
2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext
DROP TABLE t1;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1
(
f1 CHAR UNICODE,
f2 CHAR(0) UNICODE,
f3 CHAR(10) UNICODE,
f5 VARCHAR(0) UNICODE,
f6 VARCHAR(255) UNICODE,
f7 VARCHAR(260) UNICODE
) ENGINE = MEMORY;
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL char ucs2 ucs2_general_ci
NULL varchar ucs2 ucs2_general_ci
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH,
CHARACTER_SET_NAME,
COLLATION_NAME,
COLUMN_TYPE
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
DROP TABLE t1;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1
(
f1 CHAR UNICODE,
f2 CHAR(0) UNICODE,
f3 CHAR(10) UNICODE,
f5 VARCHAR(0) UNICODE,
f6 VARCHAR(255) UNICODE,
f7 VARCHAR(260) UNICODE,
f8 TEXT UNICODE,
f9 TINYTEXT UNICODE,
f10 MEDIUMTEXT UNICODE,
f11 LONGTEXT UNICODE
) ENGINE = MyISAM;
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references
NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references
NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references
NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 longtext ucs2 ucs2_general_ci
2.0000 mediumtext ucs2 ucs2_general_ci
2.0000 text ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL char ucs2 ucs2_general_ci
NULL varchar ucs2 ucs2_general_ci
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH,
CHARACTER_SET_NAME,
COLLATION_NAME,
COLUMN_TYPE
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text
2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext
2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext
2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext
DROP TABLE t1;
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1
(
f1 CHAR UNICODE,
f2 CHAR(0) UNICODE,
f3 CHAR(10) UNICODE,
f5 VARCHAR(0) UNICODE,
f6 VARCHAR(255) UNICODE,
f7 VARCHAR(260) UNICODE,
f8 TEXT UNICODE,
f9 TINYTEXT UNICODE,
f10 MEDIUMTEXT UNICODE,
f11 LONGTEXT UNICODE
) ENGINE = NDB;
SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL test t1 f1 1 NULL YES char 1 2 NULL NULL ucs2 ucs2_general_ci char(1) select,insert,update,references
NULL test t1 f10 9 NULL YES mediumtext 8388607 16777215 NULL NULL ucs2 ucs2_general_ci mediumtext select,insert,update,references
NULL test t1 f11 10 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references
NULL test t1 f2 2 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references
NULL test t1 f3 3 NULL YES char 10 20 NULL NULL ucs2 ucs2_general_ci char(10) select,insert,update,references
NULL test t1 f5 4 NULL YES varchar 0 0 NULL NULL ucs2 ucs2_general_ci varchar(0) select,insert,update,references
NULL test t1 f6 5 NULL YES varchar 255 510 NULL NULL ucs2 ucs2_general_ci varchar(255) select,insert,update,references
NULL test t1 f7 6 NULL YES varchar 260 520 NULL NULL ucs2 ucs2_general_ci varchar(260) select,insert,update,references
NULL test t1 f8 7 NULL YES text 32767 65535 NULL NULL ucs2 ucs2_general_ci text select,insert,update,references
NULL test t1 f9 8 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 longtext ucs2 ucs2_general_ci
2.0000 mediumtext ucs2 ucs2_general_ci
2.0000 text ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL char ucs2 ucs2_general_ci
NULL varchar ucs2 ucs2_general_ci
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH,
CHARACTER_SET_NAME,
COLLATION_NAME,
COLUMN_TYPE
FROM information_schema.columns
WHERE table_schema LIKE 'test%'
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE
2.0000 test t1 f1 char 1 2 ucs2 ucs2_general_ci char(1)
NULL test t1 f2 char 0 0 ucs2 ucs2_general_ci char(0)
2.0000 test t1 f3 char 10 20 ucs2 ucs2_general_ci char(10)
NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
2.0000 test t1 f6 varchar 255 510 ucs2 ucs2_general_ci varchar(255)
2.0000 test t1 f7 varchar 260 520 ucs2 ucs2_general_ci varchar(260)
2.0000 test t1 f8 text 32767 65535 ucs2 ucs2_general_ci text
2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext
2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext
2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext
DROP TABLE t1;
...@@ -6,7 +6,7 @@ create table tb1 ( ...@@ -6,7 +6,7 @@ create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
...@@ -142,7 +142,7 @@ f120 char ascii not null DEFAULT b'101', ...@@ -142,7 +142,7 @@ f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
...@@ -254,13 +254,13 @@ f223 year(3), ...@@ -254,13 +254,13 @@ f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0),
f236 char(90), f236 char(90),
f237 char(255) ascii, f237 char(255) ascii,
f238 varchar(0), f238 varchar(0),
f239 varchar(20000) binary, f239 varchar(20000) binary,
f240 varchar(2000) unicode, f240 varchar(2000),
f241 char(100) unicode f241 char(100)
) engine = innodb; ) engine = innodb;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt'
into table tb4; into table tb4;
...@@ -460,7 +460,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0 ...@@ -460,7 +460,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0
NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references
NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references
NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references
NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NULL test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references
NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references
NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references
...@@ -542,7 +542,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) ...@@ -542,7 +542,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1)
NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references
NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NULL test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references
NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references
NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references
...@@ -645,13 +645,13 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele ...@@ -645,13 +645,13 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references
NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references
NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references
NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references
NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references
NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references
NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references
NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references NULL test tb4 f240 57 NULL YES varchar 2000 2000 NULL NULL latin1 latin1_swedish_ci varchar(2000) select,insert,update,references
NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references NULL test tb4 f241 58 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references
NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references
NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
...@@ -736,6 +736,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME ...@@ -736,6 +736,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 set latin1 latin1_swedish_ci 1.0000 set latin1 latin1_swedish_ci
1.0000 text latin1 latin1_swedish_ci 1.0000 text latin1 latin1_swedish_ci
1.0000 tinytext latin1 latin1_swedish_ci 1.0000 tinytext latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -746,10 +747,6 @@ WHERE table_schema LIKE 'test%' ...@@ -746,10 +747,6 @@ WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 longtext ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -780,7 +777,6 @@ NULL year NULL NULL ...@@ -780,7 +777,6 @@ NULL year NULL NULL
NULL char latin1 latin1_bin NULL char latin1 latin1_bin
NULL char latin1 latin1_swedish_ci NULL char latin1 latin1_swedish_ci
NULL varchar latin1 latin1_swedish_ci NULL varchar latin1 latin1_swedish_ci
NULL char ucs2 ucs2_general_ci
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
...@@ -844,7 +840,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11) ...@@ -844,7 +840,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11)
NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0) NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0)
NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0) NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0)
NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0) NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0)
2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext 1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext
1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text
1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext 1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
...@@ -956,7 +952,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4) ...@@ -956,7 +952,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4)
1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext
1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text
1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext 1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob 1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob
1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob 1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob
1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob 1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob
...@@ -1059,13 +1055,13 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4) ...@@ -1059,13 +1055,13 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4)
NULL test tb4 f224 year NULL NULL NULL NULL year(4) NULL test tb4 f224 year NULL NULL NULL NULL year(4)
1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') 1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') 1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
NULL test tb4 f235 char 0 0 ucs2 ucs2_general_ci char(0) NULL test tb4 f235 char 0 0 latin1 latin1_swedish_ci char(0)
1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90) 1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90)
1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255) 1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255)
NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0) NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0)
1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000) 1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000)
2.0000 test tb4 f240 varchar 2000 4000 ucs2 ucs2_general_ci varchar(2000) 1.0000 test tb4 f240 varchar 2000 2000 latin1 latin1_swedish_ci varchar(2000)
2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) 1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100)
NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
......
This diff is collapsed.
...@@ -244,12 +244,12 @@ f223 year(3), ...@@ -244,12 +244,12 @@ f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f236 char(95) unicode, f236 char(95),
f241 char(255) unicode, f241 char(255),
f237 char(130) binary, f237 char(130) binary,
f238 varchar(25000) binary, f238 varchar(25000) binary,
f239 varbinary(0), f239 varbinary(0),
f240 varchar(1200) unicode f240 varchar(1200)
) engine = memory; ) engine = memory;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt'
into table tb4; into table tb4;
...@@ -620,12 +620,12 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele ...@@ -620,12 +620,12 @@ NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) sele
NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references
NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references
NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references NULL test tb4 f236 52 NULL YES char 95 95 NULL NULL latin1 latin1_swedish_ci char(95) select,insert,update,references
NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references
NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references
NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references
NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references NULL test tb4 f240 57 NULL YES varchar 1200 1200 NULL NULL latin1 latin1_swedish_ci varchar(1200) select,insert,update,references
NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references NULL test tb4 f241 53 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references
NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references
NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
...@@ -702,6 +702,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME ...@@ -702,6 +702,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 char latin1 latin1_swedish_ci 1.0000 char latin1 latin1_swedish_ci
1.0000 enum latin1 latin1_swedish_ci 1.0000 enum latin1 latin1_swedish_ci
1.0000 set latin1 latin1_swedish_ci 1.0000 set latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -712,8 +713,6 @@ WHERE table_schema LIKE 'test%' ...@@ -712,8 +713,6 @@ WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -1006,12 +1005,12 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4) ...@@ -1006,12 +1005,12 @@ NULL test tb4 f223 year NULL NULL NULL NULL year(4)
NULL test tb4 f224 year NULL NULL NULL NULL year(4) NULL test tb4 f224 year NULL NULL NULL NULL year(4)
1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') 1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum')
1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') 1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set')
2.0000 test tb4 f236 char 95 190 ucs2 ucs2_general_ci char(95) 1.0000 test tb4 f236 char 95 95 latin1 latin1_swedish_ci char(95)
2.0000 test tb4 f241 char 255 510 ucs2 ucs2_general_ci char(255) 1.0000 test tb4 f241 char 255 255 latin1 latin1_swedish_ci char(255)
1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130) 1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130)
1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000) 1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000)
NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0) NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0)
2.0000 test tb4 f240 varchar 1200 2400 ucs2 ucs2_general_ci varchar(1200) 1.0000 test tb4 f240 varchar 1200 1200 latin1 latin1_swedish_ci varchar(1200)
NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill
......
...@@ -7,7 +7,7 @@ create table tb1 ( ...@@ -7,7 +7,7 @@ create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f4 tinytext unicode, f4 tinytext,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
...@@ -154,7 +154,7 @@ f120 char ascii not null DEFAULT b'101', ...@@ -154,7 +154,7 @@ f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
...@@ -274,13 +274,13 @@ f231 VARBINARY(192), ...@@ -274,13 +274,13 @@ f231 VARBINARY(192),
f232 VARBINARY(27), f232 VARBINARY(27),
f233 VARBINARY(64), f233 VARBINARY(64),
f234 VARBINARY(192), f234 VARBINARY(192),
f235 char(255) unicode, f235 char(255),
f236 char(60) ascii, f236 char(60) ascii,
f237 char(255) binary, f237 char(255) binary,
f238 varchar(0) binary, f238 varchar(0) binary,
f239 varbinary(1000), f239 varbinary(1000),
f240 varchar(120) unicode, f240 varchar(120),
f241 char(100) unicode, f241 char(100),
f242 bit(30) f242 bit(30)
) engine = myisam; ) engine = myisam;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt'
...@@ -489,7 +489,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0 ...@@ -489,7 +489,7 @@ NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0
NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references
NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references
NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references
NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references NULL test tb1 f4 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references
NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references
NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references
...@@ -579,7 +579,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) ...@@ -579,7 +579,7 @@ NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1)
NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references
NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references
NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references NULL test tb3 f124 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references
NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references
NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references
...@@ -690,13 +690,13 @@ NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(1 ...@@ -690,13 +690,13 @@ NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(1
NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references
NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references
NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references
NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references NULL test tb4 f235 60 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references
NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references
NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references
NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references
NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references
NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references NULL test tb4 f240 65 NULL YES varchar 120 120 NULL NULL latin1 latin1_swedish_ci varchar(120) select,insert,update,references
NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references NULL test tb4 f241 66 NULL YES char 100 100 NULL NULL latin1 latin1_swedish_ci char(100) select,insert,update,references
NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references
NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references
NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references
...@@ -790,6 +790,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME ...@@ -790,6 +790,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 set latin1 latin1_swedish_ci 1.0000 set latin1 latin1_swedish_ci
1.0000 text latin1 latin1_swedish_ci 1.0000 text latin1 latin1_swedish_ci
1.0000 tinytext latin1 latin1_swedish_ci 1.0000 tinytext latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -800,10 +801,6 @@ WHERE table_schema LIKE 'test%' ...@@ -800,10 +801,6 @@ WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 char ucs2 ucs2_general_ci
2.0000 longtext ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
SELECT DISTINCT SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE, DATA_TYPE,
...@@ -896,7 +893,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11) ...@@ -896,7 +893,7 @@ NULL test t9 f3 int NULL NULL NULL NULL int(11)
1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) 1.0000 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1)
1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) 1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1)
1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) 1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1)
2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext 1.0000 test tb1 f4 tinytext 255 255 latin1 latin1_swedish_ci tinytext
1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text
1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext 1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
...@@ -1016,7 +1013,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4) ...@@ -1016,7 +1013,7 @@ NULL test tb2 f107 year NULL NULL NULL NULL year(4)
1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext 1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext
1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text 1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text
1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext 1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext
2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext 1.0000 test tb3 f124 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext
1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob 1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob
1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob 1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob
1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob 1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob
...@@ -1127,13 +1124,13 @@ NULL test tb4 f224 year NULL NULL NULL NULL year(4) ...@@ -1127,13 +1124,13 @@ NULL test tb4 f224 year NULL NULL NULL NULL year(4)
1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27) 1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27)
1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64) 1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64)
1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192) 1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192)
2.0000 test tb4 f235 char 255 510 ucs2 ucs2_general_ci char(255) 1.0000 test tb4 f235 char 255 255 latin1 latin1_swedish_ci char(255)
1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60) 1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60)
1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255) 1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255)
NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0) NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0)
1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000) 1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000)
2.0000 test tb4 f240 varchar 120 240 ucs2 ucs2_general_ci varchar(120) 1.0000 test tb4 f240 varchar 120 120 latin1 latin1_swedish_ci varchar(120)
2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) 1.0000 test tb4 f241 char 100 100 latin1 latin1_swedish_ci char(100)
NULL test tb4 f242 bit NULL NULL NULL NULL bit(30) NULL test tb4 f242 bit NULL NULL NULL NULL bit(30)
NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned
NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
GRANT SELECT ON db_datadict.* TO testuser1@localhost;
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
ORDER BY table_schema,table_name,constraint_name;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
NULL mysql PRIMARY mysql columns_priv PRIMARY KEY
NULL mysql PRIMARY mysql db PRIMARY KEY
NULL mysql PRIMARY mysql func PRIMARY KEY
NULL mysql name mysql help_category UNIQUE
NULL mysql PRIMARY mysql help_category PRIMARY KEY
NULL mysql name mysql help_keyword UNIQUE
NULL mysql PRIMARY mysql help_keyword PRIMARY KEY
NULL mysql PRIMARY mysql help_relation PRIMARY KEY
NULL mysql name mysql help_topic UNIQUE
NULL mysql PRIMARY mysql help_topic PRIMARY KEY
NULL mysql PRIMARY mysql host PRIMARY KEY
NULL mysql PRIMARY mysql proc PRIMARY KEY
NULL mysql PRIMARY mysql procs_priv PRIMARY KEY
NULL mysql PRIMARY mysql tables_priv PRIMARY KEY
NULL mysql PRIMARY mysql time_zone PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
NULL mysql PRIMARY mysql user PRIMARY KEY
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
ORDER BY table_schema,table_name,constraint_name;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
NULL mysql PRIMARY mysql columns_priv PRIMARY KEY
NULL mysql PRIMARY mysql db PRIMARY KEY
NULL mysql PRIMARY mysql func PRIMARY KEY
NULL mysql name mysql help_category UNIQUE
NULL mysql PRIMARY mysql help_category PRIMARY KEY
NULL mysql name mysql help_keyword UNIQUE
NULL mysql PRIMARY mysql help_keyword PRIMARY KEY
NULL mysql PRIMARY mysql help_relation PRIMARY KEY
NULL mysql name mysql help_topic UNIQUE
NULL mysql PRIMARY mysql help_topic PRIMARY KEY
NULL mysql PRIMARY mysql host PRIMARY KEY
NULL mysql PRIMARY mysql proc PRIMARY KEY
NULL mysql PRIMARY mysql procs_priv PRIMARY KEY
NULL mysql PRIMARY mysql tables_priv PRIMARY KEY
NULL mysql PRIMARY mysql time_zone PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY
NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
NULL mysql PRIMARY mysql user PRIMARY KEY
# Switch to connection default and close connection testuser1
DROP USER testuser1@localhost;
DROP DATABASE db_datadict;
This diff is collapsed.
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS test1;
CREATE DATABASE db_datadict; CREATE DATABASE test1;
SELECT *, SELECT *,
LEFT( table_comment, LEFT( table_comment,
IF(INSTR(table_comment,'InnoDB free') = 0 IF(INSTR(table_comment,'InnoDB free') = 0
...@@ -383,7 +383,7 @@ user_comment ...@@ -383,7 +383,7 @@ user_comment
Separator ----------------------------------------------------- Separator -----------------------------------------------------
DROP USER testuser1@localhost; DROP USER testuser1@localhost;
CREATE USER testuser1@localhost; CREATE USER testuser1@localhost;
GRANT SELECT ON db_datadict.* TO testuser1@localhost; GRANT SELECT ON test1.* TO testuser1@localhost;
# Establish connection testuser1 (user=testuser1) # Establish connection testuser1 (user=testuser1)
SELECT *, SELECT *,
LEFT( table_comment, LEFT( table_comment,
...@@ -768,4 +768,4 @@ user_comment ...@@ -768,4 +768,4 @@ user_comment
Separator ----------------------------------------------------- Separator -----------------------------------------------------
# Switch to connection default and close connection testuser1 # Switch to connection default and close connection testuser1
DROP USER testuser1@localhost; DROP USER testuser1@localhost;
DROP DATABASE db_datadict; DROP DATABASE test1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#### suite/funcs_1/storedproc/storedproc_06.inc #### suite/funcs_1/storedproc/storedproc_06.inc
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
--source suite/funcs_1/storedproc/load_sp_tb.inc --source suite/funcs_1/storedproc/load_sp_tb.inc
# ============================================================================== # ==============================================================================
......
...@@ -14,3 +14,4 @@ innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) ...@@ -14,3 +14,4 @@ innodb_storedproc: (changes of WL#2984, using storeproc_nn instead)
memory_storedproc: (changes of WL#2984, using storeproc_nn instead) memory_storedproc: (changes of WL#2984, using storeproc_nn instead)
myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) myisam_storedproc: (changes of WL#2984, using storeproc_nn instead)
ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL
is_tables_ndb: Bug#37198 user without any right on schema sees NDB table
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment