Commit graph

69989 commits

Author SHA1 Message Date
Tor Didriksen
ea2cd838be Bug#12563865 ROUNDED,TMP_BUF,DECIMAL_VALUE STACK CORRUPTION IN ALL VERSIONS >=5.0
Buffer over-run on all platforms, crash on windows, wrong result on other platforms,
when rounding numbers which start with 999999999 and have
precision = 9 or 18 or 27 or 36 ...
2011-10-14 10:09:53 +02:00
Nirbhay Choubey
7a8e9d5b37 Merge of changeset of WL#5945 from mysql-5.1. 2011-10-14 01:17:46 +05:30
Nirbhay Choubey
05a38e7bf3 WL#5945 : Improve libedit library
Updated libedit library.
2011-10-14 01:03:25 +05:30
Bjorn Munch
66e62bdfdf null upmerge 2011-10-12 17:30:51 +02:00
Bjorn Munch
9a32e8e5a9 merge 5.5 => 5.5-mtr 2011-10-12 17:29:19 +02:00
Bjorn Munch
c21f2b8c0d merge 5.1 => 5.1-mtr 2011-10-12 17:26:32 +02:00
Sergey Glukhov
9e8c23a05a automerge 2011-10-12 18:02:05 +04:00
Sergey Glukhov
b195e6f943 Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
When temporary tables is used for result sorting
result field for gconcat function is created using
group_concat_max_len size. It leads to result truncation
when character_set_results is multi-byte character set due
to insufficient tmp table field size.
The fix is to increase temporary table field size for
gconcat. Method make_string_field() is overloaded
for Item_func_group_concat class and uses
max_characters * collation.collation->mbmaxlen size for
result field. max_characters is maximum number of characters
what can fit into max_length size.
2011-10-12 17:41:25 +04:00
Georgi Kodinov
82f89480bf empty weave merge mysql-5.1-security->mysql-5.5-security 2011-10-12 15:12:34 +03:00
Georgi Kodinov
665ef20368 merge mysql-5.5->mysql-5.5-security 2011-10-12 15:07:15 +03:00
Georgi Kodinov
ff80795871 empty weave merge mysql-5.0-security->mysql-5.1-security 2011-10-12 14:42:42 +03:00
Georgi Kodinov
492e5b9bce auto-merge mysql-5.1->mysql-5.1-security 2011-10-12 14:34:44 +03:00
Georgi Kodinov
e5e8d376d5 auto-merge mysql-5.0->mysql-5.0-security 2011-10-12 14:33:09 +03:00
Marko Mäkelä
7667e8f93f Merge mysql-5.1 to mysql-5.5. 2011-10-12 09:21:33 +03:00
Marko Mäkelä
41b97529d0 Bug#13006367 62487: innodb takes 3 minutes to clean up the adaptive
hash index at shutdown

btr_search_disable(): Just drop the entire adaptive hash index,
without dropping every record separately.

buf_pool_clear_hash_index(): Renamed and simplified from
buf_pool_drop_hash_index(). Set block->index = NULL for every block in
the buffer pool. Do not release the btr_search_latch. The caller will
have to adjust other data structures.

Remove block->is_hashed. It is redundant, should be always equal to
block->index != NULL.

Remove btr_search_fully_disabled, btr_search_enabled_mutex, and
SYNC_SEARCH_SYS_CONF. We drop the AHI in one pass, without releasing
the btr_search_latch in between.

Replace void* with const rec_t* and add assertions on btr_search_latch
and btr_search_enabled to ha0ha.h, ha0ha.ic, ha0ha.c.

page_set_max_trx_id(): Ignore the adaptive hash index. I forgot to
push this in rb:750.

btr0sea.c: Always after acquiring btr_search_latch, check for
block->index==NULL or !btr_search_enabled. We can now set
block->index=NULL while only holding btr_search_latch in exclusive
mode. Always acquire btr_search_latch before reading block->index,
except in shortcuts when testing for block->index == NULL.

ha_clear(), ha_search(): Unused function, remove.

buf_page_peek_if_search_hashed(): Remove. This function may avoid
latching a page at the cost of doing a duplicate buf_pool->page_hash
lookup.

rb:775 approved by Inaam Rana
2011-10-12 09:00:49 +03:00
Vinay Fisrekar
9de021c753 merge 5.1 -> 5.5
adjust/modify tests as they were failing if system time zone is set differently.
2011-10-12 10:19:46 +05:30
Vinay Fisrekar
c6120de68f bug#11766457 - adjusting/modifying the the tests as tests were failing if system time zone is set differently. 2011-10-12 10:10:52 +05:30
Tatjana Azundris Nuernberg
27f60d57d8 auto-merge 2011-10-10 15:48:52 +01:00
Tatjana Azundris Nuernberg
9d3f05933b auto-merge 2011-10-10 15:39:05 +01:00
Tatjana Azundris Nuernberg
2a8a76537f auto-merge 2011-10-10 15:34:29 +01:00
Joerg Bruehe
3cbe8672d9 Test "file_contents" failed in non-community RPMs on SuSE
because the search pattern for the "INFO_*" files was not general enough:
Fixed.
2011-10-10 14:03:29 +02:00
Magne Mahre
5611bcfaa9 Merge from 5.1-security 2011-10-07 14:10:15 +02:00
Magne Mahre
e02c3d7fb7 BUG#12589870 CRASHES WITH MULTIQUERY PACKET + USE<DB> + QUERY CACHE
A buffer large enough to hold the query _plus_ some additional
data is allocated before parsing is started.   The additional data 
is used by the query cache, and consists of the name of the current 
database and a set of flags.
 
When a packet containing multiple SQL statements is sent to the
server and one of the statements changes the current database
(a "USE <db>" statement), and the name of the new current database 
is longer than of the previous,  there is not enough space in the 
buffer for the new name, and we write out over the buffer boundary.

The fix adds an extra field to store the number of bytes
allocated to the database name in the buffer.  If the current
database name changes, and the new name is longer than the
previous one, we refuse to cache the query.
2011-10-07 14:08:31 +02:00
Magne Mahre
2b2ea96e3b Bug#12912112 MYSQL_CLIENT_TEST FAILS ON TEST_TRUNCATION
Sun Studio 12 has an error when calculating the compile-time 
length of a constant character string.  The error is only 
present when building an optimized 32-bits version, using 
the -xbuiltin=(%all) compiler flag. 
       
During compilation, the compiler recognizes the use of 
the strlen() function used on a constant string. It 
optimizes the strlen and replaces it with the actual 
length of the string.   This optimization seems to 
calculate the length wrongly in this particular case. 
       
Replacing the "const char *" with a "const char []" 
solves the problem.
2011-10-06 14:13:23 +02:00
Tatjana Azundris Nuernberg
56353912fd manual merge 2011-10-06 11:49:58 +01:00
Tatjana Azundris Nuernberg
12f5e01403 manual merge 2011-10-06 11:35:01 +01:00
Tatjana Azundris Nuernberg
05052c8dbf additional clean-up for 11765687 2011-10-06 11:23:46 +01:00
Tatjana Azundris Nuernberg
399f3e6224 manual merge to reconcile with MySQL ticket 27145 2011-10-06 10:55:57 +01:00
Bjorn Munch
536751321b null upmerge 2011-10-05 22:55:31 +02:00
Bjorn Munch
9489a872bd merge 5.5-mtr => 5.5 2011-10-05 22:54:16 +02:00
Bjorn Munch
ebaa600664 merge 5.1-mtr => 5.1 2011-10-05 22:38:00 +02:00
Bjorn Munch
759c90c1fe Silly mistake in gdb output: replaced print with resfile_print,
but the latter only takes one argument, duh!
Fixed by concatenating the args (replace , with .)
2011-10-05 15:16:20 +02:00
Bjorn Munch
3d2eff9715 Bug #12844282 62075: MTR TESTS SHOULD NOT HAVE TO SAVE & RESET INNODB_FILE_FORMAT_CHECK
This is a redo for 5.5
  Added 'innodb_file_format_max' as variable to ignore change to.
  Tests that had to restore this amended
  Two tests assumed it to be Antelope, make sure these run on a freshly
    started server
2011-10-05 15:14:14 +02:00
Sergey Glukhov
e289c950b0 automerge 2011-10-05 14:26:38 +04:00
Sergey Glukhov
fc9dd7326b automerge 2011-10-05 14:23:39 +04:00
Sergey Glukhov
cff85ac1cd automerge 2011-10-05 14:22:32 +04:00
Sergey Glukhov
d0762ef511 5.1 -> 5.5 merge 2011-10-05 13:55:51 +04:00
Sergey Glukhov
fcd99c156b Bug#11747970 34660: CRASH WHEN FEDERATED TABLE LOSES CONNECTION DURING INSERT ... SELECT
Problematic query:
insert ignore into `t1_federated` (`c1`) select `c1` from  `t1_local` a
where not exists (select 1 from `t1_federated` b where a.c1 = b.c1);
When this query is killed in another connection it could lead to crash.
The problem is follwing:
An attempt to obtain table statistics for subselect table in killed query
fails with an error. So JOIN::optimize() for subquery is failed but
it does not prevent further subquery evaluation.
At the first subquery execution JOIN::optimize() is called
(see subselect_single_select_engine::exec()) and fails with
an error. 'executed' flag is set to TRUE and it prevents
further subquery evaluation. At the second call
JOIN::optimize() does not happen as 'JOIN::optimized' is TRUE
and in case of uncacheable subquery the 'executed' flag is set
to FALSE before subquery evaluation. So we loose 'optimize stage'
error indication (see subselect_single_select_engine::exec()).
In other words 'executed' flag is used for two purposes, for
error indication at JOIN::optimize() stage and for an
indication of subquery execution. And it seems it's wrong
as the flag could be reset.
2011-10-05 13:28:20 +04:00
Marko Mäkelä
622246ec74 Merge mysql-5.1 to mysql-5.5. 2011-10-05 12:07:38 +03:00
Marko Mäkelä
739c529672 Add InnoDB UNIV_SYNC_DEBUG assertions to rw-lock code.
rw_lock_x_lock_func(): Assert that the thread is not already holding
the lock in a conflicting mode (RW_LOCK_SHARED).

rw_lock_s_lock_func(): Assert that the thread is not already holding
the lock in a conflicting mode (RW_LOCK_EX).
2011-10-05 12:01:47 +03:00
Marko Mäkelä
32d770fba3 Merge mysql-5.1 to mysql-5.5. 2011-10-04 21:20:45 +03:00
Marko Mäkelä
836c3a2378 Correct the ChangeLog 2011-10-04 21:01:40 +03:00
kevin.lewis@oracle.com
a82edd985f Merge to current mysql-5.1 2011-10-04 10:46:54 -05:00
kevin.lewis@oracle.com
0e5f12d056 Merge with current mysql-5.5 2011-10-04 10:43:59 -05:00
Joerg Bruehe
11f90e4b81 Upmerge of a merge changeset - empty. 2011-10-04 17:20:33 +02:00
Joerg Bruehe
eb488a7aeb Merge to main. 2011-10-04 17:17:17 +02:00
Joerg Bruehe
9c83fabc90 Merge to main. 2011-10-04 17:16:32 +02:00
kevin.lewis@oracle.com
b0dd5e7ad5 Merge from mysql-5.1 to mysql-5.5 2011-10-04 10:10:14 -05:00
kevin.lewis@oracle.com
239236462b Bug#12980094 and Bug#13034534
Bug 12980094 - ASSERTION IN INNODB DETECTED IN RQG_PARTITION_DDL
Bug 13034534 - RQG TESTS FAIL ON WINDOWS WITH CRASH NEAR RW_LOCK_DEBUG_PRINT

All access to struct rw_lock_debug_struct must be protected by rw_lock_debug_mutex_enter().
2011-10-04 09:21:47 -05:00
Joerg Bruehe
332fa530e3 Fix bug#11886309: RPM UPGRADE OF MYSQL ADVANCED GPL TO MYSQL SERVER ADVANCED DOES NOT WORK
Upmerge from 5.1 to 5.5
2011-10-04 16:21:32 +02:00