List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:March 11 2011 6:55pm
Subject:bzr push into mysql-trunk branch (mayank.prasad:3755 to 3756) Bug#11763174
View as plain text  
 3756 Mayank Prasad	2011-03-12
      Bug #11763174: INFORMATION_SCHEMA.PARAMETERS.NUMERIC_PRECISION SHOULD BE BIGINT
            
      Issue:
      ------
      The information_schema.PARAMETERS.NUMERIC_PRECISION and information_schema.ROUTINES.NUMERIC_PRECISION were INT whereas they should have been BIGINT(21) UNSIGNED.
            
      Solution:
      ---------
      Changed the metadata to return the new column types.
      Added a new test case in main.information_schema.test.
      Updated funcs_1.is_columns_is, main.information_schema_parameters and main.information_schema.routines test result to reflect the new type.
     @ mysql-test/r/information_schema.result
        Added expected result for test case added in main.information_schema.test.
     @ mysql-test/r/information_schema_parameters.result
        Updated test result to reflect the new column type.
     @ mysql-test/r/information_schema_routines.result
        Updated test result to reflect the new column type.
     @ mysql-test/suite/funcs_1/r/is_columns_is.result
        Updated test result to reflect the new column type.
     @ mysql-test/t/information_schema.test
        Added a new test case in main.information_schema.test.
     @ sql/sql_show.cc
        Changed information_schema.PARAMETERS.NUMERIC_PRECISION and information_schema.ROUTINES.NUMERIC_PRECISION to bigint(21) unsigned

    modified:
      mysql-test/r/information_schema.result
      mysql-test/r/information_schema_parameters.result
      mysql-test/r/information_schema_routines.result
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/t/information_schema.test
      sql/sql_show.cc
 3755 Joerg Bruehe	2011-03-11 [merge]
      Auto-upmerge a test case fix ("file_contents") from 5.5 to trunk (5.6).

    modified:
      mysql-test/t/file_contents.test
=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-12-17 18:43:38 +0000
+++ b/mysql-test/r/information_schema.result	2011-03-11 18:53:12 +0000
@@ -1,5 +1,13 @@
 DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
 DROP VIEW IF EXISTS v1;
+#
+# Bug#11763174 INFORMATION_SCHEMA.PARAMETERS.NUMERIC_PRECISION SHOULD BE BIGINT 
+#
+select table_name, data_type, column_type from information_schema.columns  where column_name = 'numeric_precision' and table_schema = 'information_schema';
+table_name	data_type	column_type
+COLUMNS	bigint	bigint(21) unsigned
+PARAMETERS	bigint	bigint(21) unsigned
+ROUTINES	bigint	bigint(21) unsigned
 show variables where variable_name like "skip_show_database";
 Variable_name	Value
 skip_show_database	OFF

=== modified file 'mysql-test/r/information_schema_parameters.result'
--- a/mysql-test/r/information_schema_parameters.result	2010-07-09 12:55:13 +0000
+++ b/mysql-test/r/information_schema_parameters.result	2011-03-11 18:53:12 +0000
@@ -12,7 +12,7 @@ PARAMETERS	CREATE TEMPORARY TABLE `PARAM
   `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_PRECISION` bigint(21) unsigned DEFAULT NULL,
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
@@ -201,14 +201,14 @@ COLUMN_NAME	NUMERIC_PRECISION
 ORDINAL_POSITION	10
 COLUMN_DEFAULT	NULL
 IS_NULLABLE	YES
-DATA_TYPE	int
+DATA_TYPE	bigint
 CHARACTER_MAXIMUM_LENGTH	NULL
 CHARACTER_OCTET_LENGTH	NULL
-NUMERIC_PRECISION	10
+NUMERIC_PRECISION	20
 NUMERIC_SCALE	0
 CHARACTER_SET_NAME	NULL
 COLLATION_NAME	NULL
-COLUMN_TYPE	int(21)
+COLUMN_TYPE	bigint(21) unsigned
 COLUMN_KEY	
 EXTRA	
 PRIVILEGES	#
@@ -319,7 +319,7 @@ 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_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	

=== modified file 'mysql-test/r/information_schema_routines.result'
--- a/mysql-test/r/information_schema_routines.result	2010-07-09 12:55:13 +0000
+++ b/mysql-test/r/information_schema_routines.result	2011-03-11 18:53:12 +0000
@@ -11,7 +11,7 @@ ROUTINES	CREATE TEMPORARY TABLE `ROUTINE
   `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_PRECISION` bigint(21) unsigned DEFAULT NULL,
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
@@ -197,14 +197,14 @@ COLUMN_NAME	NUMERIC_PRECISION
 ORDINAL_POSITION	9
 COLUMN_DEFAULT	NULL
 IS_NULLABLE	YES
-DATA_TYPE	int
+DATA_TYPE	bigint
 CHARACTER_MAXIMUM_LENGTH	NULL
 CHARACTER_OCTET_LENGTH	NULL
-NUMERIC_PRECISION	10
+NUMERIC_PRECISION	20
 NUMERIC_SCALE	0
 CHARACTER_SET_NAME	NULL
 COLLATION_NAME	NULL
-COLUMN_TYPE	int(21)
+COLUMN_TYPE	bigint(21) unsigned
 COLUMN_KEY	
 EXTRA	
 PRIVILEGES	#
@@ -618,7 +618,7 @@ 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_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-09-27 13:03:27 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result	2011-03-11 18:53:12 +0000
@@ -131,7 +131,7 @@ def	information_schema	PARAMETERS	CHARAC
 def	information_schema	PARAMETERS	COLLATION_NAME	13	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	PARAMETERS	DATA_TYPE	7		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	PARAMETERS	DTD_IDENTIFIER	14	NULL	NO	longtext	4294967295	4294967295	NULL	NULL	utf8	utf8_general_ci	longtext			select	
-def	information_schema	PARAMETERS	NUMERIC_PRECISION	10	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
+def	information_schema	PARAMETERS	NUMERIC_PRECISION	10	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 def	information_schema	PARAMETERS	NUMERIC_SCALE	11	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	PARAMETERS	ORDINAL_POSITION	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	PARAMETERS	PARAMETER_MODE	5	NULL	YES	varchar	5	15	NULL	NULL	utf8	utf8_general_ci	varchar(5)			select	
@@ -210,7 +210,7 @@ def	information_schema	ROUTINES	EXTERNAL
 def	information_schema	ROUTINES	EXTERNAL_NAME	16	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	ROUTINES	IS_DETERMINISTIC	19		NO	varchar	3	9	NULL	NULL	utf8	utf8_general_ci	varchar(3)			select	
 def	information_schema	ROUTINES	LAST_ALTERED	24	0000-00-00 00:00:00	NO	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime			select	
-def	information_schema	ROUTINES	NUMERIC_PRECISION	9	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
+def	information_schema	ROUTINES	NUMERIC_PRECISION	9	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 def	information_schema	ROUTINES	NUMERIC_SCALE	10	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	ROUTINES	PARAMETER_STYLE	18		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)			select	
 def	information_schema	ROUTINES	ROUTINE_BODY	14		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)			select	
@@ -522,7 +522,7 @@ NULL	information_schema	PARAMETERS	ORDIN
 3.0000	information_schema	PARAMETERS	DATA_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	PARAMETERS	CHARACTER_MAXIMUM_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
 NULL	information_schema	PARAMETERS	CHARACTER_OCTET_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
-NULL	information_schema	PARAMETERS	NUMERIC_PRECISION	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	PARAMETERS	NUMERIC_PRECISION	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	PARAMETERS	NUMERIC_SCALE	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	PARAMETERS	CHARACTER_SET_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	PARAMETERS	COLLATION_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -591,7 +591,7 @@ NULL	information_schema	PROCESSLIST	TIME
 3.0000	information_schema	ROUTINES	DATA_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	ROUTINES	CHARACTER_MAXIMUM_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
 NULL	information_schema	ROUTINES	CHARACTER_OCTET_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
-NULL	information_schema	ROUTINES	NUMERIC_PRECISION	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	ROUTINES	NUMERIC_PRECISION	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	ROUTINES	NUMERIC_SCALE	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	ROUTINES	CHARACTER_SET_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	ROUTINES	COLLATION_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)

=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test	2010-10-25 12:13:13 +0000
+++ b/mysql-test/t/information_schema.test	2011-03-11 18:53:12 +0000
@@ -18,6 +18,11 @@ DROP VIEW IF EXISTS v1;
 --enable_warnings
 
 
+--echo #
+--echo # Bug#11763174 INFORMATION_SCHEMA.PARAMETERS.NUMERIC_PRECISION SHOULD BE BIGINT 
+--echo #
+select table_name, data_type, column_type from information_schema.columns  where column_name = 'numeric_precision' and table_schema = 'information_schema';
+
 show variables where variable_name like "skip_show_database";
 grant select, update, execute on test.* to mysqltest_2@localhost;
 grant select, update on test.* to mysqltest_1@localhost;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2011-03-11 09:35:38 +0000
+++ b/sql/sql_show.cc	2011-03-11 18:53:12 +0000
@@ -6977,7 +6977,8 @@ ST_FIELD_INFO proc_fields_info[]=
   {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_MAXIMUM_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_OCTET_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
-  {"NUMERIC_PRECISION", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
+  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
+   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, SKIP_OPEN_TABLE},
   {"NUMERIC_SCALE", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
@@ -7387,7 +7388,8 @@ ST_FIELD_INFO parameters_fields_info[]=
   {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {"CHARACTER_MAXIMUM_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
   {"CHARACTER_OCTET_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
-  {"NUMERIC_PRECISION", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
+  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
+   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FULL_TABLE},
   {"NUMERIC_SCALE", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
   {"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},

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (mayank.prasad:3755 to 3756) Bug#11763174Mayank Prasad12 Mar