mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0-bug25897
into moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1
This commit is contained in:
@@ -3025,6 +3025,16 @@ SHOW CREATE VIEW v1;
|
|||||||
View Create View
|
View Create View
|
||||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _latin1'The\ZEnd' AS `TheEnd`
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _latin1'The\ZEnd' AS `TheEnd`
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
|
DROP VIEW IF EXISTS v1;
|
||||||
|
SELECT * FROM (SELECT 1) AS t;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
CREATE VIEW v1 AS SELECT * FROM (SELECT 1) AS t;
|
||||||
|
ERROR HY000: View's SELECT contains a subquery in the FROM clause
|
||||||
|
# Previously the following would fail.
|
||||||
|
SELECT * FROM (SELECT 1) AS t;
|
||||||
|
1
|
||||||
|
1
|
||||||
End of 5.0 tests.
|
End of 5.0 tests.
|
||||||
DROP DATABASE IF EXISTS `d-1`;
|
DROP DATABASE IF EXISTS `d-1`;
|
||||||
CREATE DATABASE `d-1`;
|
CREATE DATABASE `d-1`;
|
||||||
|
@@ -2908,6 +2908,7 @@ DROP FUNCTION f1;
|
|||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #16813 (WITH CHECK OPTION doesn't work with UPDATE)
|
# Bug #16813 (WITH CHECK OPTION doesn't work with UPDATE)
|
||||||
#
|
#
|
||||||
@@ -2974,8 +2975,27 @@ SHOW CREATE VIEW v1;
|
|||||||
|
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#25897: Some queries are no longer possible after a CREATE VIEW
|
||||||
|
# fails
|
||||||
|
#
|
||||||
|
--disable_warnings
|
||||||
|
DROP VIEW IF EXISTS v1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
let $query = SELECT * FROM (SELECT 1) AS t;
|
||||||
|
|
||||||
|
eval $query;
|
||||||
|
--error ER_VIEW_SELECT_DERIVED
|
||||||
|
eval CREATE VIEW v1 AS $query;
|
||||||
|
--echo # Previously the following would fail.
|
||||||
|
eval $query;
|
||||||
|
|
||||||
|
|
||||||
--echo End of 5.0 tests.
|
--echo End of 5.0 tests.
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#21370 View renaming lacks tablename_to_filename encoding
|
# Bug#21370 View renaming lacks tablename_to_filename encoding
|
||||||
#
|
#
|
||||||
|
@@ -100,6 +100,16 @@ void lex_free(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
st_parsing_options::reset()
|
||||||
|
{
|
||||||
|
allows_variable= TRUE;
|
||||||
|
allows_select_into= TRUE;
|
||||||
|
allows_select_procedure= TRUE;
|
||||||
|
allows_derived= TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is called before every query that is to be parsed.
|
This is called before every query that is to be parsed.
|
||||||
Because of this, it's critical to not do too much things here.
|
Because of this, it's critical to not do too much things here.
|
||||||
@@ -150,6 +160,7 @@ void lex_start(THD *thd, const uchar *buf, uint length)
|
|||||||
lex->safe_to_cache_query= 1;
|
lex->safe_to_cache_query= 1;
|
||||||
lex->time_zone_tables_used= 0;
|
lex->time_zone_tables_used= 0;
|
||||||
lex->leaf_tables_insert= 0;
|
lex->leaf_tables_insert= 0;
|
||||||
|
lex->parsing_options.reset();
|
||||||
lex->empty_field_list_on_rset= 0;
|
lex->empty_field_list_on_rset= 0;
|
||||||
lex->select_lex.select_number= 1;
|
lex->select_lex.select_number= 1;
|
||||||
lex->next_state=MY_LEX_START;
|
lex->next_state=MY_LEX_START;
|
||||||
|
@@ -890,10 +890,8 @@ struct st_parsing_options
|
|||||||
bool allows_select_procedure;
|
bool allows_select_procedure;
|
||||||
bool allows_derived;
|
bool allows_derived;
|
||||||
|
|
||||||
st_parsing_options()
|
st_parsing_options() { reset(); }
|
||||||
: allows_variable(TRUE), allows_select_into(TRUE),
|
void reset();
|
||||||
allows_select_procedure(TRUE), allows_derived(TRUE)
|
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user