1
0
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:
acurtis@pcgem.rdg.cyberkinetica.com
2004-08-30 22:08:51 +01:00
parent 072d4e0c18
commit 203debc666
3 changed files with 17 additions and 2 deletions

View File

@@ -1649,3 +1649,8 @@ call p1();
1 1
drop procedure p1; drop procedure p1;
drop table t1; drop table t1;
create function `foo` () returns int return 5;
select `foo` ();
`foo` ()
5
drop function `foo`;

View File

@@ -1853,3 +1853,9 @@ call p1();
drop procedure p1; drop procedure p1;
drop table t1; drop table t1;
#
# backticks
#
create function `foo` () returns int return 5;
select `foo` ();
drop function `foo`;

View File

@@ -3609,8 +3609,12 @@ select_item:
YYABORT; YYABORT;
if ($4.str) if ($4.str)
$2->set_name($4.str,$4.length,system_charset_info); $2->set_name($4.str,$4.length,system_charset_info);
else if (!$2->name) else if (!$2->name) {
$2->set_name($1,(uint) ($3 - $1), YYTHD->charset()); char *str = $1;
if (str[-1] == '`')
str--;
$2->set_name(str,(uint) ($3 - str), YYTHD->charset());
}
}; };
remember_name: remember_name: