information_schema_parameters.result 16.7 KB
Newer Older
Sergey Glukhov's avatar
Sergey Glukhov committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
# ========== parameters.1 ==========
USE INFORMATION_SCHEMA;
SHOW CREATE TABLE INFORMATION_SCHEMA.PARAMETERS;
Table	Create Table
PARAMETERS	CREATE TEMPORARY TABLE `PARAMETERS` (
  `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';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
# ========== parameters.3 ==========
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,'!');
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)	FUNCTION
def	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)	FUNCTION
DROP FUNCTION test_func1;
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
# ========== parameters.4 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE PROCEDURE testproc (OUT param1 INT)
BEGIN
SELECT 2+2 as param1;
END;
//
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'testproc';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	testproc	1	OUT	param1	int	NULL	NULL	10	0	NULL	NULL	int(11)	PROCEDURE
# ========== parameters.5 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE PROCEDURE test_proc(INOUT P INT) SET @x=P*2;
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_proc';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_proc	1	INOUT	P	int	NULL	NULL	10	0	NULL	NULL	int(11)	PROCEDURE
# ========== parameters.6 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE PROCEDURE test_proc(OUT p VARCHAR(10)) SET P='test';
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_proc';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_proc	1	OUT	p	varchar	10	10	NULL	NULL	latin1	latin1_swedish_ci	varchar(10)	PROCEDURE
# ========== parameters.7 ==========
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), t char(20)) RETURNS CHAR(40)
RETURN CONCAT(s,t);
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func1	0	NULL	NULL	char	40	40	NULL	NULL	latin1	latin1_swedish_ci	char(40)	FUNCTION
def	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)	FUNCTION
def	i_s_parameters_test	test_func1	2	IN	t	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)	FUNCTION
# ========== parameters.8 ==========
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,'!');
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func1';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)	FUNCTION
def	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)	FUNCTION
# ========== parameters.9 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE FUNCTION test_func2 (s int) RETURNS INT RETURN s*2;
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func2';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func2	0	NULL	NULL	int	NULL	NULL	10	0	NULL	NULL	int(11)	FUNCTION
def	i_s_parameters_test	test_func2	1	IN	s	int	NULL	NULL	10	0	NULL	NULL	int(11)	FUNCTION
# ========== parameters.10 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE FUNCTION test_func5 (s date) RETURNS TIMESTAMP
RETURN CURRENT_TIMESTAMP;
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func5';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
def	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date	FUNCTION
# ========== parameters.11 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test;
USE i_s_parameters_test;
CREATE FUNCTION test_func5 (s date) RETURNS TIMESTAMP
RETURN CURRENT_TIMESTAMP;
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func5';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
def	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date	FUNCTION
ALTER FUNCTION test_func5 COMMENT 'new comment added';
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func5';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
def	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date	FUNCTION
# ========== parameters.12 ==========
DROP DATABASE IF EXISTS i_s_parameters_test;
CREATE DATABASE i_s_parameters_test CHARACTER SET  utf8;
USE i_s_parameters_test;
CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
RETURN CONCAT('XYZ, ' ,s);
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE SPECIFIC_SCHEMA = 'i_s_parameters_test' AND SPECIFIC_NAME = 'test_func5';
SPECIFIC_CATALOG	SPECIFIC_SCHEMA	SPECIFIC_NAME	ORDINAL_POSITION	PARAMETER_MODE	PARAMETER_NAME	DATA_TYPE	CHARACTER_MAXIMUM_LENGTH	CHARACTER_OCTET_LENGTH	NUMERIC_PRECISION	NUMERIC_SCALE	CHARACTER_SET_NAME	COLLATION_NAME	DTD_IDENTIFIER	ROUTINE_TYPE
def	i_s_parameters_test	test_func5	0	NULL	NULL	varchar	30	90	NULL	NULL	utf8	utf8_general_ci	varchar(30)	FUNCTION
def	i_s_parameters_test	test_func5	1	IN	s	char	20	60	NULL	NULL	utf8	utf8_general_ci	char(20)	FUNCTION
DROP DATABASE i_s_parameters_test;