1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Auto-merge from mysql-trunk-merge.

This commit is contained in:
Alexander Nozdrin
2010-07-29 16:32:11 +04:00
68 changed files with 618 additions and 565 deletions

View File

@@ -152,7 +152,7 @@ st_parsing_options::reset()
*/
bool Lex_input_stream::init(THD *thd,
const char* buff,
char* buff,
unsigned int length)
{
DBUG_EXECUTE_IF("bug42064_simulate_oom",
@@ -182,7 +182,7 @@ bool Lex_input_stream::init(THD *thd,
*/
void
Lex_input_stream::reset(const char *buffer, unsigned int length)
Lex_input_stream::reset(char *buffer, unsigned int length)
{
yylineno= 1;
yytoklen= 0;
@@ -1427,11 +1427,10 @@ int lex_one_token(void *arg, void *yythd)
ulong version;
version=strtol(version_str, NULL, 10);
/* Accept 'M' 'm' 'm' 'd' 'd' */
lip->yySkipn(5);
if (version <= MYSQL_VERSION_ID)
{
/* Accept 'M' 'm' 'm' 'd' 'd' */
lip->yySkipn(5);
/* Expand the content of the special comment as real code */
lip->set_echo(TRUE);
state=MY_LEX_START;
@@ -1439,7 +1438,19 @@ int lex_one_token(void *arg, void *yythd)
}
else
{
const char* version_mark= lip->get_ptr() - 1;
DBUG_ASSERT(*version_mark == '!');
/*
Patch and skip the conditional comment to avoid it
being propagated infinitely (eg. to a slave).
*/
char *pcom= lip->yyUnput(' ');
comment_closed= ! consume_comment(lip, 1);
if (! comment_closed)
{
DBUG_ASSERT(pcom == version_mark);
*pcom= '!';
}
/* version allowed to have one level of comment inside. */
}
}