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
93aadda5
Commit
93aadda5
authored
Oct 08, 2017
by
Vesa Pentti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-13149 -- show function status now works with PAD_CHAR_TO_FULL_LENGTH
parent
c2509a15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
0 deletions
+52
-0
mysql-test/r/show_function_with_pad_char_to_full_length.result
...-test/r/show_function_with_pad_char_to_full_length.result
+24
-0
mysql-test/t/show_function_with_pad_char_to_full_length.test
mysql-test/t/show_function_with_pad_char_to_full_length.test
+23
-0
sql/sql_show.cc
sql/sql_show.cc
+5
-0
No files found.
mysql-test/r/show_function_with_pad_char_to_full_length.result
0 → 100644
View file @
93aadda5
create function f() returns int return 1;
show function status;
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
T f T T T T T T T T T
set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';
show function status;
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
T f T T T T T T T T T
drop function f;
select @@sql_mode;
@@sql_mode
PAD_CHAR_TO_FULL_LENGTH
create function f() returns int return 1;
select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f';
ROUTINE_NAME
f
set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';
select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f';
ROUTINE_NAME
f
drop function f;
select @@sql_mode;
@@sql_mode
PAD_CHAR_TO_FULL_LENGTH
mysql-test/t/show_function_with_pad_char_to_full_length.test
0 → 100644
View file @
93aadda5
#
# Test that show function status succeeds with
# sql_mode = 'PAD_CHAR_TO_FULL_LENGTH (MDEV-13149)
# show function status
create
function
f
()
returns
int
return
1
;
--
replace_column
1
T
3
T
4
T
5
T
6
T
7
T
8
T
9
T
10
T
11
T
show
function
status
;
set
sql_mode
=
'PAD_CHAR_TO_FULL_LENGTH'
;
--
replace_column
1
T
3
T
4
T
5
T
6
T
7
T
8
T
9
T
10
T
11
T
show
function
status
;
drop
function
f
;
select
@@
sql_mode
;
# select ROUTINE_NAME from information_schema.ROUTINES
create
function
f
()
returns
int
return
1
;
select
ROUTINE_NAME
from
information_schema
.
ROUTINES
where
ROUTINE_NAME
=
'f'
;
set
sql_mode
=
'PAD_CHAR_TO_FULL_LENGTH'
;
select
ROUTINE_NAME
from
information_schema
.
ROUTINES
where
ROUTINE_NAME
=
'f'
;
drop
function
f
;
select
@@
sql_mode
;
sql/sql_show.cc
View file @
93aadda5
...
...
@@ -5716,6 +5716,10 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond)
DBUG_RETURN
(
1
);
}
/* Disable padding temporarily so it doesn't break the query */
ulonglong
sql_mode_was
=
thd
->
variables
.
sql_mode
;
thd
->
variables
.
sql_mode
&=
~
MODE_PAD_CHAR_TO_FULL_LENGTH
;
if
(
proc_table
->
file
->
ha_index_init
(
0
,
1
))
{
res
=
1
;
...
...
@@ -5751,6 +5755,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond)
(
void
)
proc_table
->
file
->
ha_index_end
();
close_system_tables
(
thd
,
&
open_tables_state_backup
);
thd
->
variables
.
sql_mode
=
sql_mode_was
;
DBUG_RETURN
(
res
);
}
...
...
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