Commit graph

9 commits

Author SHA1 Message Date
Matthias Leich
632cf8ef43 Improve the testcases for Bug 12093 in ps_ddl.test
Details:
- add subtest with drop unrelated view
- rearrange existing tests so that a distinction
  between drop procedure and drop function effects
  is possible
2008-08-13 21:42:21 +02:00
Konstantin Osipov
7b8bfb2a93 A fix for
Bug#12093 "SP not found on second PS execution if another thread 
drops other SP in between" and
Bug#21294 "executing a prepared statement that executes a stored 
function which was recreat"

Stored functions are resolved at prepared statement prepare only.
If someone flushes the stored functions cache between prepare and
execute, execution fails.

The fix is to detect the situation of the cache flush and automatically
reprepare the prepared statement after it.

mysql-test/r/ps_ddl.result:
  Update results (Bug#12093 and Bug#21294, the test cases are already
  in the source tree).
mysql-test/r/ps_ddl1.result:
  Update results (Bug#12093 and Bug#21294, the test cases are already
  in the source tree).
mysql-test/r/sp-error.result:
  Update results (Bug#12093 and Bug#21294, the test cases are already
  in the source tree).
mysql-test/t/ps_ddl.test:
  Modify the test to not expect an error where there is no error
  any more (Bug#12093, Bug#21294).
mysql-test/t/ps_ddl1.test:
  Modify the test to not expect an error where there is no error
  any more (Bug#12093, Bug#21294).
mysql-test/t/sp-error.test:
  Modify the test to not expect an error where there is no error
  any more (Bug#12093, Bug#21294).
sql/sp_cache.cc:
  Implement sp_cache_version() -- returns the current version of 
  a stored routines cache.
sql/sp_cache.h:
  Declare sp_cache_version().
sql/sql_prepare.cc:
  Keep track of stored functions cache version, and invalidate
  the statement if it changed between prepared statement
  prepare and execute (and the statement actually uses stored routines).
2008-07-03 23:41:22 +04:00
unknown
3433706a12 Update test coverage for Bug#27430 "Crash in subquery code when in PS
and table DDL changed after PREPARE" to pass in embedded mode.


mysql-test/r/ps.result:
  Update results (Bug#27430)
mysql-test/r/ps_ddl.result:
  Update results (Bug#27430)
mysql-test/t/ps.test:
  Add a test case for Bug#27430. ps.test is not run in --embedded-server,
  thus it now contains the part of the test for Bug#27430 that
  doesn't work in embedded server.
mysql-test/t/ps_ddl.test:
  Move a part of the test for Bug#27430 that doesn't work
  in embedded server to ps.test, that includes not_embedded.inc.
2008-05-20 22:43:26 +04:00
unknown
0a3d14a395 Add tests + modifications according to review
mysql-test/r/ps_ddl.result:
  Updated results
mysql-test/t/ps_ddl.test:
  - add missing subtests
  - add comments + minor reformatting for better overview on content
mysql-test/r/ps_ddl1.result:
  Expected results
mysql-test/t/ps_ddl1.test:
  Script for tests which do not really fit into ps_ddl
2008-04-18 21:18:53 +02:00
unknown
e119174cfe Minor corrections within the script
mysql-test/r/ps_ddl.result:
  Updated results
mysql-test/t/ps_ddl.test:
  - remove trailing spaces
  - correct wrong written word "echo"
2008-04-17 14:31:43 +02:00
unknown
bd2a732812 WL#4165 "Prepared statements: validation".
Add metadata validation to ~20 more SQL commands. Make sure that
these commands actually work in ps-protocol, since until now they
were enabled, but not carefully tested.
Fixes the ml003 bug found by Matthias during internal testing of the
patch.


mysql-test/r/ps_ddl.result:
  Update test results (WL#4165)
mysql-test/t/ps_ddl.test:
  Cover with tests metadata validation of 26 SQL statements.
sql/mysql_priv.h:
  Fix the name in the comment.
sql/sp_head.cc:
  Changed the way the observer is removed in case of stored procedures
  to support validation prepare stmt from "call p1(<expr>)": whereas
  tables used in the expression must be validated, substatements
  of p1 must not.
  The previous scheme used to silence the observer only in stored
  functions and triggers.
sql/sql_class.cc:
  Now the observer is silenced in sp_head::execute(). Remove it from
  Sub_statement_state.
sql/sql_class.h:
  Now the observer is silenced in sp_head::execute(). Remove it from
  Sub_statement_state.
sql/sql_parse.cc:
  Add CF_REEXECUTION_FRAGILE to 20 more SQLCOMs that need it.
sql/sql_prepare.cc:
  Add metadata validation to ~20 new SQLCOMs that need it.
  Fix memory leaks with expressions used in SHOW DATABASES and CALL
  (and prepared statements).
  We need to fix all expressions at prepare, since if these expressions
  use subqueries, there are one-time transformations of the parse
  tree that must be done at prepare. 
  List of fixed commands includes: SHOW TABLES, SHOW DATABASES,
  SHOW TRIGGERS, SHOW EVENTS, SHOW OPEN TABLES,SHOW KEYS, SHOW FIELDS, 
  SHOW COLLATIONS, SHOW CHARSETS, SHOW VARIABLES, SHOW TATUS, SHOW TABLE
  STATUS, SHOW PROCEDURE STATUS, SHOW FUNCTION STATUS, CALL.
  Add comment to set_parameters().
sql/table.h:
  Update comments.
2008-04-17 01:04:49 +04:00
unknown
d017aceed0 Review and update WL#4165 and WL#4166 test coverage. 2008-04-07 13:35:42 +04:00
unknown
6c97f05f97 test update 2008-02-07 12:00:48 -07:00
unknown
0a578711a2 WL#4165 (Prepared statements: validation)
Adding the tests cases alone for WL#4165, disabled


mysql-test/t/disabled.def:
  WL#4165 (Prepared statements: validation)
mysql-test/r/ps_ddl.result:
  WL#4165 (Prepared statements: validation)
mysql-test/t/ps_ddl.test:
  WL#4165 (Prepared statements: validation)
2007-12-14 17:46:24 -07:00