Commit graph

17633 commits

Author SHA1 Message Date
Sergey Petrunia
cd4f6cc17b BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
whether subquery produced any records, this was a documented limitation.

The limitation has been removed (see bugs 8804, 24085, 24127) now
Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
Item_in_optimizer::is_null() invoke val_int() to return correct values for
"NULL IN (SELECT ...)".
2009-01-28 22:18:27 +03:00
Horst Hunger
cf1c870510 due to merge 2009-01-23 19:26:59 +01:00
Horst Hunger
6fd71bf43c due to merge. 2009-01-23 19:21:08 +01:00
Gleb Shchepa
33a09cdcc8 Bug#42188: crash and/or memory corruption with user variables
in trigger

Interchangeable calls to the mysql_change_user client function
and invocations of a trigger changing some user variable caused
a memory corruption and a crash.

The mysql_change_user API call forces TDH::cleanup() on a server
that frees user variable entries.
However it didn't reset Item_func_set_user_var::entry to NULL
because Item_func_set_user_var::cleanup() was not overloaded.
So, Item_func_set_user_var::entry held a pointer to freed memory,
that caused a crash.

The Item_func_set_user_var::cleanup method has been overloaded
to cleanup the Item_func_set_user_var::entry field.
2009-01-23 22:18:02 +04:00
Horst Hunger
f37e50a636 Fix for bug#39108: Set global wait timeout within the test, not more via opt file.
Deleted the opt file. Replaced the sleeps by wait condition. Made some beautyfications.
Inserted review results.
2009-01-23 18:19:09 +01:00
Satya B
4942975116 updating to the latest bugteam-5.1 branch 2009-01-22 18:29:13 +05:30
Davi Arnaut
b88ec2f1a2 Merge test case of Bug#40264 to mysql-5.1-bugteam 2009-01-22 09:22:26 -02:00
Davi Arnaut
6a834d1f4f Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
The problem is that the query cache was storing partial results
if the statement failed when sending the results to the client.
This could cause clients to hang when trying to read the results
from the cache as they would, for example, wait indefinitely for
a eof packet that wasn't saved.

The solution is to always discard the caching of a query that
failed to send its results to the associated client.
2009-01-22 08:28:01 -02:00
Satya B
c82ba71fb0 TestCase for BUG#41574 - REPAIR TABLE: crashes for compressed tables
Extending the existing testcase written for BUG#40949 to verify
repair table operation for compressed tables
2009-01-22 11:25:26 +05:30
Staale Smedseng
e456ef4b8d Adding a test to verify that Bug#27208 "If no current database,
character_set_database !=character_set_server" is fixed.
2009-01-20 16:59:20 +01:00
Timothy Smith
6770a687db Auto-merge from upstream 5.1-bugteam 2009-01-16 17:33:24 +01:00
Georgi Kodinov
c34491360f merged 5.0-bugteam -> 5.1-bugteam 2009-01-16 17:38:38 +02:00
Georgi Kodinov
7fc8286257 auto merge 2009-01-16 16:48:41 +02:00
Georgi Kodinov
e5dd9c5a1d merged 5.0-bugteam -> 5.1-bugtteam 2009-01-16 12:45:17 +02:00
Georgi Kodinov
7a6dda5077 merged Bug 38795 to 5.0-bugteam 2009-01-15 16:15:38 +02:00
Davi Arnaut
cc95555fbc Post-merge fix for Bug#36326 2009-01-15 11:38:49 -02:00
Davi Arnaut
cf5dd72ee0 Merge from 5.0-bugteam 2009-01-15 08:28:10 -02:00
Alexander Nozdrin
50a8cdc6c8 Pull from 5.0-bugteam 2009-01-15 13:10:20 +03:00
Alexander Nozdrin
6dd7ac74dd Merge backport of patch for Bug#31222 from 5.0 to 5.1 2009-01-15 12:56:05 +03:00
Alexander Nozdrin
333aa975ec Backport patch for Bug#31222 (com_% global status counters behave randomly
with mysql_change_user) to 5.0.
2009-01-15 12:36:34 +03:00
Ramil Kalimullin
2dba01b2fa bug#33094: Error in upgrading from 5.0 to 5.1 when table contains triggers
Post-fix test failure: fixed mysqlcheck.test on Windows platforms.
2009-01-15 00:54:25 +04:00
Timothy Smith
1582642f69 Auto-merge from upstream 5.1-bugteam 2009-01-14 16:50:51 +01:00
Ramil Kalimullin
347762946e Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.

Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.

Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.

Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.
2009-01-14 18:50:51 +04:00
Timothy Smith
6efd026f14 Fix Bug #35261: date_format test fails if new variables LIKE '%e_format' are added
Use SELECT FROM INFORMATION_SCHEMA instead of SHOW VARIABLES LIKE to restrict
values correctly.
2009-01-13 23:29:11 +01:00
Timothy Smith
e5cdef739a Apply test case changes for Bug #41671 (innodb-semi-consistent.test) also to
partition_innodb_semi_consistent.test, which was overlooked in the
innodb-5.1-ss3603 snapshot.
2009-01-13 23:12:16 +01:00
Davi Arnaut
918a038165 Bug#36326: nested transaction and select
The problem is that the query cache stores packets containing
the server status of the time when the cached statement was run.
This might lead to a wrong transaction status in the client side
if a statement is cached during a transaction and is later served
outside a transaction context (and vice-versa).

The solution is to take into account the transaction status when
storing in and serving from the query cache.
2009-01-13 20:07:06 -02:00
Matthias Leich
33d2ae1512 Merge into actual tree 2009-01-13 16:42:37 +01:00
Timothy Smith
5d8c3529ec Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes:
r3601 | marko | 2008-12-22 16:05:19 +0200 (Mon, 22 Dec 2008) | 9 lines
branches/5.1: Make
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1.
This fixes an error that was introduced in r370, causing
semi-consistent read not to not unlock rows in READ UNCOMMITTED mode.
(Bug #41671, Issue #146)

rb://67 approved by Heikki Tuuri
2009-01-13 15:14:11 +01:00
Matthias Leich
50ad9d1fca Merge of fix for bug
41776 type_date.test may fail if run around midnight.
into GCA tree.
2009-01-13 15:04:28 +01:00
Matthias Leich
f557d37762 Merge of fix for bug
41111 events_bugs fails sporadically on pushbuild
into GCA tree
2009-01-13 14:39:04 +01:00
Matthias Leich
d657438ea0 Fix for Bug#40377 sporadic pushbuild failure in log_state: result mismatch
+ add workaround for bug 38124
+ messages into the protocol when sessions are switched
+ replace error numbers by error names
+ reset of system variables to initial values per subtest
+ remove a file created by this test
+ minor improvements in structure and formatting
2009-01-13 14:09:24 +01:00
Georgi Kodinov
83823a1477 Bug #38795: Automatic search depth and nested join's results in server crash
The greedy optimizer tracks the current level of nested joins and the position
inside these by setting and maintaining a state that's global for the whole FROM
clause.
This state was correctly maintained inside the selection of the next partial plan
table (in best_extension_by_limited_search()). 
greedy_search() also moves the current position by adding the last partial match 
table when there's not enough tables in the partial plan found by 
best_extension_by_limited_search().
This may require update of the global state variables that describe the current
position in the plan if the last table placed by greedy_search is not a top-level 
join table.
Fixed by updating the state after placing the partial plan table in greedy_search()
in the same way this is done on entering the best_extension_by_limited_search().
Fixed the signature of the function called to update the state : 
check_interleaving_with_nj
2009-01-13 13:09:12 +02:00
Georgi Kodinov
ba506ca6b7 merged 41453 to 5.1-bugteam 2009-01-12 17:52:46 +02:00
Davi Arnaut
a13eda38ae Post-merge fix for bug 37016: Update test case for row-based logging. 2009-01-12 10:48:33 -02:00
Tatiana A. Nurnberg
a7d03bf4ed Bug#31177: Server variables can't be set to their current values
Bounds-checks and blocksize corrections were applied to user-input,
but constants in the server were trusted implicitly. If these values
did not actually meet the requirements, the user could not set change
a variable, then set it back to the (wonky) factory default or maximum
by explicitly specifying it (SET <var>=<value> vs SET <var>=DEFAULT).

Now checks also apply to the server's presets. Wonky values and maxima
get corrected at startup. Consequently all non-offsetted values the user
sees are valid, and users can set the variable to that exact value if
they so desire.
2009-01-12 06:32:49 +01:00
Tatiana A. Nurnberg
2048bd7117 auto-merge 2009-01-09 23:06:07 +01:00
Tatiana A. Nurnberg
d58db1c2b0 auto-merge 2009-01-09 22:26:51 +01:00
Georgi Kodinov
18526afc07 merged 41437 to 5.1-bugteam 2009-01-09 19:51:52 +02:00
Tatiana A. Nurnberg
108f8d75a1 auto-merge 2009-01-09 16:48:02 +01:00
Matthias Leich
c6d81f8467 1. Fix for Bug#41111 events_bugs fails sporadically on pushbuild
2. Avoid bad effects of bug 41925 Warning 1366 Incorrect string value:
                                  ...  for column processlist.info
3. Add poll routines which ensure that subtests meet stable scenarios.
   This does not change the sense of the subtests.
2009-01-09 15:10:03 +01:00
Tatiana A. Nurnberg
1d15df432e auto-merge 2009-01-09 14:22:15 +01:00
Georgi Kodinov
53ba196e11 Bug #41543: Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno
No need to mask the error code returned by getting the next row to end of file when
doing filesort.
2009-01-09 14:04:47 +02:00
Georgi Kodinov
7c3ae51647 Bug #41437: Value stored in 'case' lacks charset, causes segfault
When substituting system constant functions with a constant result
the server was not expecting that the function may return NULL.
Fixed by checking for NULL and returning Item_null (in the relevant
collation) if the result of the system constant function was NULL.
2009-01-09 13:50:18 +02:00
Davi Arnaut
577e390ece Bug#37016: TRUNCATE TABLE removes some rows but not all
The special TRUNCATE TABLE (DDL) transaction wasn't being properly
rolled back if a error occurred during row by row deletion. The
error can be caused by a foreign key restriction imposed by InnoDB
SE and would cause the server to erroneously issue a implicit
commit.

The solution is to rollback the transaction if a truncation via row
by row deletion fails, otherwise commit. All effects of a TRUNCATE 
ABLE operation are rolled back if a row by row deletion fails.
2009-01-09 08:20:32 -02:00
Davi Arnaut
8ce156a66f Auto-merge from upstream 5.1-bugteam 2009-01-08 16:28:30 -02:00
Tatiana A. Nurnberg
17bbe30cb0 Bug#41470: DATE_FORMAT() crashes the complete server with a valid date
Passing dubious "year zero" in non-zero date (not "0000-00-00") could
lead to negative value for year internally, while variable was unsigned.
This led to Really Bad Things further down the line.

Now doing calculations with signed type for year internally.
2009-01-08 10:25:31 +01:00
Mattias Jonsson
f1ab632391 merge 2009-01-07 23:28:49 +01:00
Davi Arnaut
dc5a0f4481 Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites
locking type of temp table

The problem is that INSERT INTO .. SELECT FROM .. and CREATE
TABLE .. SELECT FROM a temporary table could inadvertently
overwrite the locking type of the temporary table. The lock
type of temporary tables should be a write lock by default.

The solution is to reset the lock type of temporary tables
back to its default value after they are used in a statement.
2009-01-07 10:11:37 -02:00
Georgi Kodinov
645b4862c9 merged 5.0-bugteam -> 5.1-bugteam 2009-01-05 20:47:28 +02:00
Georgi Kodinov
e56284128f Reverted the fix for bug #25830 because of omissions and non-complete test
case.
2009-01-05 12:37:56 +02:00