Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2624eabc
Commit
2624eabc
authored
Oct 23, 2009
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#5299 Remove SHOW COLUMN TYPES, backport to Betony
parent
950faf20
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
11 additions
and
121 deletions
+11
-121
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+0
-1
mysql-test/r/signal_code.result
mysql-test/r/signal_code.result
+8
-8
mysql-test/r/sp-code.result
mysql-test/r/sp-code.result
+2
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+0
-7
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+0
-1
mysql-test/t/sp.test
mysql-test/t/sp.test
+0
-1
sql/mysqld.cc
sql/mysqld.cc
+0
-1
sql/sp_head.cc
sql/sp_head.cc
+0
-1
sql/sql_lex.h
sql/sql_lex.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+0
-4
sql/sql_prepare.cc
sql/sql_prepare.cc
+0
-1
sql/sql_show.cc
sql/sql_show.cc
+0
-88
sql/sql_yacc.yy
sql/sql_yacc.yy
+0
-5
No files found.
mysql-test/r/show_check.result
View file @
2624eabc
...
...
@@ -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;
...
...
mysql-test/r/signal_code.result
View file @
2624eabc
...
...
@@ -20,16 +20,16 @@ return 0;
end $$
show procedure code signal_proc;
Pos Instruction
0 stmt 13
6
"SIGNAL foo"
1 stmt 13
6
"SIGNAL foo SET MESSAGE_TEXT = "This i..."
2 stmt 13
7
"RESIGNAL foo"
3 stmt 13
7
"RESIGNAL foo SET MESSAGE_TEXT = "This..."
0 stmt 13
5
"SIGNAL foo"
1 stmt 13
5
"SIGNAL foo SET MESSAGE_TEXT = "This i..."
2 stmt 13
6
"RESIGNAL foo"
3 stmt 13
6
"RESIGNAL foo SET MESSAGE_TEXT = "This..."
drop procedure signal_proc;
show function code signal_func;
Pos Instruction
0 stmt 13
6
"SIGNAL foo"
1 stmt 13
6
"SIGNAL foo SET MESSAGE_TEXT = "This i..."
2 stmt 13
7
"RESIGNAL foo"
3 stmt 13
7
"RESIGNAL foo SET MESSAGE_TEXT = "This..."
0 stmt 13
5
"SIGNAL foo"
1 stmt 13
5
"SIGNAL foo SET MESSAGE_TEXT = "This i..."
2 stmt 13
6
"RESIGNAL foo"
3 stmt 13
6
"RESIGNAL foo SET MESSAGE_TEXT = "This..."
4 freturn 3 0
drop function signal_func;
mysql-test/r/sp-code.result
View file @
2624eabc
...
...
@@ -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 9
4
"call sudoku_init()"
3 stmt 9
3
"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 9
4
"call sudoku_count()"
7 stmt 9
3
"call sudoku_count()"
8 stmt 6 "insert into sudoku_schedule (row,col)..."
9 set v_scounter@2 0
10 set v_i@3 1
...
...
mysql-test/r/sp.result
View file @
2624eabc
...
...
@@ -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 '',
...
...
mysql-test/t/show_check.test
View file @
2624eabc
...
...
@@ -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
;
...
...
mysql-test/t/sp.test
View file @
2624eabc
...
...
@@ -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';
...
...
sql/mysqld.cc
View file @
2624eabc
...
...
@@ -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
},
...
...
sql/sp_head.cc
View file @
2624eabc
...
...
@@ -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
:
...
...
sql/sql_lex.h
View file @
2624eabc
...
...
@@ -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
,
...
...
sql/sql_parse.cc
View file @
2624eabc
...
...
@@ -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 @@ mysql_execute_command(THD *thd)
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
),
...
...
sql/sql_prepare.cc
View file @
2624eabc
...
...
@@ -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
:
...
...
sql/sql_show.cc
View file @
2624eabc
...
...
@@ -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.
...
...
sql/sql_yacc.yy
View file @
2624eabc
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment