Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1

into  rhel5-ia64-a.mysql.com:/data0/tsmith/build/51
This commit is contained in:
tsmith@rhel5-ia64-a.mysql.com 2008-03-27 08:20:25 +01:00
commit 3069db1da7
347 changed files with 25728 additions and 75157 deletions

View file

@ -153,6 +153,14 @@ IF(WIN32)
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
ENDIF(WIN32)
# This definition is necessary to work around a bug with Intellisense described
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
# debugger functionality.
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
MESSAGE(STATUS "Detected 64-bit platform.")
ADD_DEFINITIONS("-D_WIN64")
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)
IF(EMBED_MANIFESTS)
# Search for the tools (mt, makecat, signtool) necessary for embedding
# manifests and signing executables with the MySQL AB authenticode cert.

View file

@ -113,6 +113,8 @@ static char *opt_password=0,*current_user=0,
*log_error_file= NULL;
static char **defaults_argv= 0;
static char compatible_mode_normal_str[255];
/* Server supports character_set_results session variable? */
static my_bool server_supports_switching_charsets= TRUE;
static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
@ -1239,11 +1241,27 @@ static void restore_time_zone(FILE *sql_file,
}
/**
Switch charset for results to some specified charset. If the server does not
support character_set_results variable, nothing can be done here. As for
whether something should be done here, future new callers of this function
should be aware that the server lacking the facility of switching charsets is
treated as success.
@note If the server lacks support, then nothing is changed and no error
condition is returned.
@returns whether there was an error or not
*/
static int switch_character_set_results(MYSQL *mysql, const char *cs_name)
{
char query_buffer[QUERY_LENGTH];
size_t query_length;
/* Server lacks facility. This is not an error, by arbitrary decision . */
if (!server_supports_switching_charsets)
return FALSE;
query_length= my_snprintf(query_buffer,
sizeof (query_buffer),
"SET SESSION character_set_results = '%s'",
@ -1457,11 +1475,14 @@ static int connect_to_db(char *host, char *user,char *passwd)
DB_error(&mysql_connection, "when trying to connect");
DBUG_RETURN(1);
}
/*
Don't dump SET NAMES with a pre-4.1 server (bug#7997).
*/
if (mysql_get_server_version(&mysql_connection) < 40100)
{
/* Don't dump SET NAMES with a pre-4.1 server (bug#7997). */
opt_set_charset= 0;
/* Don't switch charsets for 4.1 and earlier. (bug#34192). */
server_supports_switching_charsets= FALSE;
}
/*
As we're going to set SQL_MODE, it would be lost on reconnect, so we
cannot reconnect.

View file

@ -199,7 +199,7 @@ do
;;
*)
AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.]);
See the Installation chapter in the Reference Manual.])
esac
done
@ -380,7 +380,7 @@ case $default_charset in
;;
*)
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.]);
See the Installation chapter in the Reference Manual.])
esac
if test "$default_collation" = default; then
@ -405,7 +405,7 @@ else
Collation $default_collation is not valid for character set $default_charset.
Valid collations are: $default_charset_collations.
See the Installation chapter in the Reference Manual.
]);
])
fi
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],

View file

@ -2,9 +2,9 @@ dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_NDBCLUSTER
dnl ---------------------------------------------------------------------------
NDB_VERSION_MAJOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f1`
NDB_VERSION_MINOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f2`
NDB_VERSION_BUILD=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f3`
NDB_VERSION_MAJOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f1`
NDB_VERSION_MINOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f2`
NDB_VERSION_BUILD=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f3`
NDB_VERSION_STATUS=`echo $VERSION | sed 's/^[[-.0-9]]*//'`
TEST_NDBCLUSTER=""

View file

@ -631,7 +631,7 @@ case $SYSTEM_TYPE in
esac
if test "$CXX_VERSION"
then
AC_MSG_CHECKING("C++ compiler version");
AC_MSG_CHECKING("C++ compiler version")
AC_MSG_RESULT("$CXX $CXX_VERSION")
fi
AC_SUBST(CXX_VERSION)

View file

@ -23,9 +23,19 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION | sed -e 's|[[^0-9.]].*$||;s|$|.|' | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
# We take some made up examples
#
# VERSION 5.1.40sp1-alpha 5.0.34a
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
# MYSQL_BASE_VERSION 5.1 5.0
# MYSQL_VERSION_ID 50140 50034
#
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
# Add previous major version for debian package upgrade path
MYSQL_PREVIOUS_BASE_VERSION=5.0

View file

@ -260,71 +260,6 @@ inline double ulonglong2double(ulonglong value)
#define STACK_DIRECTION -1
/* Optimized store functions for Intel x86 */
#ifndef _WIN64
#define sint2korr(A) (*((int16 *) (A)))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
(((uint32) 255L << 24) | \
(((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])) : \
(((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A)))
#define uint2korr(A) (*((uint16 *) (A)))
/*
ATTENTION !
Please, note, uint3korr reads 4 bytes (not 3) !
It means, that you have to provide enough allocated space !
*/
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
#define uint4korr(A) (*((unsigned long *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
(((uint32) ((uchar) (A)[3])) << 24)) +\
(((ulonglong) ((uchar) (A)[4])) << 32))
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
(((uint32) ((uchar) (A)[1])) << 8) + \
(((uint32) ((uchar) (A)[2])) << 16) + \
(((uint32) ((uchar) (A)[3])) << 24)) + \
(((ulonglong) ((uchar) (A)[4])) << 32) + \
(((ulonglong) ((uchar) (A)[5])) << 40))
#define uint8korr(A) (*((ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A)))
#define int2store(T,A) *((uint16*) (T))= (uint16) (A)
#define int3store(T,A) { *(T)= (uchar) ((A));\
*(T+1)=(uchar) (((uint) (A) >> 8));\
*(T+2)=(uchar) (((A) >> 16)); }
#define int4store(T,A) *((long *) (T))= (long) (A)
#define int5store(T,A) { *(T)= (uchar)((A));\
*((T)+1)=(uchar) (((A) >> 8));\
*((T)+2)=(uchar) (((A) >> 16));\
*((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); }
#define int6store(T,A) { *(T) =(uchar)((A)); \
*((T)+1)=(uchar) (((A) >> 8)); \
*((T)+2)=(uchar) (((A) >> 16)); \
*((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); \
*((T)+5)=(uchar) (((A) >> 40)); }
#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \
*(((long *) &V)+1) = *(((long*) M)+1); } while(0)
#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \
*(((long *) T)+1) = *(((long*) &V)+1); } while(0)
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V), sizeof(float))
#define floatget(V,M) memcpy((uchar*)(&V), (uchar*)(M), sizeof(float))
#define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
#define float8store(V,M) doublestore((V),(M))
#endif /* _WIN64 */
#define HAVE_PERROR
#define HAVE_VFPRINT
#define HAVE_RENAME /* Have rename() as function */

View file

@ -1140,7 +1140,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
*/
/* Optimized store functions for Intel x86 */
#if defined(__i386__) && !defined(_WIN64)
#if defined(__i386__) || defined(_WIN32)
#define sint2korr(A) (*((int16 *) (A)))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
(((uint32) 255L << 24) | \
@ -1152,7 +1152,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
((uint32) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A)))
#define uint2korr(A) (*((uint16 *) (A)))
#ifdef HAVE_purify
#if defined(HAVE_purify) && !defined(_WIN32)
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16))
@ -1164,7 +1164,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
It means, that you have to provide enough allocated space !
*/
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
#endif
#endif /* HAVE_purify && !_WIN32 */
#define uint4korr(A) (*((uint32 *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
@ -1215,9 +1215,8 @@ do { doubleget_union _tmp; \
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float))
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
#define float8store(V,M) doublestore((V),(M))
#endif /* __i386__ */
#else
#ifndef sint2korr
/*
We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines
were done before)
@ -1356,7 +1355,7 @@ do { doubleget_union _tmp; \
#define float8store(V,M) doublestore((V),(M))
#endif /* WORDS_BIGENDIAN */
#endif /* sint2korr */
#endif /* __i386__ OR _WIN32 */
/*
Macro for reading 32-bit integer from network byte order (big-endian)

View file

@ -21,13 +21,14 @@ MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
MYSQLLIBdir= $(libdir)
pkgplugindir = $(pkglibdir)/plugin
EXTRA_DIST = libmysqld.def CMakeLists.txt
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DLIBDIR="\"$(MYSQLLIBdir)\""
-DPLUGINDIR="\"$(pkgplugindir)\""
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
-I$(top_srcdir)/sql/examples \

View file

@ -107,4 +107,15 @@ Error 1146 Table 'mysql.proc' doesn't exist
# -- End of Bug#29958.
# --
create database mysqltestbug26703;
use mysqltestbug26703;
create table `#mysql50#abc``def` ( id int );
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
use test;
drop database mysqltestbug26703;
End of 5.1 tests

View file

@ -14,6 +14,9 @@ Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` int NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
DEFAULT CHARSET=latin1;
@ -22,6 +25,9 @@ Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` inT NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -29,6 +35,9 @@ CONNECTION='mysql://root@127.0.0.1:@/too/many/items/federated/t1';
ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1:@/too/many/items/federated/t1' is not in the correct format
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` iNt NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -36,6 +45,9 @@ CONNECTION='mysql://root@127.0.0.1';
ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1' is not in the correct format
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` iNT NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -45,6 +57,9 @@ ERROR HY000: The foreign data source you are trying to reference does not exist.
DROP TABLE federated.t1;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` Int NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
@ -54,16 +69,25 @@ ERROR HY000: Unable to connect to foreign data source: Access denied for user 'u
DROP TABLE federated.t1;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
`a\\b` InT NOT NULL default 0,
`a\\` int NOT NULL default 0,
`name` varchar(32) NOT NULL default ''
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
INSERT INTO federated.t1 (id, `group`) VALUES (3, 42);
INSERT INTO federated.t1 (id, `a\\b`) VALUES (4, 23);
INSERT INTO federated.t1 (id, `a\\`) VALUES (5, 1);
SELECT * FROM federated.t1;
id name
1 foo
2 fee
id group a\\b a\\ name
1 0 0 0 foo
2 0 0 0 fee
3 42 0 0
4 0 23 0
5 0 0 1
DELETE FROM federated.t1;
DROP TABLE federated.t1;
DROP TABLE IF EXISTS federated.t2;

View file

@ -1306,4 +1306,43 @@ DROP DATABASE mysqltest1;
RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
DROP USER mysqltest_1@localhost;
FLUSH PRIVILEGES;
CREATE DATABASE dbbug33464;
CREATE USER 'userbug33464'@'localhost';
GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost';
userbug33464@localhost dbbug33464
DROP PROCEDURE IF EXISTS sp3;
DROP FUNCTION IF EXISTS fn1;
CREATE PROCEDURE sp3(v1 char(20))
BEGIN
SELECT * from dbbug33464.t6 where t6.f2= 'xyz';
END//
CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER
BEGIN
return 1;
END//
CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER
BEGIN
return 2;
END//
USE dbbug33464;
root@localhost dbbug33464
SELECT fn1();
fn1()
1
SELECT fn2();
fn2()
2
DROP USER 'userbug33464'@'localhost';
DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1'
DROP FUNCTION fn2;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2'
DROP PROCEDURE sp3;
DROP USER 'userbug33464'@'localhost';
use test;
DROP DATABASE dbbug33464;
End of 5.1 tests

View file

@ -1,141 +1,46 @@
Matthias 17.06.2005
-------------------
1. I changed the database test1 (dropped + created in SP test)
to test4.
Please adjust the SP test cases.
2. There is a difference between my definition of
innodb_tb4 + memory_tb4
to the latest table definition used by disha.
Please adjust the table definition if needed.
3. The data load files are product of the Disha data generation script
(downloaded ~20 May ?) + modified by Omer
These load data fit fairly to the table definitions.
2008-02-29 Matthias Leich
=========================
4. How to execute the "small" test with 10 rows per table.
Do NOT set the environment variable NO_REFRESH to a
value <> ''.
Start the test for example by
./mysql-test-run.pl --vardir=/dev/shm/var \
--force --suite=funcs_1 --do-test=myisam
The "result" files fit mostly to this variant.
1. The testsuite "funcs_1" is mostly intended for additional (compared
to the common regression tests stored in mysql-test/t) checks
of features (VIEWS, INFORMATION_SCHEMA, STORED PROCEDURES,...)
introduced with MySQL 5.0.
Any database not in ('mysql','test') and any tables
needed within a testcase ( t/<storage engine>_<test filed>.test )
will be (re)created at the beginning of the test.
2. There were some extensions of this suite when new information_schema
views were introduced. But in most cases the tests for these views
were stored within the regression testsuite (mysql-test/t).
5. How to execute the "big" test with many rows per table.
Replace the directories
suite/funcs_1/data and
suite/funcs_1/r
with the appropriate ones for the "big" test.
Set the environment variable NO_REFRESH to a value <> ''.
Start the test for example by
./mysql-test-run.pl --vardir=/dev/shm/var \
--force --suite=funcs_1 --do-test=myisam
INFORMATION_SCHEMA views introduced with MySQL 5.1
==================================================
ENGINES (partially tested here)
EVENTS (partially tested here)
FILES
GLOBAL_STATUS
GLOBAL_VARIABLES
PARTITIONS
PLUGINS
PROCESSLIST (full tested here)
PROFILING
REFERENTIAL_CONSTRAINTS
SESSION_STATUS
SESSION_VARIABLES
All databases and tables will be (re)created by the script
<storage engine>__load.test .
3. Some hints:
- SHOW TABLES ... LIKE '<pattern>'
does a case sensitive comparison between the tablename and
the pattern.
The names of the tables within the informationschema are in uppercase.
So please use something like
SHOW TABLES FOR information_schema LIKE 'TABLES'
when you intend to get the same non empty result set on OS with and
without case sensitive filesystems and default configuration.
- The name of the data dictionary is 'information_schema' (lowercase).
- Server on OS with filesystem with case sensitive filenames
(= The files 'abc' and 'Abc' can coexist.)
+ default configuration
Example of behaviour:
DROP DATABASE information_schema;
ERROR 42000: Access denied for user ... to database 'information_schema'
DROP DATABASE INFORMATION_SCHEMA;
ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA'
6. I am not sure of the files
./funcs_1/include/create_<whatever>.inc
are in the moment needed. I included them, because I
guess my VIEW testcase example needs them.
I guess the pushed files are far away from being perfect.
It is a 8 hours hack.
Please try them, create missing files and come up with improvements.
Good luck !
Matthias 17.06.2005
===================================================================
Omer 19.06.2005
---------------
1. Changed the structure of the memory_tb3 table to include two
additional column f121, f122. These columns exist for the table in
the other storage engines as TEXT. Since memory does not support
TEXT, Disha did not include them. How ever I am using them in the
Trigger tests so added them to the memory definition as CHAR(50);.
Also modifyed the DataGen_modiy.pl file to account for these two
column when generating the data.
- checked in a new DataGen_modify.pl (create a 'lib' directory
under 'funcs_1').
- checked in a new memory_tb3.txt
2. Added three <storage>_triggers.test files based on Matthias's
structure above.
3. Added three <storage>__triggers.result files
4. Added the Trigger_master.test file in the trigger dierctory
Note: This is not complete and is still under work
5. Created a 'lib' directory and added the DataGen*.pl scripts to it
(exists under the disha suite) but should be here as well).
Omer 19.06.2005
===================================================================
Matthias 12.09.2005
-------------------
Replace the geometry data types by VARBINARY
The removal of the geometry data types was necessary, because the
execution of the funcs_1 testsuite should not depend on the
availability of the geometry feature.
Note: There are servers compiled without the geometry feature.
The columns are not removed, but their data type was changed
VARBINARY. This allows us to omit any changes within the loader
input files or data generation scripts.
The replacement of geometry by VARCHAR allows us to use our
Matthias 12.09.2005
===================================================================
Matthias 14.09.2005
-------------------
The results of the <storage_engine>_views testcases suffer when
executed in "--ps-protocol" mode from the open
Bug#11589: mysqltest, --ps-protocol, strange output,
float/double/real with zerofill .
Implementation of a workaround:
At the beginning of views_master.inc is a variable $have_bug_11589 .
If this varable is set to 1, the ps-protocol will be switched
of for the critical statements.
Matthias 14.09.2005
===================================================================
Carsten 16.09.2005
------------------
1. The results of the datadict_<engine> testcases have been changed in nearly
all occurrencies of --error <n> because now for the INFORMATION_SCHEMA only
the --error 1044 (ERROR 42000: Access denied for user '..' to database
'information_schema') seems to be used.
2. To get identical results when using "--ps-protocol" some SELECTs FROM
information_schema has been wrapped to suppress using ps-protocol because
there are differences.
3. The test using SELECT .. OUTFILE has been disabled due to bug #13202.
4. Fixed datadict_<engine>.result files after the change that added 2 columns to
the VIEWS table (DEFINER varchar(77), SECURITY_TYPE varchar(7)).
===================================================================
Matthias 25.08.2007
-------------------
Data dictionary tests:
Fixes for Bugs 30418,30420,30438,30440
1. Replace error numbers with error names
2. Replace static "InnoDB" (not all time available) used within an
"alter table" by $OTHER_ENGINE_TYPE (set to MEMORY or MyISAM).
Minor adjustment of column data type.
3. Use mysqltest result set sorting in several cases.
4. Avoid any statistics about help tables, because their content
depends on configuration:
developer release - help tables are empty
build release - help tables have content + growing with version
5. Add two help table related tests (one for build, one for developer)
to ensure that informations about help tables within
INFORMATION_SCHEMA.TABLES/STATISTICS are checked.
6. Note about new Bug#30689 at the beginning of the test.
The files with expected results contain incomplete result sets.
7. Fix the NDB variant of the data dictionary test (ndb__datadict) as far as
it was necessary for the bug fixes mentioned above.
General note:
Most INFORMATION_SCHEMA properties (table layout, permissions etc.)
are not affected by our variation of the storage engines except
that some properties of our tables using a specific storage
engine become visible. So it makes sense to decompose
the data dictionary test into a storage engine specific part and
a non storage engine specific part in future.

View file

@ -0,0 +1,53 @@
# suite/funcs_1/datadict/basics_mixed1.inc
#
# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
# 1 Attempt to create tables and views when residing in information_schema
# 1.1 CREATE TABLE
USE information_schema;
let $message= root: create a table with a name of an IS table directly in IS;
let $dd_part1= CREATE TABLE;
let $dd_part2= ( c1 INT );
--source suite/funcs_1/datadict/basics_mixed2.inc
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
--error ER_UNKNOWN_TABLE
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
#
# 1.2 CREATE VIEW
# 1.2.1 Hit on existing INFORMATION_SCHEMA table
--error ER_DBACCESS_DENIED_ERROR
CREATE VIEW tables AS SELECT 'garbage';
--error ER_DBACCESS_DENIED_ERROR
CREATE VIEW tables AS SELECT * FROM information_schema.tables;
# 1.2.2 New view
# ER_DBACCESS_DENIED_ERROR would be better.
--error ER_UNKNOWN_TABLE
CREATE VIEW v1 AS SELECT 'garbage';
# 2 Attempt to create tables and views when residing in information_schema
# 1.1 CREATE TABLE
USE test;
let $message= root: create a table with a name of an IS table from other db;
let $dd_part1= CREATE TABLE information_schema.;
let $dd_part2= ( c1 INT );
--source suite/funcs_1/datadict/basics_mixed2.inc
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
--error ER_UNKNOWN_TABLE
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
#
# Hit on existing INFORMATION_SCHEMA table
--error ER_DBACCESS_DENIED_ERROR
CREATE VIEW information_schema.tables AS SELECT 'garbage';
--error ER_DBACCESS_DENIED_ERROR
CREATE VIEW information_schema.tables AS
SELECT * FROM information_schema.tables;
# New table
# ER_DBACCESS_DENIED_ERROR would be better.
--error ER_UNKNOWN_TABLE
CREATE VIEW information_schema.v1 AS SELECT 'garbage';

View file

@ -0,0 +1,55 @@
#### suite/funcs_1/datadict/basics_mixed2.inc
#
# Auxiliary script to be sourced by suite/funcs_1/datadict/is_basics_mixed1.inc
#
# contains all tables from INFORMATION_SCHEMA
#
# Usage example(snip of script):
# let $dd_part1= CREATE TABLE information_schema.;
# let $dd_part2= ( c1 INT );
# --source suite/funcs_1/datadict/basics_mixed2.inc
#
# We expect to get
# ERROR 42000: Access denied for user 'root'@'localhost'
# to database 'information_schema'
# for every statement.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 schemata $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 tables $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 columns $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 character_sets $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 collations $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 routines $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 statistics $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 views $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 user_privileges $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 schema_privileges $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 table_privileges $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 column_privileges $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 table_constraints $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 key_column_usage $dd_part2;
--error ER_DBACCESS_DENIED_ERROR
eval $dd_part1 triggers $dd_part2;

View file

@ -0,0 +1,42 @@
#### suite/funcs_1/datadict/basics_mixed3.inc
#
# Auxiliary routine to be sourced by suite/funcs_1/t/is_basics_mixed.test
#
# Check if INFORMATION_SCHEMA tables contain a schema_name like 'db_data%'.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
# No column with the name of a database contained in:
# character_sets collations collation_character_set_applicability
# user_privileges
SELECT DISTINCT table_schema FROM information_schema.columns
WHERE table_schema LIKE 'db_data%';
SELECT DISTINCT table_schema FROM information_schema.column_privileges
WHERE table_schema LIKE 'db_data%';
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.key_column_usage
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
SELECT DISTINCT routine_schema FROM information_schema.routines
WHERE routine_schema LIKE 'db_data%';
SELECT DISTINCT schema_name FROM information_schema.schemata
WHERE schema_name LIKE 'db_data%';
SELECT DISTINCT table_schema FROM information_schema.schema_privileges
WHERE table_schema LIKE 'db_data%';
SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
SELECT DISTINCT table_schema FROM information_schema.tables
WHERE table_schema LIKE 'db_data%';
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.table_constraints
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
SELECT DISTINCT table_schema FROM information_schema.table_privileges
WHERE table_schema LIKE 'db_data%';
SELECT DISTINCT trigger_schema,event_object_schema
FROM information_schema.triggers
WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
SELECT DISTINCT table_schema FROM information_schema.views
WHERE table_schema LIKE 'db_data%';

View file

@ -0,0 +1,122 @@
# suite/funcs_1/datadict/charset_collation.inc
#
# Tests checking the content of the information_schema tables
# character_sets
# collations
# collation_character_set_applicability
#
#
# The amount and properties of character_sets/collations depend on the
# build type
# 2007-12 MySQL 5.0
# ---------------------------------------------------------------------
#
# Variant 1 fits to
# version_comment MySQL Enterprise Server (Commercial)
# version_comment MySQL Enterprise Server (GPL)
# version_comment MySQL Classic Server (Commercial)
# version_comment MySQL Pushbuild Edition, build <number>
# (version_comment Source distribution
# and
# compile was without "max" - > no collation 'utf8_general_ci')
#
# Variant 2 fits to
# version_comment MySQL Enterprise Server (GPL)
# version_comment MySQL Classic Server (Commercial)
# version_comment MySQL Pushbuild Edition, build <number>
# (version_comment Source distribution
# and
# compile was without "max" - > collation 'utf8_general_ci' exists)
#
# Difference between variant 1 and 2 is the collation 'utf8_general_ci'.
#
# Variant 3 fits to
# version_comment MySQL Community Server (GPL)
# version_comment MySQL Cluster Server (Commercial)
#
# Difference between variant 3 and 2 is within the collation properties
# IS_COMPILED and SORTLEN.
#
# Created:
# 2007-12-18 mleich - remove the unstable character_set/collation subtests
# from include/datadict-master.inc
# - create this new test
#
# Create a low privileged user.
--error 0, ER_CANNOT_USER
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
--echo # Establish connection con (user=dbdict_test)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (con,localhost,dbdict_test,,);
################################################################################
#
# The original requirements for the following tests were:
#
# 3.2.2.2: Ensure that the table (information_schema.character_sets) shows the
# relevant information on every character set for which the current
# user or PUBLIC have the USAGE privilege.
#
# 3.2.2.3: Ensure that the table (information_schema.character_sets) does not
# show any information on any character set for which the current user
# or PUBLIC have no USAGE privilege.
#
#
# 3.2.3.2: Ensure that the table (information_schema.collations) shows the
# relevant information on every collation for which the current user
# or PUBLIC have the USAGE privilege.
#
# 3.2.3.3: Ensure that the table (information_schema.collations) does not show
# any information on any collations for which the current user and
# PUBLIC have no USAGE privilege.
#
#
# 3.2.4.2: Ensure that the table
# information_schema.collation_character_set_applicability
# shows the relevant information on every collation/character set
# combination for which the current user or PUBLIC have the USAGE
# privilege.
#
# 3.2.4.3: Ensure that the table
# information_schema.collation_character_set_applicability
# does not show any information on any collation/character set
# combinations for which the current user and PUBLIC have no
# USAGE privilege.
#
# Notes (2007-12-19 mleich):
# - The requirements are outdated because grant/revoke privilege for using a
# characterset/collation were never implemented.
# Therefore the tests should simply check the content of these tables.
#
# - The amount of collations/character sets grows with new MySQL releases.
#
# - Even within the same release the amount of records within these tables
# can differ between different build types (community, enterprise, source,...)
#
#
################################################################################
--echo
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
--echo
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
echo;
--echo
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
# Cleanup
--echo # Switch to connection default + disconnect con
connection default;
disconnect con;
DROP USER dbdict_test@localhost;

View file

@ -0,0 +1,87 @@
# suite/funcs_1/datadict/is_columns.inc
#
# Auxiliary script to be sourced by
# is_columns_is
# is_columns_mysql
# is_columns_<engine>
#
# Purpose:
# Check the content of information_schema.columns about tables within certain
# database/s.
#
# Usage:
# The variable $my_where has to
# - be set before sourcing this script.
# - contain the first part of the WHERE qualification
# Example:
# let $my_where = WHERE table_schema = 'information_schema'
# AND table_name <> 'profiling';
# --source suite/funcs_1/datadict/is_columns.inc
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval
SELECT * FROM information_schema.columns
$my_where
ORDER BY table_schema, table_name, column_name;
--echo ##########################################################################
--echo # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
--echo ##########################################################################
eval
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
$my_where
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
#FIXME 3.2.6.2: check the value 2.0079 tinytext ucs2 ucs2_general_ci
eval
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
$my_where
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
eval
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
CHARACTER_SET_NAME,
COLLATION_NAME
FROM information_schema.columns
$my_where
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
echo --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values;
echo --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval
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
$my_where
ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;

View file

@ -0,0 +1,54 @@
#### suite/funcs_1/datadict/datadict.pre
#
# Auxiliary script which loads prerequisites
# (variables needed for --replace_result ...)
# in datadictionary tests.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--disable_query_log
# Bug#12777 Different size shown for VARCHAR(n) columns (with n> 64)
# in INFORMATION_SCHEMA
# This bug was unfortunately (for testers) declared to be no bug.
# So CHARACTER_MAXIMUM_LENGTH of several <whatever>_CATALOG columns within
# the INFORMATION_SCHEMA depends on PATH_MAX of the operating system.
# Workaround for this problem:
# Get the size of ONE known colum and check the size against some values to
# be able to use the correct --replace_result statement. Using this only the
# one pair of 'wrong' values is replaced and not all occurrencies of all
# possible pairs of values. See bug #12777 for details.
SELECT character_maximum_length INTO @CML
FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = 'columns'
AND column_name = 'table_catalog';
let $bug_12777_0512= `SELECT @CML = 512`;
let $bug_12777_1023= `SELECT @CML = 1023`;
let $bug_12777_1024= `SELECT @CML = 1024`;
let $bug_12777_2048= `SELECT @CML = 2048`;
# 4096 is the value used in the files with expected results.
let $bug_12777_4095= `SELECT @CML = 4095`;
if (0)
{
# enable this for debugging only, but NOT in a pushed version, as then the
# result changes from OS to OS ...
eval SELECT @CML AS 'CML',
$bug_12777_0512 AS '512',
$bug_12777_1023 AS '1023',
$bug_12777_1024 AS '1024',
$bug_12777_2048 AS '2048',
$bug_12777_4095 AS '4095';
}
# Prepare a variable to be able to suppress machine dependant diffs
# this can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user
WHERE host NOT In ("localhost", "127.0.0.1", "%")`;
--enable_query_log

View file

@ -71,67 +71,51 @@ let $engine_ndb= `SELECT @ENGINE_NDB = 1`;
# Note: The NDB variant with their own tb1 - tb4 tables is not ready for use.
let $engine_ndb= 0;
# Decide, if the objects are to be (re)created
#
# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE)
# That means the current script must not (re)create any object.
# It can expect, that the objects already exist.
#
# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE)
# That means all objects have to be (re)created within the current script.
#
eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1);
let $run= `SELECT @NO_REFRESH = 0`;
if ($run)
--disable_warnings
DROP DATABASE IF EXISTS test1;
--enable_warnings
CREATE DATABASE test1;
USE test;
if ($engine_innodb)
{
--disable_warnings
DROP DATABASE IF EXISTS test1;
--enable_warnings
CREATE DATABASE test1;
USE test;
# until a statement 'eval --source suite/funcs_1/include/$var_tb1.inc
# works we need to have similar statements for each $engine
if ($engine_innodb)
{
--source suite/funcs_1/include/innodb_tb1.inc
--source suite/funcs_1/include/innodb_tb2.inc
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/include/innodb_tb4.inc
USE test1;
--source suite/funcs_1/include/innodb_tb2.inc
}
if ($engine_memory)
{
--source suite/funcs_1/include/memory_tb1.inc
--source suite/funcs_1/include/memory_tb2.inc
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/include/memory_tb4.inc
USE test1;
--source suite/funcs_1/include/memory_tb2.inc
}
if ($engine_myisam)
{
--source suite/funcs_1/include/myisam_tb1.inc
--source suite/funcs_1/include/myisam_tb2.inc
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/include/myisam_tb4.inc
USE test1;
--source suite/funcs_1/include/myisam_tb2.inc
}
if ($engine_ndb)
{
--source suite/funcs_1/include/ndb_tb1.inc
--source suite/funcs_1/include/ndb_tb2.inc
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/include/ndb_tb4.inc
USE test1;
--source suite/funcs_1/include/ndb_tb2.inc
}
USE test;
--source suite/funcs_1/include/sp_tb.inc
--source suite/funcs_1/include/innodb_tb1.inc
--source suite/funcs_1/include/innodb_tb2.inc
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/include/innodb_tb4.inc
USE test1;
--source suite/funcs_1/include/innodb_tb2.inc
}
if ($engine_memory)
{
--source suite/funcs_1/include/memory_tb1.inc
--source suite/funcs_1/include/memory_tb2.inc
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/include/memory_tb4.inc
USE test1;
--source suite/funcs_1/include/memory_tb2.inc
}
if ($engine_myisam)
{
--source suite/funcs_1/include/myisam_tb1.inc
--source suite/funcs_1/include/myisam_tb2.inc
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/include/myisam_tb4.inc
USE test1;
--source suite/funcs_1/include/myisam_tb2.inc
}
if ($engine_ndb)
{
--source suite/funcs_1/include/ndb_tb1.inc
--source suite/funcs_1/include/ndb_tb2.inc
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/include/ndb_tb4.inc
USE test1;
--source suite/funcs_1/include/ndb_tb2.inc
}
USE test;
--source suite/funcs_1/include/sp_tb.inc

File diff suppressed because it is too large Load diff

View file

@ -1,57 +0,0 @@
#### suite/funcs_1/datadict/datadict_show_schema.test
# shows content of tables from INFORMATION_SCHEMA
# usage:
# let $message= <a message for the .result file>;
# let $dbname= <prefix_of_a_cb_name>;
# --source suite/funcs_1/datadict/datadict_show_schema.test
--source include/show_msg.inc
eval select *
from information_schema.schemata
where schema_name like '$dbname%';
eval select table_catalog, table_schema, engine
from information_schema.tables
where table_schema like '$dbname%';
eval select *
from information_schema.columns
where table_schema like '$dbname%';
eval select table_schema, table_name, is_updatable
from information_schema.views
where table_schema like '$dbname%';
eval select routine_name, routine_type, security_type, sql_mode
from information_schema.routines
where routine_schema like '$dbname%';
eval select table_name, index_schema, index_name, index_type
from information_schema.statistics
where table_schema like '$dbname%';
--replace_result $SERVER_NAME <SERVER_NAME>
--sorted_result
eval select *
from information_schema.user_privileges;
# where grantee="'u_6_401013'@'%'";
eval select *
from information_schema.column_privileges
where table_schema like '$dbname%';
eval select *
from information_schema.table_privileges
where table_schema like '$dbname%';
eval select *
from information_schema.key_column_usage
where table_schema like '$dbname%';
eval SELECT *
FROM information_schema.triggers
WHERE trigger_schema LIKE '$dbname%';

View file

@ -1,28 +0,0 @@
#### suite/funcs_1/datadict/datadict_show_table_design.test
#
# - shows design of *one* table from INFORMATION_SCHEMA
# - used to have identical 'view' on all tested tables
#
# Usage:
#
# let $is_table= <name of one of the tables>;
# --source suite/funcs_1/datadict/datadict_show_table_design.test
USE information_schema;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval DESC $is_table;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SHOW CREATE TABLE $is_table;
eval SELECT COUNT(*) FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = '$is_table'
ORDER BY ordinal_position;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = '$is_table'
ORDER BY ordinal_position;

View file

@ -1,62 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables.inc
--source include/show_msg.inc
eval $dd_part1 schemata $dd_part2;
#FIXME: splitting the "SELECT * FROM tables" in two parts until
#FIXME: Bug #12397: wrong values shown in column CREATE_OPTIONS of INFORMATION_SCHEMA.TABLES
#FIXME: is solved, like done in the _master.test, cannot be done here, so we replace here
#FIXME: the result for ALL rows.
# 9 AVG_ROW_LENGTH
# 10 DATA_LENGTH
# 11 MAX_DATA_LENGTH
## 12 INDEX_LENGTH
# 13 DATA_FREE
# 15 CREATE_TIME
# 16 UPDATE_TIME
# 20 CREATE_OPTIONS
--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#"
eval $dd_part1 tables $dd_part2;
--source suite/funcs_1/datadict/datadict_bug_12777.inc
eval $dd_part1 columns $dd_part2;
eval $dd_part1 character_sets $dd_part2;
eval $dd_part1 collations where collation_name <> 'utf8_general_cs' $dd_part2;
eval $dd_part1 collation_character_set_applicability where collation_name <> 'utf8_general_cs' $dd_part2;
--replace_column 16 <Created> 17 <Last_Altered>
eval $dd_part1 routines $dd_part2;
eval $dd_part1 statistics $dd_part2;
eval $dd_part1 views $dd_part2;
eval $dd_part1 user_privileges $dd_part2;
eval $dd_part1 schema_privileges $dd_part2;
eval $dd_part1 table_privileges $dd_part2;
eval $dd_part1 column_privileges $dd_part2;
eval $dd_part1 table_constraints $dd_part2;
eval $dd_part1 key_column_usage $dd_part2;
eval $dd_part1 triggers $dd_part2;
# later planned new tables for INFORMATION_SCHEMA (not before version 5.0.11)
#
# (see Reference Manual: 22.1.16. Other INFORMATION_SCHEMA Tables):
#
# parameters
# referential_constraints
#
# check them here although they currently does not exist, but using this we
# immedeatly get notice when they are implemented
#### DON'T FORGET TO ADD THE NEW TABLES TO THE CORRESPONDING FILES
#### datadict_tables_error_<errno>.test !
--error 1109
eval $dd_part1 parameters $dd_part2;
--error 0,1109
eval $dd_part1 referential_constraints $dd_part2;

View file

@ -1,33 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables.inc
#--disable_query_log
#eval SET @aux= 'This testcase shows the error number $error_no';
#let $message= `SELECT @aux`;
#--enable_query_log
--source include/show_msg.inc
--disable_abort_on_error
eval $dd_part1 schemata $dd_part2;
eval $dd_part1 tables $dd_part2;
eval $dd_part1 columns $dd_part2;
eval $dd_part1 character_sets $dd_part2;
eval $dd_part1 collations $dd_part2;
eval $dd_part1 collation_character_set_applicability $dd_part2;
eval $dd_part1 routines $dd_part2;
eval $dd_part1 statistics $dd_part2;
eval $dd_part1 views $dd_part2;
eval $dd_part1 user_privileges $dd_part2;
eval $dd_part1 schema_privileges $dd_part2;
eval $dd_part1 table_privileges $dd_part2;
eval $dd_part1 column_privileges $dd_part2;
eval $dd_part1 table_constraints $dd_part2;
eval $dd_part1 key_column_usage $dd_part2;
eval $dd_part1 triggers $dd_part2;
--enable_abort_on_error

View file

@ -1,80 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
let $message= known error 1 (Can_t create/write to file ...):;
--source include/show_msg.inc
--replace_result '\\' '/'
--error 1
eval $dd_part1 schemata $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 tables $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 columns $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 character_sets $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 collations $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 collation_character_set_applicability $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 routines $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 statistics $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 views $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 user_privileges $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 schema_privileges $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 table_privileges $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 column_privileges $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 table_constraints $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 key_column_usage $dd_part2;
--replace_result '\\' '/'
--error 1
eval $dd_part1 triggers $dd_part2;

View file

@ -1,51 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables_error_1044.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
# e.g.: ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
let $message= known error 1044 (ERROR 42000: Access denied for user ... to database ...):;
--source include/show_msg.inc
--error 1044
eval $dd_part1 schemata $dd_part2;
--error 1044
eval $dd_part1 tables $dd_part2;
--error 1044
eval $dd_part1 columns $dd_part2;
--error 1044
eval $dd_part1 character_sets $dd_part2;
--error 1044
eval $dd_part1 collations $dd_part2;
--error 1044
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error 1044
eval $dd_part1 routines $dd_part2;
--error 1044
eval $dd_part1 statistics $dd_part2;
--error 1044
eval $dd_part1 views $dd_part2;
--error 1044
eval $dd_part1 user_privileges $dd_part2;
--error 1044
eval $dd_part1 schema_privileges $dd_part2;
--error 1044
eval $dd_part1 table_privileges $dd_part2;
--error 1044
eval $dd_part1 column_privileges $dd_part2;
--error 1044
eval $dd_part1 table_constraints $dd_part2;
--error 1044
eval $dd_part1 key_column_usage $dd_part2;
--error 1044
eval $dd_part1 triggers $dd_part2;

View file

@ -1,49 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
let $message= known error 1049 (ERROR 42000: Unknown database ...):;
--source include/show_msg.inc
--error 1049
eval $dd_part1 schemata $dd_part2;
--error 1049
eval $dd_part1 tables $dd_part2;
--error 1049
eval $dd_part1 columns $dd_part2;
--error 1049
eval $dd_part1 character_sets $dd_part2;
--error 1049
eval $dd_part1 collations $dd_part2;
--error 1049
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error 1049
eval $dd_part1 routines $dd_part2;
--error 1049
eval $dd_part1 statistics $dd_part2;
--error 1049
eval $dd_part1 views $dd_part2;
--error 1049
eval $dd_part1 user_privileges $dd_part2;
--error 1049
eval $dd_part1 schema_privileges $dd_part2;
--error 1049
eval $dd_part1 table_privileges $dd_part2;
--error 1049
eval $dd_part1 column_privileges $dd_part2;
--error 1049
eval $dd_part1 table_constraints $dd_part2;
--error 1049
eval $dd_part1 key_column_usage $dd_part2;
--error 1049
eval $dd_part1 triggers $dd_part2;

View file

@ -1,49 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
let $message= known error 1051:;
--source include/show_msg.inc
--error 1051
eval $dd_part1 schemata $dd_part2;
--error 1051
eval $dd_part1 tables $dd_part2;
--error 1051
eval $dd_part1 columns $dd_part2;
--error 1051
eval $dd_part1 character_sets $dd_part2;
--error 1051
eval $dd_part1 collations $dd_part2;
--error 1051
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error 1051
eval $dd_part1 routines $dd_part2;
--error 1051
eval $dd_part1 statistics $dd_part2;
--error 1051
eval $dd_part1 views $dd_part2;
--error 1051
eval $dd_part1 user_privileges $dd_part2;
--error 1051
eval $dd_part1 schema_privileges $dd_part2;
--error 1051
eval $dd_part1 table_privileges $dd_part2;
--error 1051
eval $dd_part1 column_privileges $dd_part2;
--error 1051
eval $dd_part1 table_constraints $dd_part2;
--error 1051
eval $dd_part1 key_column_usage $dd_part2;
--error 1051
eval $dd_part1 triggers $dd_part2;

View file

@ -1,49 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
let $message= known error 1146:;
--source include/show_msg.inc
--error 1146
eval $dd_part1 schemata $dd_part2;
--error 1146
eval $dd_part1 tables $dd_part2;
--error 1146
eval $dd_part1 columns $dd_part2;
--error 1146
eval $dd_part1 character_sets $dd_part2;
--error 1146
eval $dd_part1 collations $dd_part2;
--error 1146
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error 1146
eval $dd_part1 routines $dd_part2;
--error 1146
eval $dd_part1 statistics $dd_part2;
--error 1146
eval $dd_part1 views $dd_part2;
--error 1146
eval $dd_part1 user_privileges $dd_part2;
--error 1146
eval $dd_part1 schema_privileges $dd_part2;
--error 1146
eval $dd_part1 table_privileges $dd_part2;
--error 1146
eval $dd_part1 column_privileges $dd_part2;
--error 1146
eval $dd_part1 table_constraints $dd_part2;
--error 1146
eval $dd_part1 key_column_usage $dd_part2;
--error 1146
eval $dd_part1 triggers $dd_part2;

View file

@ -1,49 +0,0 @@
#### suite/funcs_1/datadict/datadict_tables.inc
# contains all tables from INFORMATION_SCHEMA
# usage:
# --source suite/funcs_1/datadict/datadict_tables_err_<no>.inc
#
# up to a change of "mysqltest", which makes lines like "eval --error $err_no"
# possible we will have some different files with the same content except the
# error numbers.
--source include/show_msg.inc
let $message= known error 1288:;
--source include/show_msg.inc
--error 1288
eval $dd_part1 schemata $dd_part2;
--error 1288
eval $dd_part1 tables $dd_part2;
--error 1288
eval $dd_part1 columns $dd_part2;
--error 1288
eval $dd_part1 character_sets $dd_part2;
--error 1288
eval $dd_part1 collations $dd_part2;
--error 1288
eval $dd_part1 collation_character_set_applicability $dd_part2;
--error 1288
eval $dd_part1 routines $dd_part2;
--error 1288
eval $dd_part1 statistics $dd_part2;
--error 1288
eval $dd_part1 views $dd_part2;
--error 1288
eval $dd_part1 user_privileges $dd_part2;
--error 1288
eval $dd_part1 schema_privileges $dd_part2;
--error 1288
eval $dd_part1 table_privileges $dd_part2;
--error 1288
eval $dd_part1 column_privileges $dd_part2;
--error 1288
eval $dd_part1 table_constraints $dd_part2;
--error 1288
eval $dd_part1 key_column_usage $dd_part2;
--error 1288
eval $dd_part1 triggers $dd_part2;

View file

@ -0,0 +1,42 @@
# suite/funcs_1/datadict/is_table_query.inc
#
# Check that every INFORMATION_SCHEMA table can be queried with a SELECT
# statement, just as if it were an ordinary user-defined table.
# (Requirement 3.2.1.1)
#
# The variable $is_table must be set before sourcing this script.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--disable_warnings
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
--enable_warnings
eval CREATE VIEW test.v1 AS SELECT * FROM information_schema.$is_table;
eval CREATE PROCEDURE test.p1() SELECT * FROM information_schema.$is_table;
delimiter //;
eval CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.$is_table;
RETURN counter;
END//
delimiter ;//
# We are not interested to check the content here.
--echo # Attention: The printing of the next result sets is disabled.
--disable_result_log
eval SELECT * FROM information_schema.$is_table;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
--enable_result_log
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;

View file

@ -112,11 +112,11 @@ connect (con100,localhost,ddicttestuser1,ddictpass,information_schema);
--echo ####################################################################################
connection default;
eval SHOW CREATE TABLE $table;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SHOW $table;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SELECT * FROM $table $select_where ORDER BY id;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SELECT $columns FROM $table $select_where ORDER BY id;
--source suite/funcs_1/datadict/datadict_priv.inc
--real_sleep 0.3
@ -128,11 +128,11 @@ connection con100;
--echo SHOW/SELECT shows only the processes (1) of the user.
--echo ####################################################################################
eval SHOW CREATE TABLE $table;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SHOW $table;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SELECT * FROM $table $select_where ORDER BY id;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
eval SELECT $columns FROM $table $select_where ORDER BY id;
--source suite/funcs_1/datadict/datadict_priv.inc
--real_sleep 0.3
@ -154,9 +154,9 @@ GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass';
--echo ####################################################################################
connection con100;
SHOW GRANTS;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -166,9 +166,9 @@ SELECT * FROM information_schema.processlist;
--echo ####################################################################################
connect (con101,localhost,ddicttestuser1,ddictpass,information_schema);
SHOW GRANTS;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -188,9 +188,9 @@ GRANT PROCESS ON *.* TO ''@'localhost';
--echo ####################################################################################
connect (anonymous1,localhost,'',,information_schema);
SHOW GRANTS;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -210,9 +210,9 @@ connect (con102,localhost,ddicttestuser1,ddictpass,information_schema);
--echo ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -235,10 +235,10 @@ SHOW GRANTS FOR ''@'localhost';
if ($fixed_bug_30395)
{
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
}
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -257,9 +257,9 @@ connect (con103,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Only the processes of ddicttestuser1 user are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -279,9 +279,9 @@ connect (con104,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Only the processes of ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -326,9 +326,9 @@ connect (con200,localhost,ddicttestuser2,ddictpass,information_schema);
--echo ddicttestuser2 has now the PROCESS privilege and sees all connections
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -347,9 +347,9 @@ connect (con201,localhost,ddicttestuser2,ddictpass,information_schema);
--echo ddicttestuser2 has no more the PROCESS privilege and can only see own connects
--echo ####################################################################################
SHOW GRANTS;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -370,9 +370,9 @@ connect (con107,localhost,ddicttestuser1,ddictpass,information_schema);
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--error ER_ACCESS_DENIED_ERROR
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@ -394,9 +394,9 @@ connect (con108,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SHOW processlist;
--replace_column 6 TIME
--replace_column 1 ID 6 TIME
SELECT * FROM information_schema.processlist;
--real_sleep 0.3

View file

@ -306,3 +306,4 @@ connection default;
--echo ----- close connection ddicttestuser1 -----
disconnect ddicttestuser1;
DROP USER ddicttestuser1@'localhost';
DROP TABLE test.t1;

View file

@ -0,0 +1,55 @@
# suite/funcs_1/datadict/statistics.inc
#
# Auxiliary script to be sourced by
# is_statistics_is
# is_statistics_mysql
# is_statistics_<engine>
#
# Purpose:
# Check the content of information_schema.statistics about tables within the
# database '$database'.
#
# Usage:
# The variable $database has to be set before sourcing this script.
# Example:
# let $database = db_data;
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--source suite/funcs_1/datadict/datadict.pre
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
--enable_warnings
CREATE DATABASE db_datadict;
# 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 db_datadict.* TO testuser1@localhost;
let $my_select = SELECT * FROM information_schema.statistics
$my_where
ORDER BY table_schema, table_name, index_name, seq_in_index, column_name;
--replace_column 10 #CARD#
eval $my_select;
--echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (testuser1,localhost,testuser1,,db_datadict);
--replace_column 10 #CARD#
eval $my_select;
--echo # Switch to connection default and close connection testuser1
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
DROP DATABASE db_datadict;

View file

@ -0,0 +1,45 @@
# suite/funcs_1/datadict/table_constraints.inc
#
# Auxiliary script to be sourced by
# suite/funcs_1/t/is_table_constraints_mysql.test
# suite/funcs_1/t/is_table_constraints_is.test
#
# The variable
# $table_schema database to be inspected
# has to be set before sourcing this script.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
--enable_warnings
CREATE DATABASE db_datadict;
# 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 db_datadict.* TO testuser1@localhost;
let $my_select = SELECT * FROM information_schema.table_constraints
WHERE table_schema = '$table_schema'
ORDER BY table_schema,table_name,constraint_name;
eval $my_select;
--echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (testuser1,localhost,testuser1,,db_datadict);
eval $my_select;
--echo # Switch to connection default and close connection testuser1
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
DROP DATABASE db_datadict;

View file

@ -0,0 +1,39 @@
# suite/funcs_1/datadict/tables1.inc
#
# Auxiliary script to be sourced by
# is_tables_mysql.test
# is_tables_is.test
# is_tables_<engine>.test
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
--disable_warnings
DROP DATABASE IF EXISTS db_datadict;
--enable_warnings
CREATE DATABASE db_datadict;
--source suite/funcs_1/datadict/tables2.inc
# 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 db_datadict.* TO testuser1@localhost;
--echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (testuser1,localhost,testuser1,,db_datadict);
--source suite/funcs_1/datadict/tables2.inc
--echo # Switch to connection default and close connection testuser1
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
DROP DATABASE db_datadict;

View file

@ -0,0 +1,47 @@
# suite/funcs_1/datadict/tables2.inc
#
# Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc.
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
# testsuite funcs_1
# Create this script based on older scripts and new code.
#
################################################################################
# 8 TABLE_ROWS
# 9 AVG_ROW_LENGTH
# 10 DATA_LENGTH
# 11 MAX_DATA_LENGTH
# 12 INDEX_LENGTH
# 13 DATA_FREE
# 15 CREATE_TIME
# 16 UPDATE_TIME
# 17 CHECK_TIME
# 20 CREATE_OPTIONS
# 21 TABLE_COMMENT User defined comment
# + InnoDB
# + NDB: "number_of_replicas: <number>" appended
# + InnoDB: "InnoDB free: <number_kB> kB" appended
# <number_kB> depends on tablespace history!
# The LEFT/INSTR/IF/LENGTH stuff should remove these
# storage engine specific part.
let $innodb_pattern = 'InnoDB free';
let $ndb_pattern = 'number_of_replicas';
--vertical_results
--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
SELECT *,
LEFT( table_comment,
IF(INSTR(table_comment,$innodb_pattern) = 0
AND INSTR(table_comment,$ndb_pattern) = 0,
LENGTH(table_comment),
INSTR(table_comment,$innodb_pattern)
+ INSTR(table_comment,$ndb_pattern) - 1))
AS "user_comment",
'-----------------------------------------------------' AS "Separator"
FROM information_schema.tables
$my_where
ORDER BY table_schema,table_name;
--horizontal_results

View file

@ -0,0 +1,21 @@
# suite/funcs_1/include/cleanup.inc
#
# Remove all objects created by sourcing
# suite/funcs_1/datadict/datadict_load.inc
#
DROP DATABASE test1;
DROP DATABASE test4;
DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE test.t3;
DROP TABLE test.t4;
DROP TABLE test.t7;
DROP TABLE test.t8;
DROP TABLE test.t9;
DROP TABLE test.t10;
DROP TABLE test.t11;
DROP TABLE test.tb1;
DROP TABLE test.tb2;
DROP TABLE test.tb3;
DROP TABLE test.tb4;

View file

@ -1,6 +0,0 @@
##### suite/funcs_1/include/create_database.inc
--disable_warnings
eval DROP DATABASE IF EXISTS $new_database;
--enable_warnings
eval CREATE DATABASE $new_database;

View file

@ -1,10 +0,0 @@
##### suite/funcs_1/include/create_user_no_priv.inc
#
# $new_user must contain the name (with @<host> if necessary)
#
--error 0,1396
eval DROP USER $new_user;
eval CREATE USER $new_user identified by 'PWD';
# Just to be sure
eval REVOKE ALL PRIVILEGES, GRANT OPTION FROM $new_user;

View file

@ -1,11 +0,0 @@
##### suite/funcs_1/include/create_user_no_super.inc
#
# $new_user must contain the name (with @<host> if necessary)
# of the user to be created
--error 0,1396
eval DROP USER $new_user;
eval CREATE USER $new_user identified by 'PWD';
eval GRANT ALL ON *.* TO $new_user WITH GRANT OPTION;
eval REVOKE SUPER ON *.* FROM $new_user;

View file

@ -1,8 +1,5 @@
##### suite/funcs_1/include/memory_tb1.inc
set @@global.max_heap_table_size = 4294967295;
set @@session.max_heap_table_size = 4294967295;
--disable_warnings
drop table if exists tb1 ;
--enable_warnings

View file

@ -1,8 +1,5 @@
##### suite/funcs_1/include/memory_tb2.inc
set @@global.max_heap_table_size = 4294967295;
set @@session.max_heap_table_size = 4294967295;
--disable_warnings
drop table if exists tb2 ;
--enable_warnings

View file

@ -1,8 +1,5 @@
##### suite/funcs_1/include/memory_tb3.inc
set @@global.max_heap_table_size = 4294967295;
set @@session.max_heap_table_size = 4294967295;
--disable_warnings
drop table if exists tb3;
--enable_warnings

View file

@ -1,8 +1,5 @@
##### suite/funcs_1/include/memory_tb4.inc
set @@global.max_heap_table_size = 4294967295;
set @@session.max_heap_table_size = 4294967295;
--disable_warnings
drop table if exists tb4 ;
--enable_warnings

View file

@ -1,9 +1,5 @@
--disable_abort_on_error
# ML: Should be set outside when memory
# set @@global.max_heap_table_size=4294967295;
# set @@session.max_heap_table_size=4294967295;
USE test;
--disable_warnings

View file

@ -0,0 +1,312 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1250_polish_ci cp1250 99 Yes 1
cp1251_bin cp1251 50 0
cp1251_bulgarian_ci cp1251 14 0
cp1251_general_ci cp1251 51 Yes 0
cp1251_general_cs cp1251 52 0
cp1251_ukrainian_ci cp1251 23 0
cp1256_bin cp1256 67 0
cp1256_general_ci cp1256 57 Yes 0
cp1257_bin cp1257 58 0
cp1257_general_ci cp1257 59 Yes 0
cp1257_lithuanian_ci cp1257 29 0
cp850_bin cp850 80 0
cp850_general_ci cp850 4 Yes 0
cp852_bin cp852 81 0
cp852_general_ci cp852 40 Yes 0
cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 0
greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 0
macce_bin macce 43 0
macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
filename filename
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -0,0 +1,314 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1250_polish_ci cp1250 99 Yes 1
cp1251_bin cp1251 50 0
cp1251_bulgarian_ci cp1251 14 0
cp1251_general_ci cp1251 51 Yes 0
cp1251_general_cs cp1251 52 0
cp1251_ukrainian_ci cp1251 23 0
cp1256_bin cp1256 67 0
cp1256_general_ci cp1256 57 Yes 0
cp1257_bin cp1257 58 0
cp1257_general_ci cp1257 59 Yes 0
cp1257_lithuanian_ci cp1257 29 0
cp850_bin cp850 80 0
cp850_general_ci cp850 4 Yes 0
cp852_bin cp852 81 0
cp852_general_ci cp852 40 Yes 0
cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 0
greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 0
macce_bin macce 43 0
macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_general_cs utf8 254 Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
filename filename
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_general_cs utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -0,0 +1,309 @@
DROP USER dbdict_test@localhost;
CREATE USER dbdict_test@localhost;
# Establish connection con (user=dbdict_test)
SELECT *
FROM information_schema.character_sets
ORDER BY character_set_name;
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
armscii8 armscii8_general_ci ARMSCII-8 Armenian 1
ascii ascii_general_ci US ASCII 1
big5 big5_chinese_ci Big5 Traditional Chinese 2
binary binary Binary pseudo charset 1
cp1250 cp1250_general_ci Windows Central European 1
cp1251 cp1251_general_ci Windows Cyrillic 1
cp1256 cp1256_general_ci Windows Arabic 1
cp1257 cp1257_general_ci Windows Baltic 1
cp850 cp850_general_ci DOS West European 1
cp852 cp852_general_ci DOS Central European 1
cp866 cp866_general_ci DOS Russian 1
cp932 cp932_japanese_ci SJIS for Windows Japanese 2
dec8 dec8_swedish_ci DEC West European 1
eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3
euckr euckr_korean_ci EUC-KR Korean 2
gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2
gbk gbk_chinese_ci GBK Simplified Chinese 2
geostd8 geostd8_general_ci GEOSTD8 Georgian 1
greek greek_general_ci ISO 8859-7 Greek 1
hebrew hebrew_general_ci ISO 8859-8 Hebrew 1
hp8 hp8_english_ci HP West European 1
keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1
koi8r koi8r_general_ci KOI8-R Relcom Russian 1
koi8u koi8u_general_ci KOI8-U Ukrainian 1
latin1 latin1_swedish_ci cp1252 West European 1
latin2 latin2_general_ci ISO 8859-2 Central European 1
latin5 latin5_turkish_ci ISO 8859-9 Turkish 1
latin7 latin7_general_ci ISO 8859-13 Baltic 1
macce macce_general_ci Mac Central European 1
macroman macroman_general_ci Mac West European 1
sjis sjis_japanese_ci Shift-JIS Japanese 2
swe7 swe7_swedish_ci 7bit Swedish 1
tis620 tis620_thai_ci TIS620 Thai 1
ucs2 ucs2_general_ci UCS-2 Unicode 2
ujis ujis_japanese_ci EUC-JP Japanese 3
utf8 utf8_general_ci UTF-8 Unicode 3
SELECT *
FROM information_schema.collations
ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 Yes 1
armscii8_general_ci armscii8 32 Yes Yes 1
ascii_bin ascii 65 Yes 1
ascii_general_ci ascii 11 Yes Yes 1
big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1
cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1
cp1251_bin cp1251 50 Yes 1
cp1251_bulgarian_ci cp1251 14 Yes 1
cp1251_general_ci cp1251 51 Yes Yes 1
cp1251_general_cs cp1251 52 Yes 1
cp1251_ukrainian_ci cp1251 23 Yes 1
cp1256_bin cp1256 67 Yes 1
cp1256_general_ci cp1256 57 Yes Yes 1
cp1257_bin cp1257 58 Yes 1
cp1257_general_ci cp1257 59 Yes Yes 1
cp1257_lithuanian_ci cp1257 29 Yes 1
cp850_bin cp850 80 Yes 1
cp850_general_ci cp850 4 Yes Yes 1
cp852_bin cp852 81 Yes 1
cp852_general_ci cp852 40 Yes Yes 1
cp866_bin cp866 68 Yes 1
cp866_general_ci cp866 36 Yes Yes 1
cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 Yes 1
dec8_swedish_ci dec8 3 Yes Yes 1
eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1
euckr_korean_ci euckr 19 Yes Yes 1
gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 Yes 1
geostd8_general_ci geostd8 92 Yes Yes 1
greek_bin greek 70 Yes 1
greek_general_ci greek 25 Yes Yes 1
hebrew_bin hebrew 71 Yes 1
hebrew_general_ci hebrew 16 Yes Yes 1
hp8_bin hp8 72 Yes 1
hp8_english_ci hp8 6 Yes Yes 1
keybcs2_bin keybcs2 73 Yes 1
keybcs2_general_ci keybcs2 37 Yes Yes 1
koi8r_bin koi8r 74 Yes 1
koi8r_general_ci koi8r 7 Yes Yes 1
koi8u_bin koi8u 75 Yes 1
koi8u_general_ci koi8u 22 Yes Yes 1
latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1
latin1_general_cs latin1 49 Yes 1
latin1_german1_ci latin1 5 Yes 1
latin1_german2_ci latin1 31 Yes 2
latin1_spanish_ci latin1 94 Yes 1
latin1_swedish_ci latin1 8 Yes Yes 1
latin2_bin latin2 77 Yes 1
latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 Yes 1
latin5_turkish_ci latin5 30 Yes Yes 1
latin7_bin latin7 79 Yes 1
latin7_estonian_cs latin7 20 Yes 1
latin7_general_ci latin7 41 Yes Yes 1
latin7_general_cs latin7 42 Yes 1
macce_bin macce 43 Yes 1
macce_general_ci macce 38 Yes Yes 1
macroman_bin macroman 53 Yes 1
macroman_general_ci macroman 39 Yes Yes 1
sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 Yes 1
swe7_swedish_ci swe7 10 Yes Yes 1
tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1
ucs2_czech_ci ucs2 138 Yes 8
ucs2_danish_ci ucs2 139 Yes 8
ucs2_esperanto_ci ucs2 145 Yes 8
ucs2_estonian_ci ucs2 134 Yes 8
ucs2_general_ci ucs2 35 Yes Yes 1
ucs2_hungarian_ci ucs2 146 Yes 8
ucs2_icelandic_ci ucs2 129 Yes 8
ucs2_latvian_ci ucs2 130 Yes 8
ucs2_lithuanian_ci ucs2 140 Yes 8
ucs2_persian_ci ucs2 144 Yes 8
ucs2_polish_ci ucs2 133 Yes 8
ucs2_romanian_ci ucs2 131 Yes 8
ucs2_roman_ci ucs2 143 Yes 8
ucs2_slovak_ci ucs2 141 Yes 8
ucs2_slovenian_ci ucs2 132 Yes 8
ucs2_spanish2_ci ucs2 142 Yes 8
ucs2_spanish_ci ucs2 135 Yes 8
ucs2_swedish_ci ucs2 136 Yes 8
ucs2_turkish_ci ucs2 137 Yes 8
ucs2_unicode_ci ucs2 128 Yes 8
ujis_bin ujis 91 Yes 1
ujis_japanese_ci ujis 12 Yes Yes 1
utf8_bin utf8 83 Yes 1
utf8_czech_ci utf8 202 Yes 8
utf8_danish_ci utf8 203 Yes 8
utf8_esperanto_ci utf8 209 Yes 8
utf8_estonian_ci utf8 198 Yes 8
utf8_general_ci utf8 33 Yes Yes 1
utf8_hungarian_ci utf8 210 Yes 8
utf8_icelandic_ci utf8 193 Yes 8
utf8_latvian_ci utf8 194 Yes 8
utf8_lithuanian_ci utf8 204 Yes 8
utf8_persian_ci utf8 208 Yes 8
utf8_polish_ci utf8 197 Yes 8
utf8_romanian_ci utf8 195 Yes 8
utf8_roman_ci utf8 207 Yes 8
utf8_slovak_ci utf8 205 Yes 8
utf8_slovenian_ci utf8 196 Yes 8
utf8_spanish2_ci utf8 206 Yes 8
utf8_spanish_ci utf8 199 Yes 8
utf8_swedish_ci utf8 200 Yes 8
utf8_turkish_ci utf8 201 Yes 8
utf8_unicode_ci utf8 192 Yes 8
SELECT *
FROM information_schema.collation_character_set_applicability
ORDER BY collation_name, character_set_name;
COLLATION_NAME CHARACTER_SET_NAME
armscii8_bin armscii8
armscii8_general_ci armscii8
ascii_bin ascii
ascii_general_ci ascii
big5_bin big5
big5_chinese_ci big5
binary binary
cp1250_bin cp1250
cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250
cp1250_general_ci cp1250
cp1251_bin cp1251
cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251
cp1251_general_cs cp1251
cp1251_ukrainian_ci cp1251
cp1256_bin cp1256
cp1256_general_ci cp1256
cp1257_bin cp1257
cp1257_general_ci cp1257
cp1257_lithuanian_ci cp1257
cp850_bin cp850
cp850_general_ci cp850
cp852_bin cp852
cp852_general_ci cp852
cp866_bin cp866
cp866_general_ci cp866
cp932_bin cp932
cp932_japanese_ci cp932
dec8_bin dec8
dec8_swedish_ci dec8
eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms
euckr_bin euckr
euckr_korean_ci euckr
gb2312_bin gb2312
gb2312_chinese_ci gb2312
gbk_bin gbk
gbk_chinese_ci gbk
geostd8_bin geostd8
geostd8_general_ci geostd8
greek_bin greek
greek_general_ci greek
hebrew_bin hebrew
hebrew_general_ci hebrew
hp8_bin hp8
hp8_english_ci hp8
keybcs2_bin keybcs2
keybcs2_general_ci keybcs2
koi8r_bin koi8r
koi8r_general_ci koi8r
koi8u_bin koi8u
koi8u_general_ci koi8u
latin1_bin latin1
latin1_danish_ci latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_german1_ci latin1
latin1_german2_ci latin1
latin1_spanish_ci latin1
latin1_swedish_ci latin1
latin2_bin latin2
latin2_croatian_ci latin2
latin2_czech_cs latin2
latin2_general_ci latin2
latin2_hungarian_ci latin2
latin5_bin latin5
latin5_turkish_ci latin5
latin7_bin latin7
latin7_estonian_cs latin7
latin7_general_ci latin7
latin7_general_cs latin7
macce_bin macce
macce_general_ci macce
macroman_bin macroman
macroman_general_ci macroman
sjis_bin sjis
sjis_japanese_ci sjis
swe7_bin swe7
swe7_swedish_ci swe7
tis620_bin tis620
tis620_thai_ci tis620
ucs2_bin ucs2
ucs2_czech_ci ucs2
ucs2_danish_ci ucs2
ucs2_esperanto_ci ucs2
ucs2_estonian_ci ucs2
ucs2_general_ci ucs2
ucs2_hungarian_ci ucs2
ucs2_icelandic_ci ucs2
ucs2_latvian_ci ucs2
ucs2_lithuanian_ci ucs2
ucs2_persian_ci ucs2
ucs2_polish_ci ucs2
ucs2_romanian_ci ucs2
ucs2_roman_ci ucs2
ucs2_slovak_ci ucs2
ucs2_slovenian_ci ucs2
ucs2_spanish2_ci ucs2
ucs2_spanish_ci ucs2
ucs2_swedish_ci ucs2
ucs2_turkish_ci ucs2
ucs2_unicode_ci ucs2
ujis_bin ujis
ujis_japanese_ci ujis
utf8_bin utf8
utf8_czech_ci utf8
utf8_danish_ci utf8
utf8_esperanto_ci utf8
utf8_estonian_ci utf8
utf8_general_ci utf8
utf8_hungarian_ci utf8
utf8_icelandic_ci utf8
utf8_latvian_ci utf8
utf8_lithuanian_ci utf8
utf8_persian_ci utf8
utf8_polish_ci utf8
utf8_romanian_ci utf8
utf8_roman_ci utf8
utf8_slovak_ci utf8
utf8_slovenian_ci utf8
utf8_spanish2_ci utf8
utf8_spanish_ci utf8
utf8_swedish_ci utf8
utf8_turkish_ci utf8
utf8_unicode_ci utf8
# Switch to connection default + disconnect con
DROP USER dbdict_test@localhost;

View file

@ -1,22 +0,0 @@
DELETE FROM mysql.help_category LIMIT <number>;
DELETE FROM mysql.help_keyword LIMIT <number>;
DELETE FROM mysql.help_relation LIMIT <number>;
DELETE FROM mysql.help_topic LIMIT <number>;
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 30 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 320 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 640 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 380 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
SELECT * FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 30 NULL NULL BTREE
NULL mysql help_category 0 mysql name 1 name A 30 NULL NULL BTREE
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 320 NULL NULL BTREE
NULL mysql help_keyword 0 mysql name 1 name A 320 NULL NULL BTREE
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 640 NULL NULL BTREE
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 380 NULL NULL BTREE
NULL mysql help_topic 0 mysql name 1 name A 380 NULL NULL BTREE

View file

@ -1,18 +0,0 @@
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
SELECT * FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);

View file

@ -1,67 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb4;
create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float,
f199 float unsigned,
f200 float zerofill,
f201 float unsigned zerofill,
f202 float(0),
f203 float(23),
f204 float(0) unsigned,
f205 float(23) unsigned,
f206 float(0) zerofill,
f207 float(23) zerofill,
f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill,
f210 float(24),
f211 float(53),
f212 float(24) unsigned,
f213 float(53) unsigned,
f214 float(24) zerofill,
f215 float(53) zerofill,
f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill,
f218 date,
f219 time,
f220 datetime,
f221 timestamp,
f222 year,
f223 year(3),
f224 year(4),
f225 enum("1enum","2enum"),
f226 set("1set","2set"),
f235 char(0) unicode,
f236 char(90),
f237 char(255) ascii,
f238 varchar(0),
f239 varchar(20000) binary,
f240 varchar(2000) unicode,
f241 char(100) unicode
) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ;
NOT YET IMPLEMENTED: bitdata tests
--------------------------------------------------------------------------------

View file

@ -1,81 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb1 ;
create table tb1 (
f1 char(0),
f2 char(0) binary,
f3 char(0) ascii,
f4 tinytext unicode,
f5 text,
f6 mediumtext,
f7 longtext,
f8 tinyblob,
f9 blob,
f10 mediumblob,
f11 longblob,
f12 binary,
f13 tinyint,
f14 tinyint unsigned,
f15 tinyint zerofill,
f16 tinyint unsigned zerofill,
f17 smallint,
f18 smallint unsigned,
f19 smallint zerofill,
f20 smallint unsigned zerofill,
f21 mediumint,
f22 mediumint unsigned,
f23 mediumint zerofill,
f24 mediumint unsigned zerofill,
f25 int,
f26 int unsigned,
f27 int zerofill,
f28 int unsigned zerofill,
f29 bigint,
f30 bigint unsigned,
f31 bigint zerofill,
f32 bigint unsigned zerofill,
f33 decimal,
f34 decimal unsigned,
f35 decimal zerofill,
f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = innodb;
Warnings:
Note 1265 Data truncated for column 'f36' at row 1
Note 1265 Data truncated for column 'f37' at row 1
Note 1265 Data truncated for column 'f38' at row 1
Note 1265 Data truncated for column 'f39' at row 1
Note 1265 Data truncated for column 'f40' at row 1
Note 1265 Data truncated for column 'f41' at row 1
Note 1265 Data truncated for column 'f42' at row 1
Note 1265 Data truncated for column 'f43' at row 1
Note 1265 Data truncated for column 'f44' at row 1
Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
NOT YET IMPLEMENTED: cursor tests
--------------------------------------------------------------------------------

View file

@ -307,7 +307,7 @@ A ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
A-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 192 OR select_id IS NULL) order by id;
@ -439,7 +439,7 @@ my_decimal, id FROM t1_values
WHERE select_id = 183 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 183 OR select_id IS NULL) order by id;
@ -453,7 +453,7 @@ my_double, id FROM t1_values
WHERE select_id = 182 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 182 OR select_id IS NULL) order by id;
@ -467,7 +467,7 @@ my_bigint, id FROM t1_values
WHERE select_id = 181 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',_latin1' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 181 OR select_id IS NULL) order by id;
@ -481,7 +481,7 @@ my_varbinary_1000, id FROM t1_values
WHERE select_id = 180 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 180 OR select_id IS NULL) order by id;
@ -495,7 +495,7 @@ my_binary_30, id FROM t1_values
WHERE select_id = 179 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 179 OR select_id IS NULL) order by id;
@ -509,7 +509,7 @@ my_varchar_1000, id FROM t1_values
WHERE select_id = 178 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 178 OR select_id IS NULL) order by id;
@ -523,7 +523,7 @@ my_char_30, id FROM t1_values
WHERE select_id = 177 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 177 OR select_id IS NULL) order by id;
@ -761,7 +761,7 @@ my_varbinary_1000, id FROM t1_values
WHERE select_id = 160 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 160 OR select_id IS NULL) order by id;
@ -775,7 +775,7 @@ my_binary_30, id FROM t1_values
WHERE select_id = 159 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 159 OR select_id IS NULL) order by id;
@ -789,7 +789,7 @@ my_varchar_1000, id FROM t1_values
WHERE select_id = 158 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 158 OR select_id IS NULL) order by id;
@ -803,7 +803,7 @@ my_char_30, id FROM t1_values
WHERE select_id = 157 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 157 OR select_id IS NULL) order by id;
@ -826,7 +826,7 @@ LOAD_FILE('../tmp/func_view.dat') id
5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL) order by id;
@ -914,7 +914,7 @@ Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308'
Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 151 OR select_id IS NULL) order by id;
@ -944,7 +944,7 @@ Error 1292 Truncated incorrect DECIMAL value: ''
Error 1292 Truncated incorrect DECIMAL value: ''
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 150 OR select_id IS NULL) order by id;
@ -971,7 +971,7 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3
-1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 149 OR select_id IS NULL) order by id;
@ -1101,7 +1101,7 @@ my_char_30, id FROM t1_values
WHERE select_id = 143 OR select_id IS NULL order by id;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate(_latin1'char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 143 OR select_id IS NULL) order by id;
@ -1225,7 +1225,7 @@ IS_NULL NULL 1
2005 2005 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,_latin1'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 138 OR select_id IS NULL) order by id;
@ -1251,7 +1251,7 @@ IS_NULL NULL 1
10:00:00 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,_latin1'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 137 OR select_id IS NULL) order by id;
@ -1277,7 +1277,7 @@ IFNULL(my_timestamp,'IS_NULL') my_timestamp id
2005-06-28 10:00:00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,_latin1'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 136 OR select_id IS NULL) order by id;
@ -1303,7 +1303,7 @@ IS_NULL NULL 1
2005-06-28 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,_latin1'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 135 OR select_id IS NULL) order by id;
@ -1329,7 +1329,7 @@ IS_NULL NULL 1
2005-06-28 10:00:00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,_latin1'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 134 OR select_id IS NULL) order by id;
@ -1355,7 +1355,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,_latin1'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 133 OR select_id IS NULL) order by id;
@ -1381,7 +1381,7 @@ IS_NULL NULL 1
-1.000000000000000000000000000000 -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,_latin1'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 132 OR select_id IS NULL) order by id;
@ -1407,7 +1407,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,_latin1'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 131 OR select_id IS NULL) order by id;
@ -1433,7 +1433,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,_latin1'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 130 OR select_id IS NULL) order by id;
@ -1459,7 +1459,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,_latin1'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL) order by id;
@ -1485,7 +1485,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,_latin1'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 128 OR select_id IS NULL) order by id;
@ -1511,7 +1511,7 @@ IS_NULL NULL 1
-1 -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,_latin1'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 127 OR select_id IS NULL) order by id;
@ -1538,7 +1538,7 @@ IS NOT NULL 2000 4
IS NOT NULL 2005 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_year`),'IS NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1567,7 +1567,7 @@ IS NOT NULL 13:00:00 4
IS NOT NULL 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_time`),'IS NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1596,7 +1596,7 @@ IS NOT NULL 2004-02-29 23:59:59 4
IS NOT NULL 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_timestamp`),'IS NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1625,7 +1625,7 @@ IS NOT NULL 2004-02-29 4
IS NOT NULL 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_date`),'IS NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1654,7 +1654,7 @@ IS NOT NULL 2004-02-29 23:59:59 4
IS NOT NULL 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_datetime`),'IS NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1683,7 +1683,7 @@ IS NOT NULL 0 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_double`),'IS NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1712,7 +1712,7 @@ IS NOT NULL 0.000000000000000000000000000000 4
IS NOT NULL -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_decimal`),'IS NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1741,7 +1741,7 @@ IS NOT NULL 0 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_bigint`),'IS NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1770,7 +1770,7 @@ IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varbinary_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1799,7 +1799,7 @@ IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1828,7 +1828,7 @@ IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_varchar_1000`),'IS NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1857,7 +1857,7 @@ IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL',
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_char_30`),'IS NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL',
'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
@ -1885,7 +1885,7 @@ IS TRUE 2000 4
IS TRUE 2005 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_year`,'IS TRUE','IS NOT TRUE') AS `IF(my_year, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 114 OR select_id IS NULL) order by id;
@ -1911,7 +1911,7 @@ IS TRUE 13:00:00 4
IS TRUE 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_time`,'IS TRUE','IS NOT TRUE') AS `IF(my_time, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 113 OR select_id IS NULL) order by id;
@ -1937,7 +1937,7 @@ IS TRUE 2004-02-29 23:59:59 4
IS TRUE 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_timestamp`,'IS TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 112 OR select_id IS NULL) order by id;
@ -1963,7 +1963,7 @@ IS TRUE 2004-02-29 4
IS TRUE 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_date`,'IS TRUE','IS NOT TRUE') AS `IF(my_date, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 111 OR select_id IS NULL) order by id;
@ -1989,7 +1989,7 @@ IS TRUE 2004-02-29 23:59:59 4
IS TRUE 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_datetime`,'IS TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 110 OR select_id IS NULL) order by id;
@ -2015,7 +2015,7 @@ IS NOT TRUE 0 4
IS TRUE -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_double`,'IS TRUE','IS NOT TRUE') AS `IF(my_double, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 109 OR select_id IS NULL) order by id;
@ -2041,7 +2041,7 @@ IS NOT TRUE 0.000000000000000000000000000000 4
IS TRUE -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_decimal`,'IS TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 108 OR select_id IS NULL) order by id;
@ -2067,7 +2067,7 @@ IS NOT TRUE 0 4
IS TRUE -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_bigint`,'IS TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 107 OR select_id IS NULL) order by id;
@ -2093,7 +2093,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 106 OR select_id IS NULL) order by id;
@ -2124,7 +2124,7 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---
Warning 1292 Truncated incorrect DOUBLE value: '-1'
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_binary_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL) order by id;
@ -2155,7 +2155,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 104 OR select_id IS NULL) order by id;
@ -2184,7 +2184,7 @@ Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,_latin1'IS TRUE',_latin1'IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_char_30`,'IS TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 103 OR select_id IS NULL) order by id;

View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------
@ -4902,13 +4900,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
read_only:BEGIN
SELECT @x;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read_only:BEGIN
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
read_write:BEGIN

2
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result Executable file → Normal file
View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

2
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result Executable file → Normal file
View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

2
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result Executable file → Normal file
View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

2
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result Executable file → Normal file
View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

2
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result Executable file → Normal file
View file

@ -1,8 +1,6 @@
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -367,3 +366,4 @@ select @test_var1, @test_var2, @test_var3;
trig1_b trig1_a trig2
drop database trig_db1;
drop database trig_db2;
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -698,3 +697,4 @@ drop database if exists priv_db;
drop user test_yesprivs@localhost;
drop user test_noprivs@localhost;
drop user test_noprivs;
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
Testcase for db level:

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -478,3 +477,4 @@ Testcase 3.5.7.17 (see Testcase 3.5.1.1)
drop user test_general@localhost;
drop user test_general;
drop user test_super@localhost;
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -534,3 +533,4 @@ ERROR HY000: Explicit or implicit commit is not allowed in stored function or tr
drop user test_general@localhost;
drop user test_general;
drop user test_super@localhost;
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -270,3 +269,4 @@ drop trigger trg6c;
Testcase 3.5.9.14: (implied in previous tests)
----------------------------------------------
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -397,3 +396,4 @@ drop table t1;
drop table t2;
drop table t3;
drop table t4;
DROP TABLE test.tb3;

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb3 ;
create table tb3 (
@ -138,3 +137,4 @@ drop table t2, t1, t0;
Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test)
-------------------------------------------------------------------
DROP TABLE test.tb3;

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,3 @@
SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
drop table if exists tb2 ;
create table tb2 (
@ -22896,4 +22895,5 @@ DROP VIEW IF EXISTS v1_secondview;
DROP VIEW IF EXISTS v2;
DROP DATABASE IF EXISTS test2;
DROP DATABASE IF EXISTS test3;
DROP DATABASE IF EXISTS test1;
DROP DATABASE test1;
DROP TABLE test.tb2;

View file

@ -0,0 +1,602 @@
SHOW DATABASES LIKE 'information_schema';
Database (information_schema)
information_schema
#######################################################################
# Testcase 3.2.1.20: USE INFORMATION_SCHEMA is supported
#######################################################################
# Switch to connection default
USE test;
SELECT DATABASE();
DATABASE()
test
USE information_schema;
SELECT DATABASE();
DATABASE()
information_schema
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
# Establish connection testuser1 (user=testuser1)
SELECT DATABASE();
DATABASE()
test
USE information_schema;
SELECT DATABASE();
DATABASE()
information_schema
# Switch to connection default and close connection testuser1
DROP USER 'testuser1'@'localhost';
#######################################################################
# Testcase TBD1: The INFORMATION_SCHEMA cannot be dropped.
#######################################################################
DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
#######################################################################
# Testcase TBD2: There cannot be a second database INFORMATION_SCHEMA.
#######################################################################
CREATE DATABASE information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
##################################################################################
# Testcase 3.2.1.6+3.2.1.7: No user may create an INFORMATION_SCHEMA table or view
##################################################################################
# Switch to connection default (user=root)
USE information_schema;
CREATE TABLE schemata ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE tables ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE columns ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE character_sets ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE collations ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE collation_character_set_applicability ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE routines ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE statistics ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE views ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE user_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE schema_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE table_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE column_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE table_constraints ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE key_column_usage ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE triggers ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
ERROR 42S02: Unknown table 't1' in information_schema
CREATE VIEW tables AS SELECT 'garbage';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE VIEW tables AS SELECT * FROM information_schema.tables;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE VIEW v1 AS SELECT 'garbage';
ERROR 42S02: Unknown table 'v1' in information_schema
USE test;
CREATE TABLE information_schema. schemata ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. tables ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. columns ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. character_sets ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. collations ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. routines ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. statistics ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. views ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. user_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. schema_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. table_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. column_privileges ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. table_constraints ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. key_column_usage ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. triggers ( c1 INT );
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
ERROR 42S02: Unknown table 't1' in information_schema
CREATE VIEW information_schema.tables AS SELECT 'garbage';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE VIEW information_schema.tables AS
SELECT * FROM information_schema.tables;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE VIEW information_schema.v1 AS SELECT 'garbage';
ERROR 42S02: Unknown table 'v1' in information_schema
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
GRANT ALL ON *.* TO testuser1@localhost;
SHOW GRANTS FOR testuser1@localhost;
Grants for testuser1@localhost
GRANT ALL PRIVILEGES ON *.* TO 'testuser1'@'localhost'
# Establish connection testuser1 (user=testuser1)
USE information_schema;
CREATE TABLE schemata ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE tables ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE columns ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE character_sets ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE collations ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE collation_character_set_applicability ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE routines ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE statistics ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE views ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE user_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE schema_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE table_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE column_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE table_constraints ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE key_column_usage ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE triggers ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
ERROR 42S02: Unknown table 't1' in information_schema
CREATE VIEW tables AS SELECT 'garbage';
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE VIEW tables AS SELECT * FROM information_schema.tables;
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE VIEW v1 AS SELECT 'garbage';
ERROR 42S02: Unknown table 'v1' in information_schema
USE test;
CREATE TABLE information_schema. schemata ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. tables ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. columns ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. character_sets ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. collations ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. routines ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. statistics ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. views ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. user_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. schema_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. table_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. column_privileges ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. table_constraints ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. key_column_usage ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema. triggers ( c1 INT );
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
ERROR 42S02: Unknown table 't1' in information_schema
CREATE VIEW information_schema.tables AS SELECT 'garbage';
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE VIEW information_schema.tables AS
SELECT * FROM information_schema.tables;
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema'
CREATE VIEW information_schema.v1 AS SELECT 'garbage';
ERROR 42S02: Unknown table 'v1' in information_schema
# Switch to connection default (user=root) and close connection testuser1
DROP USER 'testuser1'@'localhost';
###############################################################################
# Testcase 3.2.1.1+3.2.1.2: INFORMATION_SCHEMA tables can be queried via SELECT
###############################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1_first (f1 BIGINT UNIQUE, f2 BIGINT)
ENGINE = <some_engine>;
CREATE TABLE db_datadict.t1_second (f1 BIGINT UNIQUE, f2 BIGINT)
ENGINE = <some_engine>;
# Attention: The protocolling of the next result set is disabled.
SELECT * FROM information_schema.tables;
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'db_datadict';
table_name
t1_first
t1_second
SELECT LENGTH(table_name) FROM information_schema.tables
WHERE table_schema = 'db_datadict' ORDER BY table_name;
LENGTH(table_name)
8
9
SELECT count(table_name) FROM information_schema.tables
WHERE table_schema LIKE 'db_datadic%';
count(table_name)
2
SELECT CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1))
FROM information_schema.tables
WHERE table_schema = 'db_datadict';
CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1))
19.0
20.0
SELECT table_name FROM information_schema.tables
WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1;
table_name
t1_first
SELECT table_name FROM information_schema.tables
WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1,1;
table_name
t1_second
SELECT table_name,table_schema AS my_col FROM information_schema.tables
WHERE table_name = 't1_first' AND table_schema = 'db_datadict';
table_name my_col
t1_first db_datadict
SELECT HIGH_PRIORITY table_name AS my_col FROM information_schema.tables
WHERE table_name = 't1_first' OR table_name = 't1_second';
my_col
t1_first
t1_second
SELECT 1 AS my_col FROM information_schema.tables
WHERE table_name = 't1_third';
my_col
SELECT table_name,table_schema INTO @table_name,@table_schema
FROM information_schema.tables
WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1;
SELECT @table_name,@table_schema;
@table_name @table_schema
t1_first db_datadict
SELECT table_name,table_schema
INTO OUTFILE '<OUTFILE>'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM information_schema.tables
WHERE table_schema = 'db_datadict' ORDER BY table_name;
"t1_first","db_datadict"
"t1_second","db_datadict"
SELECT table_name FROM information_schema.tables
WHERE table_name = 't1_first'
UNION ALL
SELECT table_name FROM information_schema.tables
WHERE table_name = 't1_second';
table_name
t1_first
t1_second
SELECT DISTINCT table_schema FROM information_schema.tables
WHERE table_name IN (SELECT table_name FROM information_schema.tables
WHERE table_schema = 'db_datadict')
ORDER BY table_name;
table_schema
db_datadict
SELECT table_name FROM information_schema.tables t1
LEFT JOIN information_schema.tables t2 USING(table_name,table_schema)
WHERE t2.table_schema = 'db_datadict'
ORDER BY table_name;
table_name
t1_first
t1_second
USE test;
SELECT * FROM tables;
ERROR 42S02: Table 'test.tables' doesn't exist
#########################################################################
# Testcase 3.2.1.17+3.2.1.18
#########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT UNIQUE, f2 BIGINT)
ENGINE = <some_engine>;
SELECT * FROM db_datadict.t1;
f1 f2
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
CREATE USER 'testuser2'@'localhost';
GRANT CREATE VIEW,SELECT ON db_datadict.* TO testuser1@localhost
WITH GRANT OPTION;
GRANT USAGE ON db_datadict.* TO testuser2@localhost;
FLUSH PRIVILEGES;
GRANT SELECT on information_schema.* TO testuser1@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
# Establish connection testuser1 (user=testuser1)
SELECT table_schema,table_name FROM information_schema.tables
WHERE table_schema = 'information_schema' AND table_name = 'tables';
table_schema table_name
information_schema tables
SELECT * FROM information_schema.table_privileges
WHERE table_schema = 'information_schema';
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
SELECT * FROM information_schema.schema_privileges
WHERE table_schema = 'information_schema';
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
CREATE VIEW db_datadict.v2 AS
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict';
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM db_datadict.v2;
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
db_datadict t1 BASE TABLE
db_datadict v2 VIEW
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict';
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
db_datadict t1 BASE TABLE
db_datadict v2 VIEW
GRANT SELECT ON db_datadict.v2 to testuser2@localhost;
# Establish connection testuser2 (user=testuser2)
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM db_datadict.v2;
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
db_datadict v2 VIEW
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict';
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
db_datadict v2 VIEW
# Switch to connection default and close connections testuser1 and testuser2
DROP USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
DROP DATABASE db_datadict;
#########################################################################
# Testcase 3.2.1.19
#########################################################################
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
SELECT 'empty result set was expected' AS my_col
FROM information_schema.schema_privileges
WHERE table_schema = 'information_schema';
my_col
SELECT 'empty result set was expected' AS my_col
FROM information_schema.table_privileges
WHERE table_schema = 'information_schema';
my_col
SELECT 'empty result set was expected' AS my_col
FROM information_schema.column_privileges
WHERE table_schema = 'information_schema';
my_col
GRANT ALTER ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT ALTER ROUTINE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT CREATE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT CREATE ROUTINE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT CREATE TEMPORARY TABLES ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT DELETE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT DROP ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT EXECUTE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT INDEX ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT INSERT ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT LOCK TABLES ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
GRANT UPDATE ON information_schema.*
TO 'testuser1'@'localhost';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
SELECT 'empty result set was expected' AS my_col
FROM information_schema.schema_privileges
WHERE table_schema = 'information_schema';
my_col
SELECT 'empty result set was expected' AS my_col
FROM information_schema.table_privileges
WHERE table_schema = 'information_schema';
my_col
SELECT 'empty result set was expected' AS my_col
FROM information_schema.column_privileges
WHERE table_schema = 'information_schema';
my_col
DROP USER 'testuser1'@'localhost';
#########################################################################
# Testcase 3.2.1.16
#########################################################################
SELECT DISTINCT table_schema FROM information_schema.columns
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT table_schema FROM information_schema.column_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.key_column_usage
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
SELECT DISTINCT routine_schema FROM information_schema.routines
WHERE routine_schema LIKE 'db_data%';
routine_schema
SELECT DISTINCT schema_name FROM information_schema.schemata
WHERE schema_name LIKE 'db_data%';
schema_name
SELECT DISTINCT table_schema FROM information_schema.schema_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
table_schema index_schema
SELECT DISTINCT table_schema FROM information_schema.tables
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.table_constraints
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
SELECT DISTINCT table_schema FROM information_schema.table_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT trigger_schema,event_object_schema
FROM information_schema.triggers
WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
trigger_schema event_object_schema
SELECT DISTINCT table_schema FROM information_schema.views
WHERE table_schema LIKE 'db_data%';
table_schema
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT NOT NULL, f3 BIGINT,
PRIMARY KEY(f1))
ENGINE = <some_engine>;
CREATE UNIQUE INDEX UIDX ON db_datadict.t1(f3);
CREATE PROCEDURE db_datadict.sproc1() SELECT 'db_datadict';
CREATE FUNCTION db_datadict.func1() RETURNS INT RETURN 0;
CREATE TRIGGER db_datadict.trig1 BEFORE INSERT ON db_datadict.t1
FOR EACH ROW SET @aux = 1;
CREATE VIEW db_datadict.v1 AS SELECT * FROM db_datadict.t1;
CREATE VIEW db_datadict.v2 AS SELECT * FROM information_schema.tables;
SELECT DISTINCT table_schema FROM information_schema.columns
WHERE table_schema LIKE 'db_data%';
table_schema
db_datadict
SELECT DISTINCT table_schema FROM information_schema.column_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.key_column_usage
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
db_datadict db_datadict
SELECT DISTINCT routine_schema FROM information_schema.routines
WHERE routine_schema LIKE 'db_data%';
routine_schema
db_datadict
SELECT DISTINCT schema_name FROM information_schema.schemata
WHERE schema_name LIKE 'db_data%';
schema_name
db_datadict
SELECT DISTINCT table_schema FROM information_schema.schema_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
table_schema index_schema
db_datadict db_datadict
SELECT DISTINCT table_schema FROM information_schema.tables
WHERE table_schema LIKE 'db_data%';
table_schema
db_datadict
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.table_constraints
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
db_datadict db_datadict
SELECT DISTINCT table_schema FROM information_schema.table_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT trigger_schema,event_object_schema
FROM information_schema.triggers
WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
trigger_schema event_object_schema
db_datadict db_datadict
SELECT DISTINCT table_schema FROM information_schema.views
WHERE table_schema LIKE 'db_data%';
table_schema
db_datadict
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
GRANT ALL ON test.* TO 'testuser1'@'localhost';
# Establish connection testuser1 (user=testuser1)
SELECT DISTINCT table_schema FROM information_schema.columns
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT table_schema FROM information_schema.column_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.key_column_usage
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
SELECT DISTINCT routine_schema FROM information_schema.routines
WHERE routine_schema LIKE 'db_data%';
routine_schema
SELECT DISTINCT schema_name FROM information_schema.schemata
WHERE schema_name LIKE 'db_data%';
schema_name
SELECT DISTINCT table_schema FROM information_schema.schema_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics
WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%';
table_schema index_schema
SELECT DISTINCT table_schema FROM information_schema.tables
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT constraint_schema,table_schema
FROM information_schema.table_constraints
WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%';
constraint_schema table_schema
SELECT DISTINCT table_schema FROM information_schema.table_privileges
WHERE table_schema LIKE 'db_data%';
table_schema
SELECT DISTINCT trigger_schema,event_object_schema
FROM information_schema.triggers
WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%';
trigger_schema event_object_schema
SELECT DISTINCT table_schema FROM information_schema.views
WHERE table_schema LIKE 'db_data%';
table_schema
# Switch to connection default and close connections testuser1 and testuser2
DROP USER 'testuser1'@'localhost';
DROP DATABASE db_datadict;
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP PROCEDURE IF EXISTS test.p1;
CREATE PROCEDURE test.p1()
INSERT INTO information_schema.tables
SELECT * FROM information_schema.tables LIMIT 1;
CALL test.p1();
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP PROCEDURE test.p1;
CREATE PROCEDURE test.p1()
UPDATE information_schema.columns SET table_schema = 'garbage';
CALL test.p1();
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP PROCEDURE test.p1;
CREATE PROCEDURE test.p1()
DELETE FROM information_schema.schemata;
CALL test.p1();
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP PROCEDURE test.p1;
#########################################################################
# Testcase 3.2.17.1+3.2.17.2: To be implemented outside of this script
#########################################################################

View file

@ -0,0 +1,78 @@
SHOW TABLES FROM information_schema LIKE 'CHARACTER_SETS';
Tables_in_information_schema (CHARACTER_SETS)
CHARACTER_SETS
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.CHARACTER_SETS;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.CHARACTER_SETS;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.CHARACTER_SETS;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.CHARACTER_SETS;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout
#########################################################################
DESCRIBE information_schema.CHARACTER_SETS;
Field Type Null Key Default Extra
CHARACTER_SET_NAME varchar(64) NO
DEFAULT_COLLATE_NAME varchar(64) NO
DESCRIPTION varchar(60) NO
MAXLEN bigint(3) NO 0
SHOW CREATE TABLE information_schema.CHARACTER_SETS;
Table Create Table
CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.CHARACTER_SETS;
Field Type Null Key Default Extra
CHARACTER_SET_NAME varchar(64) NO
DEFAULT_COLLATE_NAME varchar(64) NO
DESCRIPTION varchar(60) NO
MAXLEN bigint(3) NO 0
# Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
INSERT INTO information_schema.character_sets
SELECT * FROM information_schema.character_sets;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.character_sets SET description = 'just updated';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.character_sets WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.character_sets;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx ON information_schema.character_sets(character_set_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.character_sets DROP PRIMARY KEY;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.character_sets ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.character_sets;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.character_sets
RENAME information_schema.xcharacter_sets;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

View file

@ -0,0 +1,76 @@
SHOW TABLES FROM information_schema LIKE 'COLLATION_CHARACTER_SET_APPLICABILITY';
Tables_in_information_schema (COLLATION_CHARACTER_SET_APPLICABILITY)
COLLATION_CHARACTER_SET_APPLICABILITY
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.4.1: INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY layout
#########################################################################
DESCRIBE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
Field Type Null Key Default Extra
COLLATION_NAME varchar(64) NO
CHARACTER_SET_NAME varchar(64) NO
SHOW CREATE TABLE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
Table Create Table
COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` (
`COLLATION_NAME` varchar(64) NOT NULL DEFAULT '',
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY;
Field Type Null Key Default Extra
COLLATION_NAME varchar(64) NO
CHARACTER_SET_NAME varchar(64) NO
# Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
INSERT INTO information_schema.collation_character_set_applicability
SELECT * FROM information_schema.collation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.collation_character_set_applicability
SET collation_name = 'big6_chinese_ci' WHERE character_set_name = 'big6';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.collation_character_set_applicability
SET character_set_name = 't_4711';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.collation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.collation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx
ON information_schema.collation_character_set_applicability(collation_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collation_character_set_applicability ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.collation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collation_character_set_applicability
RENAME db_datadict.collation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collation_character_set_applicability
RENAME information_schema.xcollation_character_set_applicability;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

View file

@ -0,0 +1,90 @@
SHOW TABLES FROM information_schema LIKE 'COLLATIONS';
Tables_in_information_schema (COLLATIONS)
COLLATIONS
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATIONS;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATIONS;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.COLLATIONS;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.COLLATIONS;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.3.1: INFORMATION_SCHEMA.COLLATIONS layout
#########################################################################
DESCRIBE information_schema.COLLATIONS;
Field Type Null Key Default Extra
COLLATION_NAME varchar(64) NO
CHARACTER_SET_NAME varchar(64) NO
ID bigint(11) NO 0
IS_DEFAULT varchar(3) NO
IS_COMPILED varchar(3) NO
SORTLEN bigint(3) NO 0
SHOW CREATE TABLE information_schema.COLLATIONS;
Table Create Table
COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` (
`COLLATION_NAME` varchar(64) NOT NULL DEFAULT '',
`CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '',
`ID` bigint(11) NOT NULL DEFAULT '0',
`IS_DEFAULT` varchar(3) NOT NULL DEFAULT '',
`IS_COMPILED` varchar(3) NOT NULL DEFAULT '',
`SORTLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLLATIONS;
Field Type Null Key Default Extra
COLLATION_NAME varchar(64) NO
CHARACTER_SET_NAME varchar(64) NO
ID bigint(11) NO 0
IS_DEFAULT varchar(3) NO
IS_COMPILED varchar(3) NO
SORTLEN bigint(3) NO 0
# Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
INSERT INTO information_schema.collations
SELECT * FROM information_schema.collations;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
INSERT INTO information_schema.collations
(collation_name,character_set_name,id,is_default,is_compiled,sortlen)
VALUES ( 'cp1251_bin', 'cp1251',50, '', '',0);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.collations SET description = 'just updated';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.collations WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.collations;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx ON information_schema.collations(character_set_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collations DROP PRIMARY KEY;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collations ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collations ENABLE KEYS;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.collations;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collations RENAME db_datadict.collations;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.collations
RENAME information_schema.xcollations;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

View file

@ -0,0 +1,372 @@
SHOW TABLES FROM information_schema LIKE 'COLUMN_PRIVILEGES';
Tables_in_information_schema (COLUMN_PRIVILEGES)
COLUMN_PRIVILEGES
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMN_PRIVILEGES;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMN_PRIVILEGES;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.COLUMN_PRIVILEGES;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.COLUMN_PRIVILEGES;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.5.1: INFORMATION_SCHEMA.COLUMN_PRIVILEGES layout
#########################################################################
DESCRIBE information_schema.COLUMN_PRIVILEGES;
Field Type Null Key Default Extra
GRANTEE varchar(81) NO
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
PRIVILEGE_TYPE varchar(64) NO
IS_GRANTABLE varchar(3) NO
SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES;
Table Create Table
COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` (
`GRANTEE` varchar(81) NOT NULL DEFAULT '',
`TABLE_CATALOG` varchar(512) DEFAULT NULL,
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
`PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '',
`IS_GRANTABLE` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES;
Field Type Null Key Default Extra
GRANTEE varchar(81) NO
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
PRIVILEGE_TYPE varchar(64) NO
IS_GRANTABLE varchar(3) NO
SELECT table_catalog, table_schema, table_name, column_name, privilege_type
FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name column_name privilege_type
######################################################################
# Testcase 3.2.5.2+3.2.5.3+3.2.5.4:
# INFORMATION_SCHEMA.COLUMN_PRIVILEGES accessible information
######################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 INT, f2 DECIMAL, f3 TEXT)
ENGINE = <other_engine_type>;
USE db_datadict;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
CREATE USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser1'@'localhost';
GRANT INSERT(f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
GRANT UPDATE(f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
GRANT SELECT(f2) ON db_datadict.t1 TO 'testuser2'@'localhost';
GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost';
GRANT SELECT(f3) ON db_datadict.t1 TO 'testuser3'@'localhost';
GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'
WITH GRANT OPTION;
GRANT ALL ON db_datadict.* TO 'testuser3'@'localhost';
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT NO
'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE NO
'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT NO
'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO
'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES
GRANT UPDATE(f3) ON db_datadict.t1 TO 'testuser1'@'localhost'
WITH GRANT OPTION;
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT YES
'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT YES
'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE YES
'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT YES
'testuser1'@'localhost' NULL db_datadict t1 f3 UPDATE YES
'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO
'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT YES
'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT YES
'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE YES
'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT YES
'testuser1'@'localhost' NULL db_datadict t1 f3 UPDATE YES
# Establish connection testuser2 (user=testuser2)
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO
# Establish connection testuser3 (user=testuser3)
# FIXME: Is it correct that granted TABLES do not occur in COLUMN_PRIVILEGES?
SELECT * FROM information_schema.table_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee,table_schema,table_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser3'@'localhost' NULL db_datadict t1 INSERT YES
'testuser3'@'localhost' NULL db_datadict t1 SELECT YES
SELECT * FROM information_schema.schema_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee,table_schema,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
'testuser3'@'localhost' NULL db_datadict ALTER NO
'testuser3'@'localhost' NULL db_datadict ALTER ROUTINE NO
'testuser3'@'localhost' NULL db_datadict CREATE NO
'testuser3'@'localhost' NULL db_datadict CREATE ROUTINE NO
'testuser3'@'localhost' NULL db_datadict CREATE TEMPORARY TABLES NO
'testuser3'@'localhost' NULL db_datadict CREATE VIEW NO
'testuser3'@'localhost' NULL db_datadict DELETE NO
'testuser3'@'localhost' NULL db_datadict DROP NO
'testuser3'@'localhost' NULL db_datadict EVENT NO
'testuser3'@'localhost' NULL db_datadict EXECUTE NO
'testuser3'@'localhost' NULL db_datadict INDEX NO
'testuser3'@'localhost' NULL db_datadict INSERT NO
'testuser3'@'localhost' NULL db_datadict LOCK TABLES NO
'testuser3'@'localhost' NULL db_datadict REFERENCES NO
'testuser3'@'localhost' NULL db_datadict SELECT NO
'testuser3'@'localhost' NULL db_datadict SHOW VIEW NO
'testuser3'@'localhost' NULL db_datadict TRIGGER NO
'testuser3'@'localhost' NULL db_datadict UPDATE NO
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES
GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser2'@'localhost';
# FIXME: Is it intended that *my* grants to others are *NOT* shown here?
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES
# Switch to connection testuser2 (user=testuser2)
SELECT * FROM information_schema.column_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser2'@'localhost' NULL db_datadict t1 f1 SELECT NO
'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO
'testuser2'@'localhost' NULL db_datadict t1 f3 SELECT NO
# Switch to connection default and close connections testuser1,testuser2,testuser3
DROP DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
################################################################################
# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMN_PRIVILEGES modifications
################################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.my_table (f1 BIGINT, f2 CHAR(10), f3 DATE)
ENGINE = <engine_type>;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
GRANT ALL ON test.* TO 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
# Switch to connection default
GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection testuser1
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection default
ALTER TABLE db_datadict.my_table DROP COLUMN f3;
GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection testuser1
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
SELECT f1, f3 FROM db_datadict.my_table;
ERROR 42S22: Unknown column 'f3' in 'field list'
# Switch to connection default
ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection testuser1
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection default
DROP TABLE db_datadict.my_table;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection testuser1
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO
'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO
'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost'
# Switch to connection default
REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
# Switch to connection testuser1
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
ORDER BY grantee, table_schema,table_name,column_name,privilege_type;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost'
# Switch to connection default and close connection testuser1
DROP USER 'testuser1'@'localhost';
DROP DATABASE db_datadict;
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA table are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT)
ENGINE = <engine_type>;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost';
INSERT INTO information_schema.column_privileges
SELECT * FROM information_schema.column_privileges;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.column_privileges SET table_schema = 'test'
WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.column_privileges WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.column_privileges;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx_on_tables
ON information_schema.column_privileges(table_schema);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.column_privileges ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.column_privileges;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.column_privileges
RENAME db_datadict.column_privileges;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.column_privileges
RENAME information_schema.xcolumn_privileges;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';

View file

@ -0,0 +1,37 @@
##############################################################################
# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information
##############################################################################
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.column_privileges
WHERE table_schema IN ('information_schema','mysql','test')
ORDER BY table_schema, table_name, column_name;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW DATABASES LIKE 'information_schema';
Database (information_schema)
information_schema
SHOW DATABASES LIKE 'mysql';
Database (mysql)
mysql
SHOW DATABASES LIKE 'test';
Database (test)
test
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.column_privileges
WHERE table_schema IN ('information_schema','mysql','test')
ORDER BY table_schema, table_name, column_name;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
SHOW DATABASES LIKE 'information_schema';
Database (information_schema)
information_schema
SHOW DATABASES LIKE 'mysql';
Database (mysql)
SHOW DATABASES LIKE 'test';
Database (test)
test
# Switch to connection default and close connection testuser1
DROP USER 'testuser1'@'localhost';
DROP DATABASE db_datadict;

View file

@ -0,0 +1,486 @@
SHOW TABLES FROM information_schema LIKE 'COLUMNS';
Tables_in_information_schema (COLUMNS)
COLUMNS
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMNS;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMNS;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.COLUMNS;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.COLUMNS;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.6.1: INFORMATION_SCHEMA.COLUMNS layout
#########################################################################
DESCRIBE information_schema.COLUMNS;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
ORDINAL_POSITION bigint(21) unsigned NO 0
COLUMN_DEFAULT longtext YES NULL
IS_NULLABLE varchar(3) NO
DATA_TYPE varchar(64) NO
CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL
CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL
NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
EXTRA varchar(27) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(255) NO
SHOW CREATE TABLE information_schema.COLUMNS;
Table Create Table
COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`TABLE_CATALOG` varchar(512) DEFAULT NULL,
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
`ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
`COLUMN_DEFAULT` longtext,
`IS_NULLABLE` varchar(3) NOT NULL DEFAULT '',
`DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
`CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL,
`CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL,
`NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL,
`NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL,
`CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`COLUMN_TYPE` longtext NOT NULL,
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
`EXTRA` varchar(27) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLUMNS;
Field Type Null Key Default Extra
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
ORDINAL_POSITION bigint(21) unsigned NO 0
COLUMN_DEFAULT longtext YES NULL
IS_NULLABLE varchar(3) NO
DATA_TYPE varchar(64) NO
CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL
CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL
NUMERIC_PRECISION bigint(21) unsigned YES NULL
NUMERIC_SCALE bigint(21) unsigned YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
COLUMN_TYPE longtext NO NULL
COLUMN_KEY varchar(3) NO
EXTRA varchar(27) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(255) NO
SELECT table_catalog, table_schema, table_name, column_name
FROM information_schema.columns WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name column_name
###############################################################################
# Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information
###############################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
CREATE USER 'testuser2'@'localhost';
CREATE TABLE db_datadict.t1
(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT AUTO_INCREMENT,
UNIQUE INDEX MUL_IDX(f1,f3), PRIMARY KEY (f4))
ENGINE = <other_engine_type>;
CREATE VIEW db_datadict.v1 AS SELECT 1 AS f1, 1 AS f2;
GRANT SELECT(f1, f2) ON db_datadict.t1 TO 'testuser1'@'localhost';
GRANT SELECT(f2) ON db_datadict.v1 TO 'testuser1'@'localhost';
CREATE TABLE db_datadict.t2
(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT, PRIMARY KEY (f1,f4))
ENGINE = <other_engine_type>;
GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost';
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
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 db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) MUL select,insert,update,references
NULL db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
NULL db_datadict t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL db_datadict t1 f4 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) PRI auto_increment select,insert,update,references
NULL db_datadict t2 f1 1 NO char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) PRI select,insert,update,references
NULL db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references
NULL db_datadict t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL db_datadict t2 f4 4 0 NO int NULL NULL 10 0 NULL NULL int(11) PRI select,insert,update,references
NULL db_datadict v1 f1 1 0 NO int NULL NULL 10 0 NULL NULL int(1) select,insert,update,references
NULL db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL int(1) select,insert,update,references
SHOW COLUMNS FROM db_datadict.t1;
Field Type Null Key Default Extra
f1 char(10) YES MUL NULL
f2 text YES NULL
f3 date YES NULL
f4 int(11) NO PRI NULL auto_increment
SHOW COLUMNS FROM db_datadict.t2;
Field Type Null Key Default Extra
f1 char(10) NO PRI
f2 text YES NULL
f3 date YES NULL
f4 int(11) NO PRI 0
SHOW COLUMNS FROM db_datadict.v1;
Field Type Null Key Default Extra
f1 int(1) NO 0
f2 int(1) NO 0
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
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 db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) MUL select
NULL db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select
NULL db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL int(1) select
SHOW COLUMNS FROM db_datadict.t1;
Field Type Null Key Default Extra
f1 char(10) YES MUL NULL
f2 text YES NULL
SHOW COLUMNS FROM db_datadict.t2;
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2'
SHOW COLUMNS FROM db_datadict.v1;
Field Type Null Key Default Extra
f2 int(1) NO 0
# Establish connection testuser2 (user=testuser2)
SELECT * FROM information_schema.columns
WHERE table_schema = 'db_datadict'
ORDER BY table_schema, table_name, ordinal_position;
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 db_datadict t2 f1 1 NO char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) PRI insert
NULL db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text insert
SHOW COLUMNS FROM db_datadict.t1;
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 't1'
SHOW COLUMNS FROM db_datadict.t2;
Field Type Null Key Default Extra
f1 char(10) NO PRI
f2 text YES NULL
SHOW COLUMNS FROM db_datadict.v1;
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'v1'
# Switch to connection default and close connections testuser1, testuser2
DROP USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
DROP DATABASE IF EXISTS db_datadict;
###############################################################################
# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMNS modifications
###############################################################################
DROP TABLE IF EXISTS test.t1_my_table;
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
SELECT table_name FROM information_schema.columns
WHERE table_name LIKE 't1_my_table%';
table_name
CREATE TABLE test.t1_my_table (f1 CHAR(12))
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
ENGINE = <engine_type>;
SELECT * FROM information_schema.columns
WHERE table_name = 't1_my_table';
TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1_my_table
COLUMN_NAME f1
ORDINAL_POSITION 1
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE char
CHARACTER_MAXIMUM_LENGTH 12
CHARACTER_OCTET_LENGTH 12
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME latin1
COLLATION_NAME latin1_swedish_ci
COLUMN_TYPE char(12)
COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
SELECT table_name FROM information_schema.columns
WHERE table_name LIKE 't1_my_table%';
table_name
t1_my_table
RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
SELECT table_name FROM information_schema.columns
WHERE table_name LIKE 't1_my_table%';
table_name
t1_my_tablex
SELECT table_schema,table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_schema table_name
test t1_my_tablex
RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
SELECT table_schema,table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_schema table_name
db_datadict t1_my_tablex
SELECT table_name, column_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex f1
ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
SELECT table_name, column_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex first_col
SELECT table_name, column_name, character_maximum_length,
character_octet_length, column_type
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length column_type
t1_my_tablex first_col 12 12 char(12)
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(20);
SELECT table_name, column_name, character_maximum_length,
character_octet_length, column_type
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length column_type
t1_my_tablex first_col 20 20 char(20)
SELECT table_name, column_name, character_maximum_length,
character_octet_length, column_type
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length column_type
t1_my_tablex first_col 20 20 char(20)
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col VARCHAR(20);
SELECT table_name, column_name, character_maximum_length,
character_octet_length, column_type
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length column_type
t1_my_tablex first_col 20 20 varchar(20)
SELECT table_name, column_name, column_default
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_default
t1_my_tablex first_col NULL
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(10) DEFAULT 'hello';
SELECT table_name, column_name, column_default
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_default
t1_my_tablex first_col hello
SELECT table_name, column_name, is_nullable
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name is_nullable
t1_my_tablex first_col YES
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(10) NOT NULL;
SELECT table_name, column_name, is_nullable
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name is_nullable
t1_my_tablex first_col NO
SELECT table_name, column_name, collation_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name collation_name
t1_my_tablex first_col latin1_swedish_ci
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(10) COLLATE 'latin1_general_cs';
SELECT table_name, column_name, collation_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name collation_name
t1_my_tablex first_col latin1_general_cs
SELECT table_name, column_name, character_maximum_length,
character_octet_length, character_set_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length character_set_name
t1_my_tablex first_col 10 10 latin1
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(10) CHARACTER SET utf8;
SELECT table_name, column_name, character_maximum_length,
character_octet_length, character_set_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name character_maximum_length character_octet_length character_set_name
t1_my_tablex first_col 10 30 utf8
SELECT table_name, column_name, column_comment
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_comment
t1_my_tablex first_col
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN first_col CHAR(10) COMMENT 'Hello';
SELECT table_name, column_name, column_comment
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_comment
t1_my_tablex first_col Hello
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex first_col
ALTER TABLE db_datadict.t1_my_tablex
ADD COLUMN second_col CHAR(10);
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex first_col
t1_my_tablex second_col
SELECT table_name, column_name, ordinal_position
FROM information_schema.columns
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
table_name column_name ordinal_position
t1_my_tablex first_col 1
t1_my_tablex second_col 2
ALTER TABLE db_datadict.t1_my_tablex
MODIFY COLUMN second_col CHAR(10) FIRST;
SELECT table_name, column_name, ordinal_position
FROM information_schema.columns
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
table_name column_name ordinal_position
t1_my_tablex first_col 2
t1_my_tablex second_col 1
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex second_col
t1_my_tablex first_col
ALTER TABLE db_datadict.t1_my_tablex
DROP COLUMN first_col;
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex second_col
SELECT table_name, column_name, column_key
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_key
t1_my_tablex second_col
ALTER TABLE db_datadict.t1_my_tablex
ADD UNIQUE INDEX IDX(second_col);
SELECT table_name, column_name, column_key
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name column_key
t1_my_tablex second_col UNI
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
t1_my_tablex second_col
DROP TABLE db_datadict.t1_my_tablex;
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name column_name
CREATE VIEW test.t1_my_tablex
AS SELECT 1 AS "col1", 'A' collate latin1_german1_ci AS "col2";
SELECT * FROM information_schema.columns
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1_my_tablex
COLUMN_NAME col1
ORDINAL_POSITION 1
COLUMN_DEFAULT 0
IS_NULLABLE NO
DATA_TYPE int
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION 10
NUMERIC_SCALE 0
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE int(1)
COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1_my_tablex
COLUMN_NAME col2
ORDINAL_POSITION 2
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 1
CHARACTER_OCTET_LENGTH 1
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME latin1
COLLATION_NAME latin1_german1_ci
COLUMN_TYPE varchar(1)
COLUMN_KEY
EXTRA
PRIVILEGES select,insert,update,references
COLUMN_COMMENT
DROP VIEW test.t1_my_tablex;
SELECT table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name
CREATE TABLE db_datadict.t1_my_tablex
ENGINE = <engine_type> AS
SELECT 1;
SELECT table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name
t1_my_tablex
DROP DATABASE db_datadict;
SELECT table_name FROM information_schema.columns
WHERE table_name = 't1_my_tablex';
table_name
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA table are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS test.t1;
CREATE DATABASE db_datadict;
CREATE TABLE test.t1 (f1 BIGINT);
INSERT INTO information_schema.columns (table_schema,table_name,column_name)
VALUES('test','t1', 'f2');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
INSERT INTO information_schema.columns (table_schema,table_name,column_name)
VALUES('test','t2', 'f1');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.columns SET table_name = 't4' WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.columns WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.columns;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX i3 ON information_schema.columns(table_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.columns ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.columns;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.columns RENAME db_datadict.columns;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.columns RENAME information_schema.xcolumns;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE test.t1;
DROP DATABASE db_datadict;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,656 @@
SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name <> 'profiling'
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 information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select
NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select
NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select
NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select
NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select
NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ENGINES COMMENT 3 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ENGINES SAVEPOINTS 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema ENGINES SUPPORT 2 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
NULL information_schema ENGINES TRANSACTIONS 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema ENGINES XA 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS DATABASE_COLLATION 24 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select
NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select
NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES ENGINE 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES LOGFILE_GROUP_NAME 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES LOGFILE_GROUP_NUMBER 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select
NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES TABLE_CATALOG 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select
NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select
NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select
NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select
NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select
NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select
NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema PLUGINS PLUGIN_LICENSE 10 NULL YES varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema PLUGINS PLUGIN_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PLUGINS PLUGIN_STATUS 3 NO varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select
NULL information_schema PLUGINS PLUGIN_TYPE 4 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema PLUGINS PLUGIN_VERSION 2 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select
NULL information_schema PROCESSLIST COMMAND 5 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select
NULL information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST HOST 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST TIME 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(7) select
NULL information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema ROUTINES COLLATION_CONNECTION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES DATABASE_COLLATION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SESSION_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select
NULL information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select
NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select
NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select
NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select
NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select
NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select
NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select
NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select
NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select
NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select
NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select
NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select
NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select
NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema VIEWS CHARACTER_SET_CLIENT 9 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select
NULL information_schema VIEWS COLLATION_CONNECTION 10 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select
NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select
NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select
NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
##########################################################################
# 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 = 'information_schema'
AND table_name <> 'profiling'
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
1.0000 longtext utf8 utf8_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 = 'information_schema'
AND table_name <> 'profiling'
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
3.0000 varchar utf8 utf8_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 = 'information_schema'
AND table_name <> 'profiling'
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 bigint NULL NULL
NULL datetime NULL NULL
--> 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 = 'information_schema'
AND table_name <> 'profiling'
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
3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60)
NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11)
3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3)
NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMNS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema ENGINES COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema ENGINES TRANSACTIONS varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES XA varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENGINES SAVEPOINTS varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8)
1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9)
NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime
3.0000 information_schema EVENTS INTERVAL_VALUE varchar 256 768 utf8 utf8_general_ci varchar(256)
3.0000 information_schema EVENTS INTERVAL_FIELD varchar 18 54 utf8 utf8_general_ci varchar(18)
1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime
NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime
3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18)
3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12)
NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime
NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime
NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime
3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10)
3.0000 information_schema EVENTS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema EVENTS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema EVENTS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema FILES TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES TABLE_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES LOGFILE_GROUP_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema FILES LOGFILE_GROUP_NUMBER bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema FILES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema FILES FULLTEXT_KEYS varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema FILES DELETED_ROWS bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4)
NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10)
NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10)
NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARTITIONS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema PARTITIONS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12)
1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 10 30 utf8 utf8_general_ci varchar(10)
3.0000 information_schema PLUGINS PLUGIN_TYPE varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80)
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8 utf8_general_ci varchar(16)
NULL information_schema PROCESSLIST TIME bigint NULL NULL NULL NULL bigint(7)
3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9)
3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8)
1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime
NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime
1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480)
3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480)
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1)
3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2)
3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1)
NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21)
NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3)
3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10)
3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16)
3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10)
NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime
3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6)
3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4)
1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9)
3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6)
3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3)
NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime
1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77)
3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,499 @@
SELECT * FROM information_schema.columns
WHERE table_schema = 'mysql'
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 mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Event_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Trigger_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql event character_set_client 19 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql event collation_connection 20 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql event db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql event db_collation 21 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references
NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references
NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references
NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references
NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references
NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references
NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references
NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references
NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references
NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references
NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references
NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references
NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references
NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI select,insert,update,references
NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references
NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references
NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references
NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references
NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references
NULL mysql plugin dl 2 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references
NULL mysql plugin name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql proc collation_connection 18 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql proc db_collation 19 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references
NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references
NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references
NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references
NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references
NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references
NULL mysql proc sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references
NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references
NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references
NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Password 5 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,insert,update,references
NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Username 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
NULL mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references
NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references
NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references
NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references
NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references
NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references
NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references
NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references
NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references
NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Event_priv 30 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user max_connections 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_questions 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_updates 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user max_user_connections 39 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references
NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user ssl_cipher 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
NULL mysql user ssl_type 32 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references
NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Trigger_priv 31 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
NULL mysql user x509_issuer 34 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references
NULL mysql user x509_subject 35 NULL NO blob 65535 65535 NULL NULL NULL NULL blob 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 = 'mysql'
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
1.0000 blob NULL NULL
1.0000 longblob NULL NULL
1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_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 = 'mysql'
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
3.0000 char utf8 utf8_bin
3.0000 enum utf8 utf8_bin
3.0000 char utf8 utf8_general_ci
3.0000 enum utf8 utf8_general_ci
3.0000 set utf8 utf8_general_ci
3.0000 varchar utf8 utf8_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 = 'mysql'
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 bigint NULL NULL
NULL datetime NULL NULL
NULL int NULL NULL
NULL smallint NULL NULL
NULL time NULL NULL
NULL timestamp NULL NULL
NULL tinyint NULL NULL
--> 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 = 'mysql'
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
3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64)
3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64)
NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql db User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql db Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql event db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql event name char 64 192 utf8 utf8_general_ci char(64)
1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql event definer char 77 231 utf8 utf8_bin char(77)
NULL mysql event execute_at datetime NULL NULL NULL NULL datetime
NULL mysql event interval_value int NULL NULL NULL NULL int(11)
3.0000 mysql event interval_field enum 18 54 utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND')
NULL mysql event created timestamp NULL NULL NULL NULL timestamp
NULL mysql event modified timestamp NULL NULL NULL NULL timestamp
NULL mysql event last_executed datetime NULL NULL NULL NULL datetime
NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10)
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32)
3.0000 mysql event db_collation char 32 96 utf8 utf8_bin char(32)
1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql func name char 64 192 utf8 utf8_bin char(64)
NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128)
3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate')
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp
1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql general_log thread_id int NULL NULL NULL NULL int(11)
NULL mysql general_log server_id int NULL NULL NULL NULL int(11)
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128)
NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text
1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text
3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128)
3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned
1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255)
NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index inserts bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index updates bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index deletes bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsigned
3.0000 mysql plugin name char 64 192 utf8 utf8_bin char(64)
3.0000 mysql plugin dl char 128 384 utf8 utf8_bin char(128)
3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE')
3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL')
3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')
3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO')
3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER')
1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob
1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob
1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
3.0000 mysql proc sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64)
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32)
1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob
3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64)
3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE')
3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77)
3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Username char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64)
NULL mysql servers Port int NULL NULL NULL NULL int(4)
3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64)
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp
1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql slow_log query_time time NULL NULL NULL NULL time
NULL mysql slow_log lock_time time NULL NULL NULL NULL time
NULL mysql slow_log rows_sent int NULL NULL NULL NULL int(11)
NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11)
3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512)
NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
NULL mysql slow_log server_id int NULL NULL NULL NULL int(11)
1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64)
3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77)
NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N')
NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20)
NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11)
3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64)
NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20)
NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11)
NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned
3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8)
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 16 48 utf8 utf8_bin char(16)
1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41)
3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED')
1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob
1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob
1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob
NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned

View file

@ -0,0 +1,222 @@
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
USE test;
USE test;
USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
drop database if exists test4;
CREATE database test4;
use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
use test;
drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
Warning 1265 Data truncated for column 'f3' at row 3
Warning 1265 Data truncated for column 'f3' at row 4
Warning 1265 Data truncated for column 'f3' at row 5
Warning 1265 Data truncated for column 'f3' at row 6
Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
Warning 1265 Data truncated for column 'f3' at row 3
Warning 1265 Data truncated for column 'f3' at row 4
Warning 1265 Data truncated for column 'f3' at row 5
Warning 1265 Data truncated for column 'f3' at row 6
Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
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 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references
NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references
NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references
NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) 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
1.0000 char latin1 latin1_swedish_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 <> 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 IS NULL
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL date NULL NULL
NULL int NULL NULL
--> 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
1.0000 test t1 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t1 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t1 f3 date NULL NULL NULL NULL date
NULL test t1 f4 int NULL NULL NULL NULL int(11)
1.0000 test t1 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t1 f6 int NULL NULL NULL NULL int(11)
1.0000 test t10 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t10 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t10 f3 date NULL NULL NULL NULL date
NULL test t10 f4 int NULL NULL NULL NULL int(11)
1.0000 test t10 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t10 f6 int NULL NULL NULL NULL int(11)
1.0000 test t11 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t11 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t11 f3 date NULL NULL NULL NULL date
NULL test t11 f4 int NULL NULL NULL NULL int(11)
1.0000 test t11 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t11 f6 int NULL NULL NULL NULL int(11)
1.0000 test t2 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t2 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t2 f3 date NULL NULL NULL NULL date
NULL test t2 f4 int NULL NULL NULL NULL int(11)
1.0000 test t2 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t2 f6 int NULL NULL NULL NULL int(11)
1.0000 test t3 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t3 f2 char 20 20 latin1 latin1_swedish_ci char(20)
NULL test t3 f3 int NULL NULL NULL NULL int(11)
1.0000 test t4 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t4 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t4 f3 date NULL NULL NULL NULL date
NULL test t4 f4 int NULL NULL NULL NULL int(11)
1.0000 test t4 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t4 f6 int NULL NULL NULL NULL int(11)
1.0000 test t7 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t7 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t7 f3 date NULL NULL NULL NULL date
NULL test t7 f4 int NULL NULL NULL NULL int(11)
1.0000 test t8 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test t8 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t8 f3 date NULL NULL NULL NULL date
NULL test t8 f4 int NULL NULL NULL NULL int(11)
NULL test t9 f1 int NULL NULL NULL NULL int(11)
1.0000 test t9 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test t9 f3 int NULL NULL NULL NULL int(11)
1.0000 test4 t6 f1 char 20 20 latin1 latin1_swedish_ci char(20)
1.0000 test4 t6 f2 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test4 t6 f3 date NULL NULL NULL NULL date
NULL test4 t6 f4 int NULL NULL NULL NULL int(11)
1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test4 t6 f6 int NULL NULL NULL NULL int(11)
DROP DATABASE test1;
DROP DATABASE test4;
DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE test.t3;
DROP TABLE test.t4;
DROP TABLE test.t7;
DROP TABLE test.t8;
DROP TABLE test.t9;
DROP TABLE test.t10;
DROP TABLE test.t11;

View file

@ -0,0 +1,84 @@
SHOW TABLES FROM information_schema LIKE 'ENGINES';
Tables_in_information_schema (ENGINES)
ENGINES
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.ENGINES;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ENGINES;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.ENGINES;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.ENGINES;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.12.1: INFORMATION_SCHEMA.ENGINES layout
#########################################################################
DESCRIBE information_schema.ENGINES;
Field Type Null Key Default Extra
ENGINE varchar(64) NO
SUPPORT varchar(8) NO
COMMENT varchar(80) NO
TRANSACTIONS varchar(3) NO
XA varchar(3) NO
SAVEPOINTS varchar(3) NO
SHOW CREATE TABLE information_schema.ENGINES;
Table Create Table
ENGINES CREATE TEMPORARY TABLE `ENGINES` (
`ENGINE` varchar(64) NOT NULL DEFAULT '',
`SUPPORT` varchar(8) NOT NULL DEFAULT '',
`COMMENT` varchar(80) NOT NULL DEFAULT '',
`TRANSACTIONS` varchar(3) NOT NULL DEFAULT '',
`XA` varchar(3) NOT NULL DEFAULT '',
`SAVEPOINTS` varchar(3) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.ENGINES;
Field Type Null Key Default Extra
ENGINE varchar(64) NO
SUPPORT varchar(8) NO
COMMENT varchar(80) NO
TRANSACTIONS varchar(3) NO
XA varchar(3) NO
SAVEPOINTS varchar(3) NO
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT)
ENGINE = <engine_type>;
INSERT INTO information_schema.engines
SELECT * FROM information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.engines SET engine = '1234567';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.engines WHERE support IN ('DEFAULT','YES');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx_on_engines ON information_schema.engines(engine);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines DROP PRIMARY KEY;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines RENAME db_datadict.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines RENAME information_schema.xengines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'ARCHIVE';
ENGINE ARCHIVE
SUPPORT YES
COMMENT Archive storage engine
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'BLACKHOLE';
ENGINE BLACKHOLE
SUPPORT YES
COMMENT /dev/null storage engine (anything you write to it disappears)
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'CSV';
ENGINE CSV
SUPPORT YES
COMMENT CSV storage engine
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'FEDERATED';
ENGINE FEDERATED
SUPPORT YES
COMMENT Federated MySQL storage engine
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'InnoDB';
ENGINE InnoDB
SUPPORT YES
COMMENT Supports transactions, row-level locking, and foreign keys
TRANSACTIONS YES
XA YES
SAVEPOINTS YES

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'MEMORY';
ENGINE MEMORY
SUPPORT YES
COMMENT Hash based, stored in memory, useful for temporary tables
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'MRG_MYISAM';
ENGINE MRG_MYISAM
SUPPORT YES
COMMENT Collection of identical MyISAM tables
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'MyISAM';
ENGINE MyISAM
SUPPORT DEFAULT
COMMENT Default engine as of MySQL 3.23 with great performance
TRANSACTIONS NO
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,8 @@
SELECT * FROM information_schema.engines
WHERE ENGINE = 'ndbcluster';
ENGINE ndbcluster
SUPPORT YES
COMMENT Clustered, fault-tolerant tables
TRANSACTIONS YES
XA NO
SAVEPOINTS NO

View file

@ -0,0 +1,148 @@
SHOW TABLES FROM information_schema LIKE 'EVENTS';
Tables_in_information_schema (EVENTS)
EVENTS
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.EVENTS;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.EVENTS;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.EVENTS;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.EVENTS;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.12.1: INFORMATION_SCHEMA.EVENTS layout
#########################################################################
DESCRIBE information_schema.EVENTS;
Field Type Null Key Default Extra
EVENT_CATALOG varchar(64) YES NULL
EVENT_SCHEMA varchar(64) NO
EVENT_NAME varchar(64) NO
DEFINER varchar(77) NO
TIME_ZONE varchar(64) NO
EVENT_BODY varchar(8) NO
EVENT_DEFINITION longtext NO NULL
EVENT_TYPE varchar(9) NO
EXECUTE_AT datetime YES NULL
INTERVAL_VALUE varchar(256) YES NULL
INTERVAL_FIELD varchar(18) YES NULL
SQL_MODE longtext NO NULL
STARTS datetime YES NULL
ENDS datetime YES NULL
STATUS varchar(18) NO
ON_COMPLETION varchar(12) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
LAST_EXECUTED datetime YES NULL
EVENT_COMMENT varchar(64) NO
ORIGINATOR bigint(10) NO 0
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
SHOW CREATE TABLE information_schema.EVENTS;
Table Create Table
EVENTS CREATE TEMPORARY TABLE `EVENTS` (
`EVENT_CATALOG` varchar(64) DEFAULT NULL,
`EVENT_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`EVENT_NAME` varchar(64) NOT NULL DEFAULT '',
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`TIME_ZONE` varchar(64) NOT NULL DEFAULT '',
`EVENT_BODY` varchar(8) NOT NULL DEFAULT '',
`EVENT_DEFINITION` longtext NOT NULL,
`EVENT_TYPE` varchar(9) NOT NULL DEFAULT '',
`EXECUTE_AT` datetime DEFAULT NULL,
`INTERVAL_VALUE` varchar(256) DEFAULT NULL,
`INTERVAL_FIELD` varchar(18) DEFAULT NULL,
`SQL_MODE` longtext NOT NULL,
`STARTS` datetime DEFAULT NULL,
`ENDS` datetime DEFAULT NULL,
`STATUS` varchar(18) NOT NULL DEFAULT '',
`ON_COMPLETION` varchar(12) NOT NULL DEFAULT '',
`CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`LAST_EXECUTED` datetime DEFAULT NULL,
`EVENT_COMMENT` varchar(64) NOT NULL DEFAULT '',
`ORIGINATOR` bigint(10) NOT NULL DEFAULT '0',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.EVENTS;
Field Type Null Key Default Extra
EVENT_CATALOG varchar(64) YES NULL
EVENT_SCHEMA varchar(64) NO
EVENT_NAME varchar(64) NO
DEFINER varchar(77) NO
TIME_ZONE varchar(64) NO
EVENT_BODY varchar(8) NO
EVENT_DEFINITION longtext NO NULL
EVENT_TYPE varchar(9) NO
EXECUTE_AT datetime YES NULL
INTERVAL_VALUE varchar(256) YES NULL
INTERVAL_FIELD varchar(18) YES NULL
SQL_MODE longtext NO NULL
STARTS datetime YES NULL
ENDS datetime YES NULL
STATUS varchar(18) NO
ON_COMPLETION varchar(12) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
LAST_EXECUTED datetime YES NULL
EVENT_COMMENT varchar(64) NO
ORIGINATOR bigint(10) NO 0
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
SELECT event_catalog, event_name, event_body, event_type, event_type,
status, on_completion
FROM information_schema.events
WHERE event_catalog IS NOT NULL or
event_body NOT IN ('SQL') or
event_type NOT IN ('ONE TIME','RECURRING') or
status NOT IN ('ENABLED','DISABLED','SLAVESIDE_DISABLED') or
on_completion NOT IN ('PRESERVE','NOT PRESERVE');
event_catalog event_name event_body event_type event_type status on_completion
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT)
ENGINE = <engine_type>;
INSERT INTO information_schema.events
SELECT * FROM information_schema.events;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.events SET event_name = '1234567'
WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.events WHERE event_catalog IS NULL;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.events;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx_on_events ON information_schema.events(event_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.events DROP PRIMARY KEY;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.events ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.events;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.events RENAME db_datadict.events;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.events RENAME information_schema.xevents;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

View file

@ -0,0 +1,370 @@
SHOW TABLES FROM information_schema LIKE 'KEY_COLUMN_USAGE';
Tables_in_information_schema (KEY_COLUMN_USAGE)
KEY_COLUMN_USAGE
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.KEY_COLUMN_USAGE;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.KEY_COLUMN_USAGE;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.KEY_COLUMN_USAGE;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.KEY_COLUMN_USAGE;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout
#########################################################################
DESCRIBE information_schema.KEY_COLUMN_USAGE;
Field Type Null Key Default Extra
CONSTRAINT_CATALOG varchar(512) YES NULL
CONSTRAINT_SCHEMA varchar(64) NO
CONSTRAINT_NAME varchar(64) NO
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
ORDINAL_POSITION bigint(10) NO 0
POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
REFERENCED_TABLE_NAME varchar(64) YES NULL
REFERENCED_COLUMN_NAME varchar(64) YES NULL
SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE;
Table Create Table
KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` (
`CONSTRAINT_CATALOG` varchar(512) DEFAULT NULL,
`CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '',
`TABLE_CATALOG` varchar(512) DEFAULT NULL,
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
`ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT '0',
`POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) DEFAULT NULL,
`REFERENCED_TABLE_SCHEMA` varchar(64) DEFAULT NULL,
`REFERENCED_TABLE_NAME` varchar(64) DEFAULT NULL,
`REFERENCED_COLUMN_NAME` varchar(64) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE;
Field Type Null Key Default Extra
CONSTRAINT_CATALOG varchar(512) YES NULL
CONSTRAINT_SCHEMA varchar(64) NO
CONSTRAINT_NAME varchar(64) NO
TABLE_CATALOG varchar(512) YES NULL
TABLE_SCHEMA varchar(64) NO
TABLE_NAME varchar(64) NO
COLUMN_NAME varchar(64) NO
ORDINAL_POSITION bigint(10) NO 0
POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL
REFERENCED_TABLE_SCHEMA varchar(64) YES NULL
REFERENCED_TABLE_NAME varchar(64) YES NULL
REFERENCED_COLUMN_NAME varchar(64) YES NULL
SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
table_schema, table_name, column_name
FROM information_schema.key_column_usage
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL;
constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
########################################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
CREATE USER 'testuser2'@'localhost';
USE db_datadict;
CREATE TABLE t1_1
(f1 INT NOT NULL, PRIMARY KEY(f1),
f2 INT, INDEX f2_ind(f2))
ENGINE = <engine_type>;
GRANT SELECT ON t1_1 to 'testuser1'@'localhost';
CREATE TABLE t1_2
(f1 INT NOT NULL, PRIMARY KEY(f1),
f2 INT, INDEX f2_ind(f2))
ENGINE = <engine_type>;
GRANT SELECT ON t1_2 to 'testuser2'@'localhost';
SELECT * FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_%'
ORDER BY constraint_catalog, constraint_schema, constraint_name,
table_catalog, table_schema, table_name, ordinal_position;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL
NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_%'
ORDER BY constraint_catalog, constraint_schema, constraint_name,
table_catalog, table_schema, table_name, ordinal_position;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL
# Establish connection testuser2 (user=testuser2)
SELECT * FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_%'
ORDER BY constraint_catalog, constraint_schema, constraint_name,
table_catalog, table_schema, table_name, ordinal_position;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL
# Switch to connection default and close connections testuser1, testuser2
DROP USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
DROP TABLE t1_1;
DROP TABLE t1_2;
DROP DATABASE IF EXISTS db_datadict;
########################################################################################
# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications
########################################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS test.t1_my_table;
CREATE DATABASE db_datadict;
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_my_table%';
table_name
CREATE TABLE test.t1_my_table
(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2))
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
ENGINE = <engine_type>;
SELECT * FROM information_schema.key_column_usage
WHERE table_name = 't1_my_table';
CONSTRAINT_CATALOG NULL
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME PRIMARY
TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1_my_table
COLUMN_NAME f1
ORDINAL_POSITION 1
POSITION_IN_UNIQUE_CONSTRAINT NULL
REFERENCED_TABLE_SCHEMA NULL
REFERENCED_TABLE_NAME NULL
REFERENCED_COLUMN_NAME NULL
CONSTRAINT_CATALOG NULL
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME PRIMARY
TABLE_CATALOG NULL
TABLE_SCHEMA test
TABLE_NAME t1_my_table
COLUMN_NAME f2
ORDINAL_POSITION 2
POSITION_IN_UNIQUE_CONSTRAINT NULL
REFERENCED_TABLE_SCHEMA NULL
REFERENCED_TABLE_NAME NULL
REFERENCED_COLUMN_NAME NULL
SELECT DISTINCT table_name FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_my_table%';
table_name
t1_my_table
RENAME TABLE test.t1_my_table TO test.t1_my_tablex;
SELECT DISTINCT table_name FROM information_schema.key_column_usage
WHERE table_name LIKE 't1_my_table%';
table_name
t1_my_tablex
SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_schema table_name
test t1_my_tablex
RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex;
SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_schema table_name
db_datadict t1_my_tablex
SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
table_name column_name
t1_my_tablex f1
t1_my_tablex f2
ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12);
SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
table_name column_name
t1_my_tablex f2
t1_my_tablex first_col
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2);
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
DROP INDEX f2 ON db_datadict.t1_my_tablex;
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2);
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict f2 db_datadict t1_my_tablex f2 1
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
DROP INDEX f2 ON db_datadict.t1_my_tablex;
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2);
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict my_idx db_datadict t1_my_tablex f2 1
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
DROP INDEX my_idx ON db_datadict.t1_my_tablex;
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col);
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict my_idx db_datadict t1_my_tablex f4 1
db_datadict my_idx db_datadict t1_my_tablex first_col 2
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict my_idx db_datadict t1_my_tablex f4 1
db_datadict my_idx db_datadict t1_my_tablex first_col 2
db_datadict PRIMARY db_datadict t1_my_tablex first_col 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 2
ALTER TABLE db_datadict.t1_my_tablex
DROP COLUMN first_col;
SELECT constraint_schema, constraint_name, table_schema,
table_name, column_name, ordinal_position
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY constraint_schema, constraint_name, table_schema,
table_name, ordinal_position;
constraint_schema constraint_name table_schema table_name column_name ordinal_position
db_datadict my_idx db_datadict t1_my_tablex f4 1
db_datadict PRIMARY db_datadict t1_my_tablex f2 1
SELECT table_name, column_name
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex'
ORDER BY table_name, column_name;
table_name column_name
t1_my_tablex f2
t1_my_tablex f4
DROP TABLE db_datadict.t1_my_tablex;
SELECT table_name, column_name
FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name column_name
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name
CREATE TABLE db_datadict.t1_my_tablex
ENGINE = <engine_type> AS
SELECT 1 AS f1;
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name
ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1);
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name
t1_my_tablex
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name
t1_my_tablex
DROP DATABASE db_datadict;
SELECT table_name FROM information_schema.key_column_usage
WHERE table_name = 't1_my_tablex';
table_name
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA table are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP TABLE IF EXISTS db_datadict.t1;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT)
ENGINE = <engine_type>;
INSERT INTO information_schema.key_column_usage
(constraint_schema, constraint_name, table_name)
VALUES ( 'mysql', 'primary', 'db');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
INSERT INTO information_schema.key_column_usage
SELECT * FROM information_schema.key_column_usage;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.key_column_usage
SET table_name = 'db1' WHERE constraint_name = 'primary';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.key_column_usage WHERE table_name = 't1';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.key_column_usage;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX i3 ON information_schema.key_column_usage(table_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.key_column_usage ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.key_column_usage;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.key_column_usage
RENAME db_datadict.key_column_usage;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.key_column_usage
RENAME information_schema.xkey_column_usage;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE db_datadict.t1;
DROP DATABASE db_datadict;

View file

@ -0,0 +1,635 @@
SHOW TABLES FROM information_schema LIKE 'ROUTINES';
Tables_in_information_schema (ROUTINES)
ROUTINES
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.ROUTINES;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ROUTINES;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.ROUTINES;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.ROUTINES;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout
#########################################################################
DESCRIBE information_schema.ROUTINES;
Field Type Null Key Default Extra
SPECIFIC_NAME varchar(64) NO
ROUTINE_CATALOG varchar(512) YES NULL
ROUTINE_SCHEMA varchar(64) NO
ROUTINE_NAME varchar(64) NO
ROUTINE_TYPE varchar(9) NO
DTD_IDENTIFIER varchar(64) YES NULL
ROUTINE_BODY varchar(8) NO
ROUTINE_DEFINITION longtext YES NULL
EXTERNAL_NAME varchar(64) YES NULL
EXTERNAL_LANGUAGE varchar(64) YES NULL
PARAMETER_STYLE varchar(8) NO
IS_DETERMINISTIC varchar(3) NO
SQL_DATA_ACCESS varchar(64) NO
SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
SHOW CREATE TABLE information_schema.ROUTINES;
Table Create Table
ROUTINES CREATE TEMPORARY TABLE `ROUTINES` (
`SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_CATALOG` varchar(512) DEFAULT NULL,
`ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT '',
`DTD_IDENTIFIER` varchar(64) DEFAULT NULL,
`ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '',
`ROUTINE_DEFINITION` longtext,
`EXTERNAL_NAME` varchar(64) DEFAULT NULL,
`EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL,
`PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '',
`IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '',
`SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '',
`SQL_PATH` varchar(64) DEFAULT NULL,
`SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '',
`CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`SQL_MODE` longtext NOT NULL,
`ROUTINE_COMMENT` varchar(64) NOT NULL DEFAULT '',
`DEFINER` varchar(77) NOT NULL DEFAULT '',
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.ROUTINES;
Field Type Null Key Default Extra
SPECIFIC_NAME varchar(64) NO
ROUTINE_CATALOG varchar(512) YES NULL
ROUTINE_SCHEMA varchar(64) NO
ROUTINE_NAME varchar(64) NO
ROUTINE_TYPE varchar(9) NO
DTD_IDENTIFIER varchar(64) YES NULL
ROUTINE_BODY varchar(8) NO
ROUTINE_DEFINITION longtext YES NULL
EXTERNAL_NAME varchar(64) YES NULL
EXTERNAL_LANGUAGE varchar(64) YES NULL
PARAMETER_STYLE varchar(8) NO
IS_DETERMINISTIC varchar(3) NO
SQL_DATA_ACCESS varchar(64) NO
SQL_PATH varchar(64) YES NULL
SECURITY_TYPE varchar(7) NO
CREATED datetime NO 0000-00-00 00:00:00
LAST_ALTERED datetime NO 0000-00-00 00:00:00
SQL_MODE longtext NO NULL
ROUTINE_COMMENT varchar(64) NO
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
USE test;
DROP PROCEDURE IF EXISTS sp_for_routines;
DROP FUNCTION IF EXISTS function_for_routines;
CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type,
routine_body,external_name,external_language,parameter_style,sql_path
FROM information_schema.routines
WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL
OR external_language IS NOT NULL OR sql_path IS NOT NULL
OR routine_body <> 'SQL' OR parameter_style <> 'SQL'
OR specific_name <> routine_name;
specific_name routine_catalog routine_schema routine_name routine_type routine_body external_name external_language parameter_style sql_path
DROP PROCEDURE sp_for_routines;
DROP FUNCTION function_for_routines;
################################################################################
# Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information
################################################################################
DROP DATABASE IF EXISTS db_datadict;
DROP DATABASE IF EXISTS db_datadict_2;
CREATE DATABASE db_datadict;
USE db_datadict;
CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
ENGINE = <other_engine_type>;
INSERT INTO res_6_408002_1(f1, f2, f3, f4)
VALUES('abc', 'xyz', '1989-11-09', 0815);
DROP PROCEDURE IF EXISTS sp_6_408002_1;
CREATE PROCEDURE sp_6_408002_1()
BEGIN
SELECT * FROM db_datadict.res_6_408002_1;
END//
CREATE DATABASE db_datadict_2;
USE db_datadict_2;
CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT)
ENGINE = <other_engine_type>;
INSERT INTO res_6_408002_2(f1, f2, f3, f4)
VALUES('abc', 'xyz', '1990-10-03', 4711);
DROP PROCEDURE IF EXISTS sp_6_408002_2;
CREATE PROCEDURE sp_6_408002_2()
BEGIN
SELECT * FROM db_datadict_2.res_6_408002_2;
END//
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
CREATE USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost';
GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost';
GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost';
GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost';
GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2
TO 'testuser2'@'localhost';
GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost';
FLUSH PRIVILEGES;
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.routines;
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
# Establish connection testuser2 (user=testuser2)
SELECT * FROM information_schema.routines;
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
# Establish connection testuser3 (user=testuser3)
SELECT * FROM information_schema.routines;
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
# Switch to connection default and close connections testuser1,testuser2,testuser3
DROP USER 'testuser1'@'localhost';
DROP USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
USE test;
DROP DATABASE db_datadict;
DROP DATABASE db_datadict_2;
#########################################################################
# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications
#########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
USE db_datadict;
CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
ORDER BY routine_name;
SPECIFIC_NAME function_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME function_for_routines
ROUTINE_TYPE FUNCTION
DTD_IDENTIFIER int(11)
ROUTINE_BODY SQL
ROUTINE_DEFINITION RETURN 0
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME sp_for_routines
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION SELECT 'db_datadict'
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER;
ALTER FUNCTION function_for_routines COMMENT 'updated comments';
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
ORDER BY routine_name;
SPECIFIC_NAME function_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME function_for_routines
ROUTINE_TYPE FUNCTION
DTD_IDENTIFIER int(11)
ROUTINE_BODY SQL
ROUTINE_DEFINITION RETURN 0
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT updated comments
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME sp_for_routines
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION SELECT 'db_datadict'
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE INVOKER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
DROP PROCEDURE sp_for_routines;
DROP FUNCTION function_for_routines;
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0;
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'
ORDER BY routine_name;
SPECIFIC_NAME function_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME function_for_routines
ROUTINE_TYPE FUNCTION
DTD_IDENTIFIER int(11)
ROUTINE_BODY SQL
ROUTINE_DEFINITION RETURN 0
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_for_routines
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME sp_for_routines
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION SELECT 'db_datadict'
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED <created>
LAST_ALTERED <modified>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
use test;
DROP DATABASE db_datadict;
SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict';
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
#########################################################################
# 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for
# ROUTINE_DEFINITION column
#########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
CREATE TABLE db_datadict.res_6_408004_1
(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
ENGINE = <other_engine_type>;
INSERT INTO db_datadict.res_6_408004_1
VALUES ('abc', 98765 , 99999999 , 98765, 10);
CREATE TABLE db_datadict.res_6_408004_2
(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR)
ENGINE = <other_engine_type>;
INSERT INTO db_datadict.res_6_408004_2
VALUES ('abc', 98765 , 99999999 , 98765, 10);
# Checking the max. possible length of (currently) 4 GByte is not
# in this environment here.
CREATE PROCEDURE sp_6_408004 ()
BEGIN
DECLARE done INTEGER DEFAULt 0;
DECLARE variable_number_1 LONGTEXT;
DECLARE variable_number_2 MEDIUMINT;
DECLARE variable_number_3 LONGBLOB;
DECLARE variable_number_4 REAL;
DECLARE variable_number_5 YEAR;
DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
BEGIN
OPEN cursor_number_1;
WHILE done <> 1 DO
FETCH cursor_number_1
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
BEGIN
BEGIN
SET done = 0;
OPEN cursor_number_2;
WHILE done <> 1 DO
FETCH cursor_number_2
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES(variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
SET done = 0;
OPEN cursor_number_3;
WHILE done <> 1 DO
FETCH cursor_number_3
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES(variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
END;
BEGIN
SET done = 0;
OPEN cursor_number_4;
WHILE done <> 1 DO
FETCH cursor_number_4
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
BEGIN
SET @a='test row';
SELECT @a;
SELECT @a;
SELECT @a;
END;
BEGIN
SET done = 0;
OPEN cursor_number_5;
WHILE done <> 1 DO
FETCH cursor_number_5
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
BEGIN
SET @a='test row';
SELECT @a;
SELECT @a;
SELECT @a;
END;
END//
CALL db_datadict.sp_6_408004 ();
@a
test row
@a
test row
@a
test row
@a
test row
@a
test row
@a
test row
SELECT * FROM db_datadict.res_6_408004_2;
f1 f2 f3 f4 f5
abc 98765 99999999 98765 2010
abc 98765 99999999 98765 2010
abc 98765 99999999 98765 2010
abc 98765 99999999 98765 2010
abc 98765 99999999 98765 2010
abc 98765 99999999 98765 2010
SELECT *, LENGTH(routine_definition) FROM information_schema.routines
WHERE routine_schema = 'db_datadict';
SPECIFIC_NAME sp_6_408004
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_datadict
ROUTINE_NAME sp_6_408004
ROUTINE_TYPE PROCEDURE
DTD_IDENTIFIER NULL
ROUTINE_BODY SQL
ROUTINE_DEFINITION BEGIN
DECLARE done INTEGER DEFAULt 0;
DECLARE variable_number_1 LONGTEXT;
DECLARE variable_number_2 MEDIUMINT;
DECLARE variable_number_3 LONGBLOB;
DECLARE variable_number_4 REAL;
DECLARE variable_number_5 YEAR;
DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
BEGIN
OPEN cursor_number_1;
WHILE done <> 1 DO
FETCH cursor_number_1
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
BEGIN
BEGIN
SET done = 0;
OPEN cursor_number_2;
WHILE done <> 1 DO
FETCH cursor_number_2
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES(variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
SET done = 0;
OPEN cursor_number_3;
WHILE done <> 1 DO
FETCH cursor_number_3
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES(variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
END;
BEGIN
SET done = 0;
OPEN cursor_number_4;
WHILE done <> 1 DO
FETCH cursor_number_4
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
BEGIN
SET @a='test row';
SELECT @a;
SELECT @a;
SELECT @a;
END;
BEGIN
SET done = 0;
OPEN cursor_number_5;
WHILE done <> 1 DO
FETCH cursor_number_5
INTO variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5;
IF done <> 0 THEN
INSERT INTO res_6_408004_2
VALUES (variable_number_1, variable_number_2, variable_number_3,
variable_number_4, variable_number_5);
END IF;
END WHILE;
END;
BEGIN
SET @a='test row';
SELECT @a;
SELECT @a;
SELECT @a;
END;
END
EXTERNAL_NAME NULL
EXTERNAL_LANGUAGE NULL
PARAMETER_STYLE SQL
IS_DETERMINISTIC NO
SQL_DATA_ACCESS CONTAINS SQL
SQL_PATH NULL
SECURITY_TYPE DEFINER
CREATED YYYY-MM-DD hh:mm:ss
LAST_ALTERED YYYY-MM-DD hh:mm:ss
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
LENGTH(routine_definition) 2549
DROP DATABASE db_datadict;
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA table are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
USE db_datadict;
CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict';
USE test;
INSERT INTO information_schema.routines (routine_name, routine_type )
VALUES ('p2', 'procedure');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.routines SET routine_name = 'p2'
WHERE routine_body = 'sql';
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DELETE FROM information_schema.routines ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.routines ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX i7 ON information_schema.routines (routine_name);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.routines ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.routines DISCARD TABLESPACE;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.routines ;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.routines RENAME db_datadict.routines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.routines RENAME information_schema.xroutines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;

Some files were not shown because too many files have changed in this diff Show more