mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixes after manual merge
This commit is contained in:
@ -141,23 +141,6 @@ SUM(a)
|
|||||||
6
|
6
|
||||||
4
|
4
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE t1 (a int);
|
CREATE TABLE t1 (a int);
|
||||||
INSERT INTO t1 VALUES (1), (2), (1), (3), (2), (1);
|
INSERT INTO t1 VALUES (1), (2), (1), (3), (2), (1);
|
||||||
SELECT a FROM t1 GROUP BY a HAVING a > 1;
|
SELECT a FROM t1 GROUP BY a HAVING a > 1;
|
||||||
|
@ -1862,96 +1862,6 @@ void mysql_stmt_prepare(THD *thd, const char *packet, uint packet_length)
|
|||||||
{
|
{
|
||||||
/* Statement map deletes statement on erase */
|
/* Statement map deletes statement on erase */
|
||||||
thd->stmt_map.erase(stmt);
|
thd->stmt_map.erase(stmt);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mysql_log.write(thd, COM_STMT_PREPARE, "[%lu] %s", stmt->id, packet);
|
mysql_log.write(thd, COM_STMT_PREPARE, "[%lu] %s", stmt->id, packet);
|
||||||
@ -2045,14 +1955,11 @@ static const char *get_dynamic_sql_string(LEX *lex, uint *query_len)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stmt->setup_set_params();
|
query_str= lex->prepared_stmt_code.str;
|
||||||
SELECT_LEX *sl= stmt->lex->all_selects_list;
|
*query_len= lex->prepared_stmt_code.length;
|
||||||
for (; sl; sl= sl->next_select_in_list())
|
}
|
||||||
{
|
end:
|
||||||
/*
|
return query_str;
|
||||||
during query optimisation.
|
|
||||||
*/
|
|
||||||
sl->prep_where= sl->where;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -628,7 +628,7 @@ JOIN::optimize()
|
|||||||
|
|
||||||
{
|
{
|
||||||
Item::cond_result having_value;
|
Item::cond_result having_value;
|
||||||
having= optimize_cond(thd, having, &having_value);
|
having= optimize_cond(this, having, join_list, &having_value);
|
||||||
if (thd->net.report_error)
|
if (thd->net.report_error)
|
||||||
{
|
{
|
||||||
error= 1;
|
error= 1;
|
||||||
@ -641,7 +641,7 @@ JOIN::optimize()
|
|||||||
{ /* Impossible cond */
|
{ /* Impossible cond */
|
||||||
DBUG_PRINT("info", (having_value == Item::COND_FALSE ?
|
DBUG_PRINT("info", (having_value == Item::COND_FALSE ?
|
||||||
"Impossible HAVING" : "Impossible WHERE"));
|
"Impossible HAVING" : "Impossible WHERE"));
|
||||||
zero_result_cause= ?
|
zero_result_cause= having_value == Item::COND_FALSE ?
|
||||||
"Impossible HAVING" : "Impossible WHERE";
|
"Impossible HAVING" : "Impossible WHERE";
|
||||||
error= 0;
|
error= 0;
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
Reference in New Issue
Block a user