2015-08-11 18:45:38 +02:00
set sql_mode="";
set sql_mode="";
2010-01-15 12:42:15 +01:00
# ========== routines.1 ==========
USE INFORMATION_SCHEMA;
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) NOT NULL DEFAULT '',
`ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '',
2017-08-18 21:36:42 +02:00
`ROUTINE_TYPE` varchar(13) NOT NULL DEFAULT '',
2010-01-15 12:42:15 +01:00
`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,
2011-10-19 21:45:18 +02:00
`DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL,
2010-01-15 12:42:15 +01:00
`CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
`COLLATION_NAME` varchar(64) DEFAULT NULL,
2016-06-30 00:16:10 +02:00
`DTD_IDENTIFIER` longtext DEFAULT NULL,
2010-01-15 12:42:15 +01:00
`ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '',
2016-06-30 00:16:10 +02:00
`ROUTINE_DEFINITION` longtext DEFAULT NULL,
2010-01-15 12:42:15 +01:00
`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 '',
2016-06-30 00:16:10 +02:00
`ROUTINE_COMMENT` longtext NOT NULL DEFAULT '',
2013-06-13 20:18:40 +02:00
`DEFINER` varchar(189) NOT NULL DEFAULT '',
2010-01-15 12:42:15 +01:00
`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
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME SPECIFIC_NAME
ORDINAL_POSITION 1
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_CATALOG
ORDINAL_POSITION 2
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 512
CHARACTER_OCTET_LENGTH 1536
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(512)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_SCHEMA
ORDINAL_POSITION 3
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_NAME
ORDINAL_POSITION 4
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_TYPE
ORDINAL_POSITION 5
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
2017-08-18 21:36:42 +02:00
CHARACTER_MAXIMUM_LENGTH 13
CHARACTER_OCTET_LENGTH 39
2010-01-15 12:42:15 +01:00
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
2017-08-18 21:36:42 +02:00
COLUMN_TYPE varchar(13)
2010-01-15 12:42:15 +01:00
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME DATA_TYPE
ORDINAL_POSITION 6
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
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
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE int(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
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
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE int(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
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
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE int(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
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
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE int(21)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2011-10-19 21:45:18 +02:00
COLUMN_NAME DATETIME_PRECISION
2010-01-15 12:42:15 +01:00
ORDINAL_POSITION 11
COLUMN_DEFAULT NULL
IS_NULLABLE YES
2011-10-19 21:45:18 +02:00
DATA_TYPE bigint
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION 20
NUMERIC_SCALE 0
DATETIME_PRECISION NULL
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE bigint(21) unsigned
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2011-10-19 21:45:18 +02:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ROUTINES
COLUMN_NAME CHARACTER_SET_NAME
ORDINAL_POSITION 12
COLUMN_DEFAULT NULL
IS_NULLABLE YES
2010-01-15 12:42:15 +01:00
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME COLLATION_NAME
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 13
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME DTD_IDENTIFIER
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 14
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_BODY
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 15
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
CHARACTER_OCTET_LENGTH 24
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_DEFINITION
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 16
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME EXTERNAL_NAME
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 17
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME EXTERNAL_LANGUAGE
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 18
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME PARAMETER_STYLE
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 19
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8
CHARACTER_OCTET_LENGTH 24
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME IS_DETERMINISTIC
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 20
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 3
CHARACTER_OCTET_LENGTH 9
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(3)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME SQL_DATA_ACCESS
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 21
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME SQL_PATH
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 22
2010-01-15 12:42:15 +01:00
COLUMN_DEFAULT NULL
IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 64
CHARACTER_OCTET_LENGTH 192
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(64)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME SECURITY_TYPE
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 23
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 7
CHARACTER_OCTET_LENGTH 21
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(7)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME CREATED
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 24
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT '0000-00-00 00:00:00'
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION 0
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE datetime
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME LAST_ALTERED
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 25
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT '0000-00-00 00:00:00'
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE datetime
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION 0
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
COLUMN_TYPE datetime
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME SQL_MODE
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 26
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 8192
CHARACTER_OCTET_LENGTH 24576
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(8192)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME ROUTINE_COMMENT
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 27
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE longtext
CHARACTER_MAXIMUM_LENGTH 4294967295
CHARACTER_OCTET_LENGTH 4294967295
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE longtext
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME DEFINER
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 28
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
2013-06-13 20:18:40 +02:00
CHARACTER_MAXIMUM_LENGTH 189
CHARACTER_OCTET_LENGTH 567
2010-01-15 12:42:15 +01:00
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
2013-06-13 20:18:40 +02:00
COLUMN_TYPE varchar(189)
2010-01-15 12:42:15 +01:00
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME CHARACTER_SET_CLIENT
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 29
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME COLLATION_CONNECTION
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 30
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
TABLE_CATALOG def
TABLE_SCHEMA information_schema
2010-07-09 14:55:13 +02:00
TABLE_NAME ROUTINES
2010-01-15 12:42:15 +01:00
COLUMN_NAME DATABASE_COLLATION
2011-10-19 21:45:18 +02:00
ORDINAL_POSITION 31
2017-06-29 00:57:20 +02:00
COLUMN_DEFAULT ''
2010-01-15 12:42:15 +01:00
IS_NULLABLE NO
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 32
CHARACTER_OCTET_LENGTH 96
NUMERIC_PRECISION NULL
NUMERIC_SCALE NULL
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION NULL
2010-01-15 12:42:15 +01:00
CHARACTER_SET_NAME utf8
COLLATION_NAME utf8_general_ci
COLUMN_TYPE varchar(32)
COLUMN_KEY
EXTRA
PRIVILEGES #
COLUMN_COMMENT
2017-03-28 21:36:33 +02:00
IS_GENERATED NEVER
GENERATION_EXPRESSION NULL
2010-01-15 12:42:15 +01:00
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
2017-08-18 21:36:42 +02:00
ROUTINE_TYPE varchar(13) NO
2010-01-15 12:42:15 +01:00
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
2011-10-19 21:45:18 +02:00
DATETIME_PRECISION bigint(21) unsigned YES NULL
2010-01-15 12:42:15 +01:00
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
2016-06-30 00:16:10 +02:00
ROUTINE_COMMENT longtext NO
2013-06-13 20:18:40 +02:00
DEFINER varchar(189) NO
2010-01-15 12:42:15 +01:00
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,'!');
2011-12-12 23:58:40 +01:00
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RETURNS CHAR(50)
2010-01-15 12:42:15 +01:00
RETURN CONCAT('Hello', ,s,'!')' at line 1
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
2010-01-15 12:42:15 +01:00
# ========== routines.3 ==========
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,'!');
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func1 def i_s_routines_test test_func1 FUNCTION char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) SQL RETURN CONCAT('Hello, ',s,'!') NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
DROP FUNCTION test_func1;
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
2010-01-15 12:42:15 +01:00
# ========== routines.4 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test;
USE i_s_routines_test;
CREATE PROCEDURE testproc (OUT param1 INT)
BEGIN
SELECT 2+2 as param1;
END;
//
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'testproc';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
testproc def i_s_routines_test testproc PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN
2010-01-15 12:42:15 +01:00
SELECT 2+2 as param1;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
# ========== routines.5 ==========
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,'!');
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func1';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func1 def i_s_routines_test test_func1 FUNCTION char 50 50 NULL NULL NULL latin1 latin1_swedish_ci char(50) SQL RETURN CONCAT('Hello, ',s,'!') NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
# ========== routines.6 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test;
USE i_s_routines_test;
CREATE FUNCTION test_func2 (s int) RETURNS INT RETURN s*2;
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func2';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func2 def i_s_routines_test test_func2 FUNCTION int NULL NULL 10 0 NULL NULL NULL int(11) SQL RETURN s*2 NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
# ========== routines.7 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test;
USE i_s_routines_test;
CREATE FUNCTION test_func5 (s date) RETURNS TIMESTAMP
RETURN CURRENT_TIMESTAMP;
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func5';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func5 def i_s_routines_test test_func5 FUNCTION timestamp NULL NULL NULL NULL 0 NULL NULL timestamp SQL RETURN CURRENT_TIMESTAMP NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
# ========== routines.8 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test;
USE i_s_routines_test;
CREATE FUNCTION test_func5 (s date) RETURNS TIMESTAMP
RETURN CURRENT_TIMESTAMP;
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func5';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func5 def i_s_routines_test test_func5 FUNCTION timestamp NULL NULL NULL NULL 0 NULL NULL timestamp SQL RETURN CURRENT_TIMESTAMP NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
ALTER FUNCTION test_func5 COMMENT 'new comment added';
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func5';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func5 def i_s_routines_test test_func5 FUNCTION timestamp NULL NULL NULL NULL 0 NULL NULL timestamp SQL RETURN CURRENT_TIMESTAMP NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> new comment added root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
2010-01-15 12:42:15 +01:00
# ========== routines.9 ==========
DROP DATABASE IF EXISTS i_s_routines_test;
CREATE DATABASE i_s_routines_test CHARACTER SET utf8;
USE i_s_routines_test;
CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
RETURN CONCAT('XYZ, ' ,s);
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA = 'i_s_routines_test' AND ROUTINE_NAME = 'test_func5';
2011-10-19 21:45:18 +02:00
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME 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
test_func5 def i_s_routines_test test_func5 FUNCTION varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) SQL RETURN CONCAT('XYZ, ' ,s) NULL NULL SQL NO CONTAINS SQL NULL DEFINER <created> <modified> root@localhost latin1 latin1_swedish_ci utf8_general_ci
2010-01-15 12:42:15 +01:00
DROP DATABASE i_s_routines_test;