1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-25501 routine_definition in information_schema.routines loses tablename if it starts with an _ and is not backticked

remove code duplication in Lex_input_stream::scan_ident_middle(),
make sure identifiers are always use the same code path whether
they start form an underscore or not.
This commit is contained in:
Sergei Golubchik
2021-04-28 21:27:04 +02:00
parent 64b7433709
commit 8f9a72a150
3 changed files with 54 additions and 14 deletions

View File

@ -130,7 +130,9 @@ Warnings:
Note 1050 Table 't2' already exists
DROP DATABASE testdb;
USE test;
End of 5.1 tests
#
# End of 5.1 tests
#
#
# BUG#13489996 valgrind:conditional jump or move depends on
# uninitialised values-field_blob
@ -342,3 +344,26 @@ FOR i IN 1..10 DO
RETURN 1;
END FOR
DROP FUNCTION f1;
#
# End of 10.2 tests
#
#
# MDEV-25501 routine_definition in information_schema.routines loses tablename if it starts with an _ and is not backticked
#
create table _t1 (a int);
create procedure p1() select * from _t1;
show create procedure p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
select * from _t1 latin1 latin1_swedish_ci latin1_swedish_ci
select routine_definition from information_schema.routines where routine_schema=database() and specific_name='p1';
routine_definition
select * from _t1
select body, body_utf8 from mysql.proc where name='p1';
body body_utf8
select * from _t1 select * from _t1
drop procedure p1;
drop table _t1;
#
# End of 10.3 tests
#