`SPECIFIC_CATALOG` varchar(512) NOT NULL DEFAULT '',
`SPECIFIC_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '',
`ORDINAL_POSITION` int(21) NOT NULL DEFAULT '0',
`PARAMETER_MODE` varchar(5) DEFAULT NULL,
`PARAMETER_NAME` varchar(64) DEFAULT NULL,
`DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
`CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL,
`CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL,
`NUMERIC_PRECISION` int(21) DEFAULT NULL,
`NUMERIC_SCALE` int(21) DEFAULT NULL,
`CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`DTD_IDENTIFIER` longtext NOT NULL,
`ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT ''
) DEFAULT CHARSET=utf8
SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = 'parameters'
ORDER BY ordinal_position;
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME SPECIFIC_CATALOG
ORDINAL_POSITION 1
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 512
CHARACTER_OCTET_LENGTH 1536
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(512)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME SPECIFIC_SCHEMA
ORDINAL_POSITION 2
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME SPECIFIC_NAME
ORDINAL_POSITION 3
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME ORDINAL_POSITION
ORDINAL_POSITION 4
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME PARAMETER_MODE
ORDINAL_POSITION 5
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 5
CHARACTER_OCTET_LENGTH 15
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(5)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME PARAMETER_NAME
ORDINAL_POSITION 6
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME DATA_TYPE
ORDINAL_POSITION 7
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME CHARACTER_MAXIMUM_LENGTH
ORDINAL_POSITION 8
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME CHARACTER_OCTET_LENGTH
ORDINAL_POSITION 9
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME NUMERIC_PRECISION
ORDINAL_POSITION 10
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME NUMERIC_SCALE
ORDINAL_POSITION 11
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME CHARACTER_SET_NAME
ORDINAL_POSITION 12
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME COLLATION_NAME
ORDINAL_POSITION 13
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME DTD_IDENTIFIER
ORDINAL_POSITION 14
COLUMN_DEFAULT NULL
IS_NULLABLE NO
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME parameters
COLUMN_NAME ROUTINE_TYPE
ORDINAL_POSITION 15
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 9
CHARACTER_OCTET_LENGTH 27
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(9)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
DESCRIBE INFORMATION_SCHEMA.PARAMETERS;
Field Type Null Key Default Extra
SPECIFIC_CATALOG varchar(512) NO
SPECIFIC_SCHEMA varchar(64) NO
SPECIFIC_NAME varchar(64) NO
ORDINAL_POSITION int(21) NO 0
PARAMETER_MODE varchar(5) YES NULL
PARAMETER_NAME varchar(64) YES NULL
DATA_TYPE varchar(64) NO
CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
CHARACTER_OCTET_LENGTH int(21) YES NULL
NUMERIC_PRECISION int(21) YES NULL
NUMERIC_SCALE int(21) YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
DTD_IDENTIFIER longtext NO NULL
ROUTINE_TYPE varchar(9) NO
# ========== parameters.2 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!');
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 'RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!')' at line 1
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';
`ROUTINE_CATALOG` varchar(512) NOT NULL DEFAULT '',
`ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT '',
`DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
`CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL,
`CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL,
`NUMERIC_PRECISION` int(21) DEFAULT NULL,
`NUMERIC_SCALE` int(21) DEFAULT NULL,
`CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
`COLLATION_NAME` varchar(64) DEFAULT NULL,
`DTD_IDENTIFIER` longtext,
`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` varchar(8192) NOT NULL DEFAULT '',
`ROUTINE_COMMENT` longtext NOT NULL,
`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 ''
) DEFAULT CHARSET=utf8
SELECT * FROM information_schema.columns
WHERE table_schema = 'information_schema'
AND table_name = 'routines'
ORDER BY ordinal_position;
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME SPECIFIC_NAME
ORDINAL_POSITION 1
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_CATALOG
ORDINAL_POSITION 2
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 512
CHARACTER_OCTET_LENGTH 1536
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(512)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_SCHEMA
ORDINAL_POSITION 3
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_NAME
ORDINAL_POSITION 4
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_TYPE
ORDINAL_POSITION 5
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 9
CHARACTER_OCTET_LENGTH 27
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(9)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME DATA_TYPE
ORDINAL_POSITION 6
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME CHARACTER_MAXIMUM_LENGTH
ORDINAL_POSITION 7
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME CHARACTER_OCTET_LENGTH
ORDINAL_POSITION 8
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME NUMERIC_PRECISION
ORDINAL_POSITION 9
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME NUMERIC_SCALE
ORDINAL_POSITION 10
COLUMN_DEFAULT NULL
IS_NULLABLE YES
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(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME CHARACTER_SET_NAME
ORDINAL_POSITION 11
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME COLLATION_NAME
ORDINAL_POSITION 12
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME DTD_IDENTIFIER
ORDINAL_POSITION 13
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_BODY
ORDINAL_POSITION 14
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
CHARACTER_OCTET_LENGTH 24
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_DEFINITION
ORDINAL_POSITION 15
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME EXTERNAL_NAME
ORDINAL_POSITION 16
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME EXTERNAL_LANGUAGE
ORDINAL_POSITION 17
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME PARAMETER_STYLE
ORDINAL_POSITION 18
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
CHARACTER_OCTET_LENGTH 24
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME IS_DETERMINISTIC
ORDINAL_POSITION 19
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 3
CHARACTER_OCTET_LENGTH 9
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(3)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME SQL_DATA_ACCESS
ORDINAL_POSITION 20
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME SQL_PATH
ORDINAL_POSITION 21
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME SECURITY_TYPE
ORDINAL_POSITION 22
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 7
CHARACTER_OCTET_LENGTH 21
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(7)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME CREATED
ORDINAL_POSITION 23
COLUMN_DEFAULT 0000-00-00 00:00:00
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE datetime
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME LAST_ALTERED
ORDINAL_POSITION 24
COLUMN_DEFAULT 0000-00-00 00:00:00
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE datetime
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME SQL_MODE
ORDINAL_POSITION 25
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8192
CHARACTER_OCTET_LENGTH 24576
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8192)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME ROUTINE_COMMENT
ORDINAL_POSITION 26
COLUMN_DEFAULT NULL
IS_NULLABLE NO
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME DEFINER
ORDINAL_POSITION 27
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 77
CHARACTER_OCTET_LENGTH 231
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(77)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME CHARACTER_SET_CLIENT
ORDINAL_POSITION 28
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME COLLATION_CONNECTION
ORDINAL_POSITION 29
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME routines
COLUMN_NAME DATABASE_COLLATION
ORDINAL_POSITION 30
COLUMN_DEFAULT
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
DESCRIBE INFORMATION_SCHEMA.ROUTINES;
Field Type Null Key Default Extra
SPECIFIC_NAME varchar(64) NO
ROUTINE_CATALOG varchar(512) NO
ROUTINE_SCHEMA varchar(64) NO
ROUTINE_NAME varchar(64) NO
ROUTINE_TYPE varchar(9) NO
DATA_TYPE varchar(64) NO
CHARACTER_MAXIMUM_LENGTH int(21) YES NULL
CHARACTER_OCTET_LENGTH int(21) YES NULL
NUMERIC_PRECISION int(21) YES NULL
NUMERIC_SCALE int(21) YES NULL
CHARACTER_SET_NAME varchar(64) YES NULL
COLLATION_NAME varchar(64) YES NULL
DTD_IDENTIFIER longtext 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 varchar(8192) NO
ROUTINE_COMMENT longtext NO NULL
DEFINER varchar(77) NO
CHARACTER_SET_CLIENT varchar(32) NO
COLLATION_CONNECTION varchar(32) NO
DATABASE_COLLATION varchar(32) NO
# ========== routines.2 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test;
USE i_s_routines_test;
CREATE FUNCTION test_func1 (s char(20) RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!');
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 'RETURNS CHAR(50)
RETURN CONCAT('Hello', ,s,'!')' at line 1
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';
@@ -26,8 +26,6 @@ SELECT trigger_name, definer FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_n
...
@@ -26,8 +26,6 @@ SELECT trigger_name, definer FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_n
trigger_name definer
trigger_name definer
wl2818_trg1
wl2818_trg1
wl2818_trg2 mysqltest_dfn@localhost
wl2818_trg2 mysqltest_dfn@localhost
Warnings:
Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'wl2818_trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified 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 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)
1.0000 mysql proc comment text 65535 65535 utf8 utf8_bin text
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
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 collation_connection char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32)