mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fix column name where it starts with a backtick
This commit is contained in:
@@ -1649,3 +1649,8 @@ call p1();
|
||||
1
|
||||
drop procedure p1;
|
||||
drop table t1;
|
||||
create function `foo` () returns int return 5;
|
||||
select `foo` ();
|
||||
`foo` ()
|
||||
5
|
||||
drop function `foo`;
|
||||
|
@@ -1853,3 +1853,9 @@ call p1();
|
||||
drop procedure p1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# backticks
|
||||
#
|
||||
create function `foo` () returns int return 5;
|
||||
select `foo` ();
|
||||
drop function `foo`;
|
||||
|
@@ -3609,8 +3609,12 @@ select_item:
|
||||
YYABORT;
|
||||
if ($4.str)
|
||||
$2->set_name($4.str,$4.length,system_charset_info);
|
||||
else if (!$2->name)
|
||||
$2->set_name($1,(uint) ($3 - $1), YYTHD->charset());
|
||||
else if (!$2->name) {
|
||||
char *str = $1;
|
||||
if (str[-1] == '`')
|
||||
str--;
|
||||
$2->set_name(str,(uint) ($3 - str), YYTHD->charset());
|
||||
}
|
||||
};
|
||||
|
||||
remember_name:
|
||||
|
Reference in New Issue
Block a user