Skip to content

Commit 0d3adeb

Browse files
author
Samar Pratap Singh
committed
Bug#37003502 inconsistency in whether SHOW GRANTS quotes Function or
Stored Procedure's name [post-push fix] Tests fails due to assert(thd). Change-Id: I2e20dfe3390fdccc1e1e3c8d359ca27c6746ca8e
1 parent 0d21a40 commit 0d3adeb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/sql_show.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,8 @@ void append_identifier_with_backtick(String *packet, const char *name,
15121512
void append_identifier(const THD *thd, String *packet, const char *name,
15131513
size_t length, const CHARSET_INFO *from_cs,
15141514
const CHARSET_INFO *to_cs) {
1515-
assert(thd);
1515+
if (thd == nullptr)
1516+
return append_identifier_with_backtick(packet, name, length);
15161517
const char *name_end;
15171518
char quote_char;
15181519
int q;
@@ -1536,8 +1537,7 @@ void append_identifier(const THD *thd, String *packet, const char *name,
15361537
cs_info = to_cs;
15371538
}
15381539

1539-
q = thd != nullptr ? get_quote_char_for_identifier(thd, to_name, to_length)
1540-
: '`';
1540+
q = get_quote_char_for_identifier(thd, to_name, to_length);
15411541

15421542
if (q == EOF) {
15431543
packet->append(to_name, to_length, packet->charset());

0 commit comments

Comments
 (0)