1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge with 5.2

This commit is contained in:
Michael Widenius
2011-03-09 15:47:59 +02:00
1617 changed files with 25609 additions and 41019 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995-2002 MySQL AB
/* Copyright (c) 2002, 2010, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -1696,7 +1696,7 @@ static bool mysql_test_create_view(Prepared_statement *stmt)
if (open_normal_and_derived_tables(thd, tables, 0))
goto err;
lex->view_prepare_mode= 1;
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW;
res= select_like_stmt_test(stmt, 0, 0);
err:
@ -2297,19 +2297,6 @@ end:
}
/** Init PS/SP specific parse tree members. */
static void init_stmt_after_parse(LEX *lex)
{
SELECT_LEX *sl= lex->all_selects_list;
/*
Switch off a temporary flag that prevents evaluation of
subqueries in statement prepare.
*/
for (; sl; sl= sl->next_select_in_list())
sl->uncacheable&= ~UNCACHEABLE_PREPARE;
}
/**
SQLCOM_PREPARE implementation.
@ -3143,6 +3130,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
parser_state.m_lip.stmt_prepare_mode= TRUE;
lex_start(thd);
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_PREPARE;
error= parse_sql(thd, & parser_state, NULL) ||
thd->is_error() ||
@ -3195,7 +3183,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
if (error == 0)
{
setup_set_params();
init_stmt_after_parse(lex);
lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_PREPARE;
state= Query_arena::PREPARED;
flags&= ~ (uint) IS_IN_USE;
/*