summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-destruct.test
Commit message (Collapse)AuthorAgeFilesLines
* Cherry-picking patch for Bug#56137 from mysql-5.5-runtime.Alexander Nozdrin2010-08-311-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------ revno: 3124 revision-id: dlenev@mysql.com-20100831090419-rzr5ktekby2gspm1 parent: alik@sun.com-20100827083901-x4wvtc10u9p7gcs9 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-5.5-rt-56137 timestamp: Tue 2010-08-31 13:04:19 +0400 message: Bug #56137 "Assertion `thd->lock == 0' failed on upgrading from 5.1.50 to 5.5.6". Debug builds of the server aborted due to an assertion failure when DROP DATABASE statement was run on an installation which had outdated or corrupt mysql.proc table. Particularly this affected the mysql_upgrade tool which is run as part of 5.1 to 5.5 upgrade. The problem was that sp_drop_db_routines(), which was invoked during dropping of the database, could have returned without closing and unlocking mysql.proc table in cases when this table was not up-to-date with the current server. As a result further attempt to open and lock the mysql.event table, which was necessary to complete dropping of the database, ended up with an assert. This patch solves this problem by ensuring that sp_drop_db_routines() always closes mysql.proc table and releases metadata locks on it. This is achieved by changing open_proc_table_for_update() function to close tables and release metadata locks acquired by it in case of failure. This step also makes behavior of the latter function consistent with behavior of open_proc_table_for_read()/ open_and_lock_tables(). Test case for this bug was added to sp-destruct.test. ------------------------------------------------------------
* Bug #51376 Assert `! is_set()' failed in Jon Olav Hauglid2010-03-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diagnostics_area::set_ok_status on DROP FUNCTION This assert tests that the server is not trying to send "ok" to the client if an error has occured during statement processing. In this case, the assert was triggered by lock timeout errors when accessing system tables to do an implicit REVOKE after executing DROP FUNCTION/PROCEDURE. In practice, this was only likely to happen with very low values for "lock_wait_timeout" (in the bug report 1 second was used). These errors were ignored and the server tried to send "ok" to the client, triggering the assert. The patch for Bug#45225 introduced lock timeouts for metadata locks. This made it possible to get timeouts when accessing system tables. Note that a followup patch for Bug#45225 pushed after this bug was reported, changed accessing of system tables such that the user-supplied timeout value is ignored and the maximum timeout value is used instead. This exact bug was therefore only noticeable in the period between the initial Bug#45225 patch and the followup patch. However, the same problem could occur for any errors during revoking of privileges - not just timeouts. This patch fixes the problem by making sure that any errors during revoking of privileges are reported to the client. Test case added to sp-destruct.test. Since the original bug is not reproducable now that system tables are accessed using a a long timeout value, this test instead calls DROP FUNCTION with a grant system table missing.
* Bug#41726: upgrade from 5.0 to 5.1.30 crashes if you didn't run mysql_upgradeDavi Arnaut2009-11-211-6/+48
| | | | | | | | | | | | The problem is that the server could crash when attempting to access a non-conformant proc system table. One such case was a crash when invoking stored procedure related statements on a 5.1 server with a proc system table in the 5.0 format. The solution is to validate the proc system table format before attempts to access it are made. If the table is not in the format that the server expects, a message is written to the error log and the statement that caused the table to be accessed fails.
* Check warnings in servers error log as part of test casemsvensson@pilot.mysql.com2008-04-081-2/+2
|
* WL#4189msvensson@pilot.mysql.com2007-12-121-11/+12
| | | | | | | - dynamic configuration support - safe process - cleanups - create new suite for fedarated
* Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maintmsvensson@pilot.(none)2007-08-071-0/+1
|\ | | | | | | into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
| * Bug#20037 mysqltest requires cygwin on windows(part 1, new mysqltest commands)msvensson@pilot.(none)2007-08-071-0/+1
| | | | | | | | | | | | - Update comments - Make "write_file" fail if file already exist - Remove temporary files created by test cases
* | Patch for the following bugs:anozdrin/alik@ibm.2007-06-281-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - BUG#11986: Stored routines and triggers can fail if the code has a non-ascii symbol - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars - BUG#19443: INFORMATION_SCHEMA does not support charsets properly - BUG#21249: Character set of SP-var can be ignored - BUG#25212: Character set of string constant is ignored (stored routines) - BUG#25221: Character set of string constant is ignored (triggers) There were a few general problems that caused these bugs: 1. Character set information of the original (definition) query for views, triggers, stored routines and events was lost. 2. mysqldump output query in client character set, which can be inappropriate to encode definition-query. 3. INFORMATION_SCHEMA used strings with mixed encodings to display object definition; 1. No query-definition-character set. In order to compile query into execution code, some extra data (such as environment variables or the database character set) is used. The problem here was that this context was not preserved. So, on the next load it can differ from the original one, thus the result will be different. The context contains the following data: - client character set; - connection collation (character set and collation); - collation of the owner database; The fix is to store this context and use it each time we parse (compile) and execute the object (stored routine, trigger, ...). 2. Wrong mysqldump-output. The original query can contain several encodings (by means of character set introducers). The problem here was that we tried to convert original query to the mysqldump-client character set. Moreover, we stored queries in different character sets for different objects (views, for one, used UTF8, triggers used original character set). The solution is - to store definition queries in the original character set; - to change SHOW CREATE statement to output definition query in the binary character set (i.e. without any conversion); - introduce SHOW CREATE TRIGGER statement; - to dump special statements to switch the context to the original one before dumping and restore it afterwards. Note, in order to preserve the database collation at the creation time, additional ALTER DATABASE might be used (to temporary switch the database collation back to the original value). In this case, ALTER DATABASE privilege will be required. This is a backward-incompatible change. 3. INFORMATION_SCHEMA showed non-UTF8 strings The fix is to generate UTF8-query during the parsing, store it in the object and show it in the INFORMATION_SCHEMA. Basically, the idea is to create a copy of the original query convert it to UTF8. Character set introducers are removed and all text literals are converted to UTF8. This UTF8 query is intended to provide user-readable output. It must not be used to recreate the object. Specialized SHOW CREATE statements should be used for this. The reason for this limitation is the following: the original query can contain symbols from several character sets (by means of character set introducers). Example: - original query: CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1; - UTF8 query (for INFORMATION_SCHEMA): CREATE VIEW v1 AS SELECT 'Hello' AS c1;
* | Merge recycle.(none):/src/bug27144/my50-bug27144iggy@recycle.(none)2007-03-211-14/+18
|\ \ | |/ | | | | into recycle.(none):/src/bug27144/my51-bug27144
| * Bug#27144 sp-destruct.test is disabled on Windowsiggy@recycle.(none)2007-03-211-14/+18
| | | | | | | | - Update test to run properly on Windows.
* | Merge mysql.com:/home/my/mysql-5.0monty@mysql.com2006-02-251-0/+3
|\ \ | |/ | | | | into mysql.com:/home/my/mysql-5.1
| * Fixes to embedded server to be able to run tests with itmonty@mysql.com2006-02-241-0/+3
| | | | | | | | (Needed for "list of pushes" web page and autopush)
* | Merge mysql.com:/home/kostja/mysql/mysql-5.0-rootkonstantin@mysql.com2006-02-091-1/+10
|\ \ | |/ | | | | into mysql.com:/home/kostja/mysql/mysql-5.1-merge
| * Merge mysql.com:/extern/mysql/bk/mysql-5.0pem@mysql.com2006-02-061-1/+10
| |\ | | | | | | | | | into mysql.com:/extern/mysql/work/bug16303/mysql-5.0
| | * Fixed BUG#16303: erroneus stored procedures and functions should be droppablepem@mysql.com2006-01-261-1/+10
| | | | | | | | | | | | | | | Use a special lookup function for DROP, which doesn't attempt to parse the definition.
* | | Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_varmsvensson@neptunus.(none)2006-01-241-7/+7
|\ \ \ | |/ / | | | | | | into neptunus.(none):/home/msvensson/mysql/mysqltest_var/my51-mysqltest_var
| * | Make it possible to run mysql-test-run.pl with default test suite in ↵msvensson@neptunus.(none)2006-01-241-7/+7
| |/ | | | | | | different vardir.
* | Embedded-server related tests fixesholyfoot@deer.(none)2006-01-191-0/+5
| |
* | Big patch to make embedded-server working in 5.xholyfoot@deer.(none)2006-01-041-0/+3
|/ | | | | Now it supports queries returning several results (particularly important with the SP)
* Fixed BUG#14233: Crash after tampering with the mysql.proc tablepem@mysql.com2005-11-251-8/+6
| | | | | | Post-review version. Some minor review fixes, but also changed the way some errors are handled: Don't return specific parse errors; instead always use the more general "table corrupt" error (amended accordingly).
* Follow-up for BUG#14233 fix. Changed backup method for the mysql.proc tablepem@mysql.com2005-10-261-10/+6
| | | | | in sp-destruct.test since using "create ... as ..." didn't preserve everything, which made the system_mysql_db test fail.
* Fixed BUG#14233: Crash after tampering with the mysql.proc tablepem@mysql.com2005-10-261-0/+130
Added error checking for errors when attempting to use stored procedures after the mysql.proc table has been dropped, corrupted, or tampered with. Test cases were put in a separate file (sp-destruct.test).