List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:October 23 2009 6:20am
Subject:bzr commit into mysql-5.5.0-next-mr-bugfixing branch
(Sergey.Glukhov:2914) Bug#5299
View as plain text  
#At file:///home/gluh/MySQL/mysql-next-mr-bugfixing/ based on revid:alik@stripped

 2914 Sergey Glukhov	2009-10-23
      Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/r/show_check.result
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/r/signal_code.result
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/r/sp-code.result
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/r/sp.result
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/t/show_check.test
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ mysql-test/t/sp.test
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/mysqld.cc
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sp_head.cc
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sql_lex.h
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sql_parse.cc
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sql_prepare.cc
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sql_show.cc
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
     @ sql/sql_yacc.yy
        Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony

    modified:
      mysql-test/r/show_check.result
      mysql-test/r/signal_code.result
      mysql-test/r/sp-code.result
      mysql-test/r/sp.result
      mysql-test/t/show_check.test
      mysql-test/t/sp.test
      sql/mysqld.cc
      sql/sp_head.cc
      sql/sql_lex.h
      sql/sql_parse.cc
      sql/sql_prepare.cc
      sql/sql_show.cc
      sql/sql_yacc.yy
=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result	2009-10-07 20:57:03 +0000
+++ b/mysql-test/r/show_check.result	2009-10-23 06:20:44 +0000
@@ -808,7 +808,6 @@ show plugins;
 show columns in t1;
 show slave hosts;
 show keys in t1;
-show column types;
 show table types;
 show storage engines;
 show authors;

=== modified file 'mysql-test/r/signal_code.result'
--- a/mysql-test/r/signal_code.result	2009-09-10 09:18:29 +0000
+++ b/mysql-test/r/signal_code.result	2009-10-23 06:20:44 +0000
@@ -20,16 +20,16 @@ return 0;
 end $$
 show procedure code signal_proc;
 Pos	Instruction
-0	stmt 136 "SIGNAL foo"
-1	stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
-2	stmt 137 "RESIGNAL foo"
-3	stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
+0	stmt 135 "SIGNAL foo"
+1	stmt 135 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
+2	stmt 136 "RESIGNAL foo"
+3	stmt 136 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
 drop procedure signal_proc;
 show function code signal_func;
 Pos	Instruction
-0	stmt 136 "SIGNAL foo"
-1	stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
-2	stmt 137 "RESIGNAL foo"
-3	stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
+0	stmt 135 "SIGNAL foo"
+1	stmt 135 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
+2	stmt 136 "RESIGNAL foo"
+3	stmt 136 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
 4	freturn 3 0
 drop function signal_func;

=== modified file 'mysql-test/r/sp-code.result'
--- a/mysql-test/r/sp-code.result	2008-03-25 23:48:05 +0000
+++ b/mysql-test/r/sp-code.result	2009-10-23 06:20:44 +0000
@@ -155,11 +155,11 @@ Pos	Instruction
 0	stmt 9 "drop temporary table if exists sudoku..."
 1	stmt 1 "create temporary table sudoku_work ( ..."
 2	stmt 1 "create temporary table sudoku_schedul..."
-3	stmt 94 "call sudoku_init()"
+3	stmt 93 "call sudoku_init()"
 4	jump_if_not 7(8) p_naive@0
 5	stmt 4 "update sudoku_work set cnt = 0 where ..."
 6	jump 8
-7	stmt 94 "call sudoku_count()"
+7	stmt 93 "call sudoku_count()"
 8	stmt 6 "insert into sudoku_schedule (row,col)..."
 9	set v_scounter@2 0
 10	set v_i@3 1

=== modified file 'mysql-test/r/sp.result'
--- a/mysql-test/r/sp.result	2009-09-17 09:20:11 +0000
+++ b/mysql-test/r/sp.result	2009-10-23 06:20:44 +0000
@@ -2377,7 +2377,6 @@ create procedure bug4902()
 begin
 show charset like 'foo';
 show collation like 'foo';
-show column types;
 show create table t1;
 show create database test;
 show databases like 'foo';
@@ -2395,9 +2394,6 @@ end|
 call bug4902()|
 Charset	Description	Default collation	Maxlen
 Collation	Charset	Id	Default	Compiled	Sortlen
-Type	Size	Min_Value	Max_Value	Prec	Scale	Nullable	Auto_Increment	Unsigned	Zerofill	Searchable	Case_Sensitive	Default	Comment
-tinyint	1	-128	127	0	0	YES	YES	NO	YES	YES	NO	NULL,0	A very small integer
-tinyint unsigned	1	0	255	0	0	YES	YES	YES	YES	YES	NO	NULL,0	A very small integer
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `id` char(16) NOT NULL DEFAULT '',
@@ -2419,9 +2415,6 @@ Level	Code	Message
 call bug4902()|
 Charset	Description	Default collation	Maxlen
 Collation	Charset	Id	Default	Compiled	Sortlen
-Type	Size	Min_Value	Max_Value	Prec	Scale	Nullable	Auto_Increment	Unsigned	Zerofill	Searchable	Case_Sensitive	Default	Comment
-tinyint	1	-128	127	0	0	YES	YES	NO	YES	YES	NO	NULL,0	A very small integer
-tinyint unsigned	1	0	255	0	0	YES	YES	YES	YES	YES	NO	NULL,0	A very small integer
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `id` char(16) NOT NULL DEFAULT '',

=== modified file 'mysql-test/t/show_check.test'
--- a/mysql-test/t/show_check.test	2009-03-06 14:56:17 +0000
+++ b/mysql-test/t/show_check.test	2009-10-23 06:20:44 +0000
@@ -629,7 +629,6 @@ show plugins;
 show columns in t1;
 show slave hosts;
 show keys in t1;
-show column types;
 show table types;
 show storage engines;
 show authors;

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2009-09-04 08:14:54 +0000
+++ b/mysql-test/t/sp.test	2009-10-23 06:20:44 +0000
@@ -2882,7 +2882,6 @@ create procedure bug4902()
 begin
   show charset like 'foo';
   show collation like 'foo';
-  show column types;
   show create table t1;
   show create database test;
   show databases like 'foo';

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-10-22 18:06:01 +0000
+++ b/sql/mysqld.cc	2009-10-23 06:20:44 +0000
@@ -3075,7 +3075,6 @@ SHOW_VAR com_status_vars[]= {
   {"show_binlogs",         (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
   {"show_charsets",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
   {"show_collations",      (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
-  {"show_column_types",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLUMN_TYPES]), SHOW_LONG_STATUS},
   {"show_contributors",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
   {"show_create_db",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
   {"show_create_event",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_EVENT]), SHOW_LONG_STATUS},

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2009-10-19 13:36:19 +0000
+++ b/sql/sp_head.cc	2009-10-23 06:20:44 +0000
@@ -177,7 +177,6 @@ sp_get_flags_for_command(LEX *lex)
   case SQLCOM_SHOW_BINLOG_EVENTS:
   case SQLCOM_SHOW_CHARSETS:
   case SQLCOM_SHOW_COLLATIONS:
-  case SQLCOM_SHOW_COLUMN_TYPES:
   case SQLCOM_SHOW_CONTRIBUTORS:
   case SQLCOM_SHOW_CREATE:
   case SQLCOM_SHOW_CREATE_DB:

=== modified file 'sql/sql_lex.h'
--- a/sql/sql_lex.h	2009-10-14 08:25:39 +0000
+++ b/sql/sql_lex.h	2009-10-23 06:20:44 +0000
@@ -94,7 +94,7 @@ enum enum_sql_command {
   SQLCOM_SHOW_SLAVE_HOSTS, SQLCOM_DELETE_MULTI, SQLCOM_UPDATE_MULTI,
   SQLCOM_SHOW_BINLOG_EVENTS, SQLCOM_SHOW_NEW_MASTER, SQLCOM_DO,
   SQLCOM_SHOW_WARNS, SQLCOM_EMPTY_QUERY, SQLCOM_SHOW_ERRORS,
-  SQLCOM_SHOW_COLUMN_TYPES, SQLCOM_SHOW_STORAGE_ENGINES, SQLCOM_SHOW_PRIVILEGES,
+  SQLCOM_SHOW_STORAGE_ENGINES, SQLCOM_SHOW_PRIVILEGES,
   SQLCOM_HELP, SQLCOM_CREATE_USER, SQLCOM_DROP_USER, SQLCOM_RENAME_USER,
   SQLCOM_REVOKE_ALL, SQLCOM_CHECKSUM,
   SQLCOM_CREATE_PROCEDURE, SQLCOM_CREATE_SPFUNCTION, SQLCOM_CALL,

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2009-10-21 10:48:22 +0000
+++ b/sql/sql_parse.cc	2009-10-23 06:20:44 +0000
@@ -300,7 +300,6 @@ void init_update_queries(void)
   sql_command_flags[SQLCOM_SHOW_BINLOGS]= CF_STATUS_COMMAND;
   sql_command_flags[SQLCOM_SHOW_SLAVE_HOSTS]= CF_STATUS_COMMAND;
   sql_command_flags[SQLCOM_SHOW_BINLOG_EVENTS]= CF_STATUS_COMMAND;
-  sql_command_flags[SQLCOM_SHOW_COLUMN_TYPES]= CF_STATUS_COMMAND;
   sql_command_flags[SQLCOM_SHOW_STORAGE_ENGINES]= CF_STATUS_COMMAND;
   sql_command_flags[SQLCOM_SHOW_AUTHORS]= CF_STATUS_COMMAND;
   sql_command_flags[SQLCOM_SHOW_CONTRIBUTORS]= CF_STATUS_COMMAND;
@@ -3472,9 +3471,6 @@ end_with_restore_list:
   case SQLCOM_SHOW_PRIVILEGES:
     res= mysqld_show_privileges(thd);
     break;
-  case SQLCOM_SHOW_COLUMN_TYPES:
-    res= mysqld_show_column_types(thd);
-    break;
   case SQLCOM_SHOW_ENGINE_LOGS:
 #ifdef DONT_ALLOW_SHOW_COMMANDS
     my_message(ER_NOT_ALLOWED_COMMAND, ER(ER_NOT_ALLOWED_COMMAND),

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2009-10-19 13:36:19 +0000
+++ b/sql/sql_prepare.cc	2009-10-23 06:20:44 +0000
@@ -1923,7 +1923,6 @@ static bool check_prepared_statement(Pre
   case SQLCOM_SHOW_PROCESSLIST:
   case SQLCOM_SHOW_STORAGE_ENGINES:
   case SQLCOM_SHOW_PRIVILEGES:
-  case SQLCOM_SHOW_COLUMN_TYPES:
   case SQLCOM_SHOW_ENGINE_LOGS:
   case SQLCOM_SHOW_ENGINE_STATUS:
   case SQLCOM_SHOW_ENGINE_MUTEX:

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2009-10-21 10:48:22 +0000
+++ b/sql/sql_show.cc	2009-10-23 06:20:44 +0000
@@ -344,94 +344,6 @@ bool mysqld_show_privileges(THD *thd)
 }
 
 
-/***************************************************************************
-  List all column types
-***************************************************************************/
-
-struct show_column_type_st
-{
-  const char *type;
-  uint size;
-  const char *min_value;
-  const char *max_value;
-  uint precision;
-  uint scale;
-  const char *nullable;
-  const char *auto_increment;
-  const char *unsigned_attr;
-  const char *zerofill;
-  const char *searchable;
-  const char *case_sensitivity;
-  const char *default_value;
-  const char *comment;
-};
-
-/* TODO: Add remaning types */
-
-static struct show_column_type_st sys_column_types[]=
-{
-  {"tinyint",
-    1,  "-128",  "127",  0,  0,  "YES",  "YES",
-    "NO",   "YES", "YES",  "NO",  "NULL,0",
-    "A very small integer"},
-  {"tinyint unsigned",
-    1,  "0"   ,  "255",  0,  0,  "YES",  "YES",
-    "YES",  "YES",  "YES",  "NO",  "NULL,0",
-    "A very small integer"},
-};
-
-bool mysqld_show_column_types(THD *thd)
-{
-  List<Item> field_list;
-  Protocol *protocol= thd->protocol;
-  DBUG_ENTER("mysqld_show_column_types");
-
-  field_list.push_back(new Item_empty_string("Type",30));
-  field_list.push_back(new Item_int("Size",(longlong) 1,
-                                    MY_INT64_NUM_DECIMAL_DIGITS));
-  field_list.push_back(new Item_empty_string("Min_Value",20));
-  field_list.push_back(new Item_empty_string("Max_Value",20));
-  field_list.push_back(new Item_return_int("Prec", 4, MYSQL_TYPE_SHORT));
-  field_list.push_back(new Item_return_int("Scale", 4, MYSQL_TYPE_SHORT));
-  field_list.push_back(new Item_empty_string("Nullable",4));
-  field_list.push_back(new Item_empty_string("Auto_Increment",4));
-  field_list.push_back(new Item_empty_string("Unsigned",4));
-  field_list.push_back(new Item_empty_string("Zerofill",4));
-  field_list.push_back(new Item_empty_string("Searchable",4));
-  field_list.push_back(new Item_empty_string("Case_Sensitive",4));
-  field_list.push_back(new Item_empty_string("Default",NAME_CHAR_LEN));
-  field_list.push_back(new Item_empty_string("Comment",NAME_CHAR_LEN));
-
-  if (protocol->send_fields(&field_list,
-                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
-    DBUG_RETURN(TRUE);
-
-  /* TODO: Change the loop to not use 'i' */
-  for (uint i=0; i < sizeof(sys_column_types)/sizeof(sys_column_types[0]); i++)
-  {
-    protocol->prepare_for_resend();
-    protocol->store(sys_column_types[i].type, system_charset_info);
-    protocol->store((ulonglong) sys_column_types[i].size);
-    protocol->store(sys_column_types[i].min_value, system_charset_info);
-    protocol->store(sys_column_types[i].max_value, system_charset_info);
-    protocol->store_short((longlong) sys_column_types[i].precision);
-    protocol->store_short((longlong) sys_column_types[i].scale);
-    protocol->store(sys_column_types[i].nullable, system_charset_info);
-    protocol->store(sys_column_types[i].auto_increment, system_charset_info);
-    protocol->store(sys_column_types[i].unsigned_attr, system_charset_info);
-    protocol->store(sys_column_types[i].zerofill, system_charset_info);
-    protocol->store(sys_column_types[i].searchable, system_charset_info);
-    protocol->store(sys_column_types[i].case_sensitivity, system_charset_info);
-    protocol->store(sys_column_types[i].default_value, system_charset_info);
-    protocol->store(sys_column_types[i].comment, system_charset_info);
-    if (protocol->write())
-      DBUG_RETURN(TRUE);
-  }
-  my_eof(thd);
-  DBUG_RETURN(FALSE);
-}
-
-
 /*
   find_files() - find files in a given directory.
 

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2009-10-21 10:48:22 +0000
+++ b/sql/sql_yacc.yy	2009-10-23 06:20:44 +0000
@@ -10210,11 +10210,6 @@ show_param:
             if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS))
               MYSQL_YYABORT;
           }
-        | COLUMN_SYM TYPES_SYM
-          {
-            LEX *lex=Lex;
-            lex->sql_command= SQLCOM_SHOW_COLUMN_TYPES;
-          }
         | TABLE_SYM TYPES_SYM
           {
             LEX *lex=Lex;


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20091023062044-2uvtaj608wpz4lol.bundle
Thread
bzr commit into mysql-5.5.0-next-mr-bugfixing branch(Sergey.Glukhov:2914) Bug#5299Sergey Glukhov23 Oct