mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-33281 Implement optimizer hints
Implementing a recursive descent parser for optimizer hints.
This commit is contained in:
committed by
Oleg Smirnov
parent
495d96709f
commit
6340c23933
@@ -2730,8 +2730,10 @@ static bool add_line(String &buffer, char *line, size_t line_length,
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!*in_string && inchar == '/' && *(pos+1) == '*' &&
|
||||
!(*(pos+2) == '!' || (*(pos+2) == 'M' && *(pos+3) == '!')))
|
||||
else if (!*in_string && inchar == '/' && pos[1] == '*' &&
|
||||
!(pos[2] == '!' ||
|
||||
(pos[2] == 'M' && pos[3] == '!') ||
|
||||
pos[2] == '+'))
|
||||
{
|
||||
if (preserve_comments)
|
||||
{
|
||||
@@ -2768,8 +2770,8 @@ static bool add_line(String &buffer, char *line, size_t line_length,
|
||||
}
|
||||
else
|
||||
{ // Add found char to buffer
|
||||
if (!*in_string && inchar == '/' && *(pos + 1) == '*' &&
|
||||
*(pos + 2) == '!')
|
||||
if (!*in_string && inchar == '/' && pos[1] == '*' &&
|
||||
(pos[2] == '!' || pos[2] == '+'))
|
||||
ss_comment= 1;
|
||||
else if (!*in_string && ss_comment && inchar == '*' && *(pos + 1) == '/')
|
||||
ss_comment= 0;
|
||||
|
Reference in New Issue
Block a user