summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/show_check.result1
-rw-r--r--mysql-test/r/signal_code.result16
-rw-r--r--mysql-test/r/sp-code.result4
-rw-r--r--mysql-test/r/sp.result7
-rw-r--r--mysql-test/t/show_check.test1
-rw-r--r--mysql-test/t/sp.test1
-rw-r--r--sql/mysqld.cc1
-rw-r--r--sql/sp_head.cc1
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_parse.cc4
-rw-r--r--sql/sql_prepare.cc1
-rw-r--r--sql/sql_show.cc88
-rw-r--r--sql/sql_yacc.yy5
13 files changed, 11 insertions, 121 deletions
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 765b7315890..cd59182abd4 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -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;
diff --git a/mysql-test/r/signal_code.result b/mysql-test/r/signal_code.result
index 63db6656636..8cda8877216 100644
--- a/mysql-test/r/signal_code.result
+++ b/mysql-test/r/signal_code.result
@@ -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;
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result
index 39770dc4f2a..949976719ea 100644
--- a/mysql-test/r/sp-code.result
+++ b/mysql-test/r/sp-code.result
@@ -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
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index d8389c78845..fce588f704c 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -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 '',
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 0ce807ae73e..0e4af16dd1f 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -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;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 44c4556340e..168b6020670 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -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';
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a4fb55a60d7..8176f71f726 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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},
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 908f0997be6..7858e567bbc 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -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:
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 02f337d7015..126d11d54df 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -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,
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 7b9e31e84f0..3b67fc79b02 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -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),
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 75a0c538e04..27b67132c9d 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1923,7 +1923,6 @@ static bool check_prepared_statement(Prepared_statement *stmt)
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:
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 61fda3ec184..86926b6e0a5 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -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.
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 66ce6479500..7739c847a22 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -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;