List:Commits« Previous MessageNext Message »
From:gluh Date:February 22 2008 12:51pm
Subject:bk commit into 6.0 tree (gluh:1.2585) BUG#33106
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of gluh.  When gluh does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-02-22 16:51:30+04:00, gluh@stripped +3 -0
  Bug#33106 Can't distinguish parameters in information_schema.parameters
  added new column 'ROUTINE_TYPE'

  mysql-test/r/information_schema.result@stripped, 2008-02-22 16:51:26+04:00, gluh@stripped +11 -11
    result fix

  mysql-test/r/information_schema_parameters.result@stripped, 2008-02-22 16:51:26+04:00, gluh@stripped +57 -34
    result fix

  sql/sql_show.cc@stripped, 2008-02-22 16:51:26+04:00, gluh@stripped +8 -1
    added new column 'ROUTINE_TYPE'

diff -Nrup a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
--- a/mysql-test/r/information_schema.result	2008-02-07 22:21:13 +04:00
+++ b/mysql-test/r/information_schema.result	2008-02-22 16:51:26 +04:00
@@ -1650,17 +1650,17 @@ returns char(10) return null;
 create procedure p1 (p1 float(8,5), p2 char(32), p3 varchar(10)) begin end;
 create procedure p2 (p1 enum('c', 's'), p2 blob, p3 text) begin end;
 select * from information_schema.parameters;
-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
-NULL	test	f1	0	NULL	NULL	char	10	10	NULL	NULL	latin1	latin1_swedish_ci	char(10)
-NULL	test	f1	1	IN	p1	int	NULL	NULL	10	0	NULL	NULL	int(11)
-NULL	test	f1	2	IN	p2	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime
-NULL	test	f1	3	IN	p3	decimal	NULL	NULL	10	2	NULL	NULL	decimal(10,2)
-NULL	test	p1	1	IN	p1	float	NULL	NULL	8	5	NULL	NULL	float(8,5)
-NULL	test	p1	2	IN	p2	char	32	32	NULL	NULL	latin1	latin1_swedish_ci	char(32)
-NULL	test	p1	3	IN	p3	varchar	10	10	NULL	NULL	latin1	latin1_swedish_ci	varchar(10)
-NULL	test	p2	1	IN	p1	enum	1	1	NULL	NULL	latin1	latin1_swedish_ci	enum('c','s')
-NULL	test	p2	2	IN	p2	blob	65535	65535	NULL	NULL	NULL	NULL	blob
-NULL	test	p2	3	IN	p3	text	65535	65535	NULL	NULL	latin1	latin1_swedish_ci	text
+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
+NULL	test	f1	0	NULL	NULL	char	10	10	NULL	NULL	latin1	latin1_swedish_ci	char(10)	FUNCTION
+NULL	test	f1	1	IN	p1	int	NULL	NULL	10	0	NULL	NULL	int(11)	FUNCTION
+NULL	test	f1	2	IN	p2	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime	FUNCTION
+NULL	test	f1	3	IN	p3	decimal	NULL	NULL	10	2	NULL	NULL	decimal(10,2)	FUNCTION
+NULL	test	p1	1	IN	p1	float	NULL	NULL	8	5	NULL	NULL	float(8,5)	PROCEDURE
+NULL	test	p1	2	IN	p2	char	32	32	NULL	NULL	latin1	latin1_swedish_ci	char(32)	PROCEDURE
+NULL	test	p1	3	IN	p3	varchar	10	10	NULL	NULL	latin1	latin1_swedish_ci	varchar(10)	PROCEDURE
+NULL	test	p2	1	IN	p1	enum	1	1	NULL	NULL	latin1	latin1_swedish_ci	enum('c','s')	PROCEDURE
+NULL	test	p2	2	IN	p2	blob	65535	65535	NULL	NULL	NULL	NULL	blob	PROCEDURE
+NULL	test	p2	3	IN	p3	text	65535	65535	NULL	NULL	latin1	latin1_swedish_ci	text	PROCEDURE
 select data_type, character_maximum_length,
 character_octet_length, numeric_precision,
 numeric_scale, character_set_name,
diff -Nrup a/mysql-test/r/information_schema_parameters.result b/mysql-test/r/information_schema_parameters.result
--- a/mysql-test/r/information_schema_parameters.result	2007-12-12 14:46:15 +04:00
+++ b/mysql-test/r/information_schema_parameters.result	2008-02-22 16:51:26 +04:00
@@ -16,7 +16,8 @@ PARAMETERS	CREATE TEMPORARY TABLE `PARAM
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
-  `DTD_IDENTIFIER` longtext NOT NULL
+  `DTD_IDENTIFIER` longtext NOT NULL,
+  `ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT ''
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
 SELECT * FROM information_schema.columns
 WHERE table_schema = 'information_schema'
@@ -316,6 +317,27 @@ PRIVILEGES	#
 COLUMN_COMMENT	
 STORAGE	Default
 FORMAT	Default
+TABLE_CATALOG	NULL
+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	36
+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	
+STORAGE	Default
+FORMAT	Default
 DESCRIBE INFORMATION_SCHEMA.PARAMETERS;
 Field	Type	Null	Key	Default	Extra
 SPECIFIC_CATALOG	varchar(512)	YES		NULL	
@@ -332,6 +354,7 @@ 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;
@@ -342,7 +365,7 @@ ERROR 42000: You have an error in your S
 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
+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;
@@ -351,13 +374,13 @@ CREATE FUNCTION test_func1 (s char(20)) 
 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
-NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)
-NULL	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)
+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
+NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)	FUNCTION
+NULL	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
+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;
@@ -369,8 +392,8 @@ 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
-NULL	i_s_parameters_test	testproc	1	OUT	param1	int	NULL	NULL	10	0	NULL	NULL	int(11)
+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
+NULL	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;
@@ -378,8 +401,8 @@ 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
-NULL	i_s_parameters_test	test_proc	1	INOUT	P	int	NULL	NULL	10	0	NULL	NULL	int(11)
+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
+NULL	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;
@@ -387,8 +410,8 @@ 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
-NULL	i_s_parameters_test	test_proc	1	OUT	p	varchar	10	10	NULL	NULL	latin1	latin1_swedish_ci	varchar(10)
+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
+NULL	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;
@@ -397,10 +420,10 @@ CREATE FUNCTION test_func1 (s char(20), 
 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
-NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	40	40	NULL	NULL	latin1	latin1_swedish_ci	char(40)
-NULL	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)
-NULL	i_s_parameters_test	test_func1	2	IN	t	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)
+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
+NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	40	40	NULL	NULL	latin1	latin1_swedish_ci	char(40)	FUNCTION
+NULL	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)	FUNCTION
+NULL	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;
@@ -409,9 +432,9 @@ CREATE FUNCTION test_func1 (s char(20)) 
 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
-NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)
-NULL	i_s_parameters_test	test_func1	1	IN	s	char	20	20	NULL	NULL	latin1	latin1_swedish_ci	char(20)
+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
+NULL	i_s_parameters_test	test_func1	0	NULL	NULL	char	50	50	NULL	NULL	latin1	latin1_swedish_ci	char(50)	FUNCTION
+NULL	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;
@@ -419,9 +442,9 @@ 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
-NULL	i_s_parameters_test	test_func2	0	NULL	NULL	int	NULL	NULL	10	0	NULL	NULL	int(11)
-NULL	i_s_parameters_test	test_func2	1	IN	s	int	NULL	NULL	10	0	NULL	NULL	int(11)
+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
+NULL	i_s_parameters_test	test_func2	0	NULL	NULL	int	NULL	NULL	10	0	NULL	NULL	int(11)	FUNCTION
+NULL	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;
@@ -430,9 +453,9 @@ CREATE FUNCTION test_func5 (s date) RETU
 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
-NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp
-NULL	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date
+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
+NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
+NULL	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;
@@ -441,15 +464,15 @@ CREATE FUNCTION test_func5 (s date) RETU
 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
-NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp
-NULL	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date
+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
+NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
+NULL	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
-NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp
-NULL	i_s_parameters_test	test_func5	1	IN	s	date	NULL	NULL	NULL	NULL	NULL	NULL	date
+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
+NULL	i_s_parameters_test	test_func5	0	NULL	NULL	timestamp	NULL	NULL	NULL	NULL	NULL	NULL	timestamp	FUNCTION
+NULL	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;
@@ -458,7 +481,7 @@ CREATE FUNCTION test_func5 (s CHAR(20)) 
 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
-NULL	i_s_parameters_test	test_func5	0	NULL	NULL	varchar	30	120	NULL	NULL	utf8	utf8_general_ci	varchar(30)
-NULL	i_s_parameters_test	test_func5	1	IN	s	char	20	80	NULL	NULL	utf8	utf8_general_ci	char(20)
+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
+NULL	i_s_parameters_test	test_func5	0	NULL	NULL	varchar	30	120	NULL	NULL	utf8	utf8_general_ci	varchar(30)	FUNCTION
+NULL	i_s_parameters_test	test_func5	1	IN	s	char	20	80	NULL	NULL	utf8	utf8_general_ci	char(20)	FUNCTION
 DROP DATABASE i_s_parameters_test;
diff -Nrup a/sql/sql_show.cc b/sql/sql_show.cc
--- a/sql/sql_show.cc	2008-02-02 16:19:48 +04:00
+++ b/sql/sql_show.cc	2008-02-22 16:51:26 +04:00
@@ -4168,13 +4168,16 @@ bool store_schema_params(THD *thd, TABLE
   {
     Field *field;
     Create_field *field_def;
-
+    String tmp_string;
     if (routine_type == TYPE_ENUM_FUNCTION)
     {
       restore_record(table, s->default_values);
       table->field[1]->store(sp_db.ptr(), sp_db.length(), cs);
       table->field[2]->store(sp_name.ptr(), sp_name.length(), cs);
       table->field[3]->store((longlong) 0, TRUE);
+      get_field(thd->mem_root, proc_table->field[MYSQL_PROC_MYSQL_TYPE],
+                &tmp_string);
+      table->field[14]->store(tmp_string.ptr(), tmp_string.length(), cs);
       field_def= &sp->m_return_field_def;
       field= make_field(&share, (uchar*) 0, field_def->length,
                         (uchar*) "", 0, field_def->pack_flag,
@@ -4224,6 +4227,9 @@ bool store_schema_params(THD *thd, TABLE
       table->field[4]->set_notnull();
       table->field[5]->store(spvar->name.str, spvar->name.length, cs);
       table->field[5]->set_notnull();
+      get_field(thd->mem_root, proc_table->field[MYSQL_PROC_MYSQL_TYPE],
+                &tmp_string);
+      table->field[14]->store(tmp_string.ptr(), tmp_string.length(), cs);
 
       field= make_field(&share, (uchar*) 0, field_def->length,
                         (uchar*) "", 0, field_def->pack_flag,
@@ -6868,6 +6874,7 @@ ST_FIELD_INFO parameters_fields_info[]=
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, OPEN_FULL_TABLE},
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, OPEN_FULL_TABLE},
   {"DTD_IDENTIFIER", 65535, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
+  {"ROUTINE_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE}
 };
 
Thread
bk commit into 6.0 tree (gluh:1.2585) BUG#33106gluh22 Feb