Commit graph

54255 commits

Author SHA1 Message Date
Davi Arnaut
92d5c4d774 Bug#33362: Query cache invalidation (truncate) may hang
if cached query uses many tables

The problem was that query cache would not properly cache
queries which used 256 or more tables but yet would leave
behind query cache blocks pointing to freed (destroyed)
data. Later when invalidating (due to a truncate) query cache
would attempt to grab a lock which resided in the freed data,
leading to hangs or undefined behavior.

This was happening due to a improper return value from the
function responsible for registering the tables used in the
query (so the cache can be invalidated later if one of the
tables is modified). The function expected a return value of
type boolean (char, 8 bits) indicating success (1) or failure
(0) but the number of tables registered (unsigned int, 32 bits)
was being returned instead. This caused the function to return
failure for cases where it had actually succeed because when
a type (unsigned int) is converted to a narrower type (char),
the excess bits on the left are discarded. Thus if the 8
rightmost bits are zero, the return value will be 0 (failure).

The solution is to simply return true (1) only if the number of
registered table is greater than zero and false (0) otherwise.
2008-06-03 10:59:46 -03:00
Matthias Leich mleich@mysql.com
6fec7fc19a Upmerge of fix for
Bug 36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
2008-06-03 12:21:48 +02:00
Matthias Leich mleich@mysql.com
be574a3a57 Bug#36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
Fix for this bug and additional improvements/fixes
In detail:
- Remove unicode attribute from several columns
  (unicode properties were nowhere needed/tested)
  of the table tb3
  -> The runnability of these tests depends no more on
     the availibility of some optional collations.
- Use a table tb3 with the same layout for all
  engines to be tested and unify the engine name
  within the protocols.
  -> <engine>_trig_<abc>.result have the same content
- Do not load data into tb3 if these rows have no
  impact on result sets
- Add tests for NDB (they exist already in 5.1)
- "--replace_result" at various places because
  NDB variants of tests failed with "random" row
  order in results
  This fixes a till now unknown weakness within the
  funcs_1 NDB tests existing in 5.1 and 6.0
- Fix the expected result of ndb_trig_1011ext
  which suffered from Bug 32656
  + disable this test
- funcs_1 could be executed with the mysql-test-run.pl
  option "--reorder", which saves some runtime by
  optimizing server restarts.
  Runtimes on tmpfs (one attempt only):
  with    reorder 132 seconds
  without reorder 183 seconds
- Adjust two "check" statements within func_misc.test
  which were incorrect (We had one run with result set
  difference though the server worked good.)
- minor fixes in comments
2008-06-02 21:57:11 +02:00
Patrick Crews
7fe7e4318b automatically merged 2008-05-30 12:10:32 -04:00
Patrick Crews
ae408f632a automatically merged 2008-05-30 11:49:53 -04:00
Matthias Leich mleich@mysql.com
7b62ee3ec9 Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
Upmerge of fix for this bug and a second similar problem
found during experimenting.

This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
2008-05-29 22:16:22 +02:00
Matthias Leich mleich@mysql.com
361dcb1a90 Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
Fix for this bug and a second similar problem
found during experimenting.

This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
2008-05-29 18:38:10 +02:00
Georgi Kodinov
5667e04032 automatically merged 2008-05-28 17:33:27 +03:00
Georgi Kodinov
9aa8ba55f0 automatically merged 2008-05-28 17:26:26 +03:00
Georgi Kodinov
fb78c56f51 merged 5.0-bugteam to 5.1-bugteam 2008-05-28 17:18:24 +03:00
Alexander Barkov
ca1860c36c Updating charset doc files.
Thanks to Paul for preparing the up-to-date files
reflecting 4.1 changes.
2008-05-28 15:03:47 +05:00
Patrick Crews
e856d953e2 Bug#36721 - Test funcs1.<engine>_func_view failing for multiple engines
Bug#36724 - Test funcs_1.<engine>_storedproc_02 needs to be updated
Bug#36726 - Test funcs_1.<engine>_storedproc failing - Needs to be updated on 5.1+

func_view bug:  re-records .result files to account for addition of charset and collation data 
                to SHOW CREATE VIEW output
storedproc bugs:  Added expected errors for those storedprocs that use SQLSTATE:00000
                  in their handlers.  re-recorded .result files to account for these
                  expected errors.
2008-05-27 19:30:07 -04:00
Davi Arnaut
6e761b19b9 Merge. 2008-05-27 12:47:12 -03:00
Davi Arnaut
f4b291c517 Add variation of compile-pentium-valgrind-max which does not build ndb. 2008-05-27 12:35:35 -03:00
Georgi Kodinov
afcdf5ad83 Bug #36887: Typo in mysql_client_test.c uses bind instead of my_bind
There was a typo in a error check causing wrong thing to be ckecked 
and a possible error not being caught.
Fixed by using the correct variable to test for malloc() errors.
2008-05-27 14:33:08 +03:00
Sven Sandberg
25bddd93c3 BUG#36826: rpl_slave_status fails sporadically in pushbuild
rpl_slave_status failed on pushbuild. The slave stopped with an
error. Adding sync_slave_with_master fixes the problem. Updated
test case.
2008-05-26 15:06:49 +02:00
Chad MILLER
0e62334a24 Merge from mysql-5.1, which adds metainfo for mailer plugin. 2008-05-23 22:08:22 +02:00
Chad MILLER
585d205dfe Merge from 5.0 trunk. Adding mailer metainfo. 2008-05-23 20:56:39 +02:00
Chad MILLER
5703b5363d Merged from trunk. 2008-05-23 18:45:04 +02:00
Chad MILLER
13a4f0b38a Merge from bk tree. Resolved addition of same files in both trees. 2008-05-23 18:42:54 +02:00
First_name Last_name mleich@mysql.com
72b623eef0 Fix for
Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
and a second similar problem within this test found
during experimenting.
2008-05-23 17:23:55 +02:00
Chad MILLER
4215c0d625 Merge from 5.0. Update version. 2008-05-23 00:25:21 +02:00
Chad Miller
8e15e3da89 Merge metainfo for mailer plugin. 2008-05-22 17:57:41 +02:00
Chad MILLER
7648ea9e08 Add branch metainfo for mailer plugin. 2008-05-21 18:18:44 -04:00
Kristofer Pettersson
8c490b78df Reverted merging misstake. 2008-05-21 17:34:14 +02:00
Kristofer Pettersson
efa65f6795 Bug#34417 Assertion failure in Diagnostics_area::set_error_status()
The Diagnostic_area caused an assertion failure in debug mode when
the disk was full.
  
By setting the internal error handler to ignore errors caused by
underlying logging methods, the error is avoided.
2008-05-21 14:44:30 +02:00
dfischer/mysqldev@mysql.com/production.mysql.com
94d237b19c Raise version number after cloning 5.1.25-rc 2008-05-21 09:59:58 +02:00
Kristofer Pettersson
e840c86e9b Bug#32966 main.status fails
The failing test case is depending on unnecessary status variable output
which changes based on build configuration. By reducing the output the test
becomes more stable.
2008-05-21 09:50:54 +02:00
kostja@bodhi.(none)
a9954110d8 Update test coverage for Bug#27430 "Crash in subquery code when in PS
and table DDL changed after PREPARE" to pass in embedded mode.
2008-05-20 22:43:26 +04:00
kostja@bodhi.(none)
87a75bdf30 A number of fixes after a merge from the main 5.1 tree:
the local tree contains a fix for 
Bug#32748 "Inconsistent handling of assignments to 
general_log_file/slow_query_log_file",
which changes output of a number of tests.
2008-05-20 22:23:58 +04:00
kostja@bodhi.(none)
a746411816 Bug#27430 "Crash in subquery code when in PS and table DDL changed
after PREPARE"
Update test results after a merge with the main tree: the new minimum for 
the table definition cache is 256.
2008-05-20 21:07:11 +04:00
kostja@bodhi.(none)
6ae3bca94e Bug#27430 "Crash in subquery code when in PS and table DDL changed after
PREPARE", review fixes:
- make the patch follow the specification of WL#4166 and remove  
the new error that was originally introduced.
Now the client never gets an error from reprepare, unless it failed.
I.e. even if the statement at hand returns a completely different
result set, this is not considered a server error.
The C API library, that can not handle this situation, was modified to
return a client error.
Added additional test coverage.
2008-05-20 20:36:26 +04:00
Chad MILLER
fdd075d0e1 Bug#36818: rpl_server_id1 fails expecting slave has stopped
The test is vulnerable because it does not check if slave has stopped at time
of the new session is requested `start slave;'

Fixed with deploying explicitly wait_for_slave_to_stop synchronization macro.
2008-05-20 11:14:03 -04:00
kostja@bodhi.(none)
2c0ce2a832 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-27430
2008-05-20 11:38:17 +04:00
kostja@bodhi.(none)
86396459ae Merge bk-internal.mysql.com:/home/bk/mysql-5.1-27430
into  bodhi.(none):/opt/local/work/mysql-5.1-27430
2008-05-20 11:33:27 +04:00
kostja@bodhi.(none)
6e4af99f5d Bug#27430 "Crash in subquery code when in PS and table DDL changed after
PREPARE": rename members, methods, classes to follow the spec 
(a code review request)
2008-05-20 11:29:16 +04:00
davi@skynet.(none)
2f770c91d2 Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
Add test target to the makefile that will cause all
statements to be re-prepared before execution.
2008-05-19 13:39:31 -03:00
holyfoot/hf@hfmain.(none)
7ec38d1fa7 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mysql.com:/d2/hf/mysql-5.1-bugteam
2008-05-19 11:39:30 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
8718be7763 disabled.def:
rpl_innodb_bug28430 disabled
2008-05-19 11:38:53 +05:00
gshchepa/uchum@host.loc
d044d9f00b Merge host.loc:/work/bk/5.0-bugteam
into  host.loc:/work/bk/5.1-bugteam
2008-05-18 14:27:44 +05:00
gshchepa/uchum@host.loc
80b16212c3 Merge host.loc:/work/bugs/5.0-bugteam-36676
into  host.loc:/work/bk/5.0-bugteam
2008-05-18 14:27:17 +05:00
gshchepa/uchum@host.loc
2459d3a9ad Fixed bug#36676: multiupdate using LEFT JOIN updates only
first row or fails with an error:
  ERROR 1022 (23000): Can't write; duplicate key in table ''

The server uses intermediate temporary table to store updated
row data.  The first column of this table contains rowid.
Current server implementation doesn't reset NULL flag of that
column even if the server fills a column with rowid.
To keep each rowid unique, there is an unique index.
An insertion into an unique index takes into account NULL
flag of key value and ignores real data if NULL flag is set.
So, insertion of actually different rowids may lead to two
kind of problems.  Visible effect of each of these problems
depends on an initial engine type of temporary table:

1. If multiupdate initially creates temporary table as
a MyISAM table (a table contains blob columns, and the
create_tmp_table function assumes, that this table is
large), it inserts only one single row and updates
only rows with one corresponding rowid. Other rows are
silently ignored. 

2. If multiupdate initially creates MEMORY temporary
table, fills it with data and reaches size limit for
MEMORY tables (max_heap_table_size), multiupdate
converts MEMORY table into MyISAM table and fails
with an error:
  ERROR 1022 (23000): Can't write; duplicate key in table ''


Multiupdate has been fixed to update the NULL flag of
temporary table rowid columns.
2008-05-18 14:21:25 +05:00
gkodinov/kgeorge@magare.gmz
faa1330836 Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-bugteam
2008-05-18 11:42:55 +03:00
kostja@bodhi.(none)
aef39682d6 Fix mysql_client_test failure in pushbuild 5.1-27430
(Bug#27430)
2008-05-18 10:28:36 +04:00
kostja@bodhi.(none)
7aeeb8f667 Implement some code review fixes for the fix for Bug#27430
"Crash in subquery code when in PS and table DDL changed after PREPARE"
2008-05-18 01:51:18 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
f9d183b5dc Bug #36705 key_buffer_size of >= 2G allocates all availabel virtual memory on 64-bit wondo.
temporary variables of 'long' types were used to store ulong values,
that causes init_key_cache to receive distorted parameters
2008-05-17 12:53:47 +05:00
cmiller@zippy.cornsilk.net
c1f35308cb Merge bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-bugteam
2008-05-16 17:48:07 -04:00
cmiller@zippy.cornsilk.net
34deab48db Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-bugteam
2008-05-16 17:40:01 -04:00
cmiller@zippy.cornsilk.net
fd6cce83fb Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-bugteam
2008-05-16 17:37:37 -04:00
gkodinov/kgeorge@magare.gmz
d24dffc819 subselect.result:
updated the testcase for bug 36011
2008-05-16 19:28:24 +03:00