Commit graph

76482 commits

Author SHA1 Message Date
unknown
a1108a0b6c Merge 5.2 -> 5.3 2012-11-01 21:36:31 +02:00
Tor Didriksen
c8ab849365 merge 5.1 => 5.5 2012-11-01 17:33:55 +01:00
Tor Didriksen
86c0a80b0d Bug#14840488 VALGRIND ERRORS IN MYSQL_CLIENT_TEST
Add missing DBUG_RETURNs, otherwise the debug-stack gets messed up,
and _db_enter_ and _db_exit_ will access data outside the current stack frame.
2012-11-01 17:23:06 +01:00
unknown
43293b7a51 Merge XtraDB from Percona-Server 5.1.66-rel14.1 into MariaDB 5.1. 2012-11-01 16:20:09 +01:00
unknown
1d812468d5 Updated with changes from Percona Server 5.1.66-rel14.1 tarball. 2012-11-01 15:16:42 +01:00
unknown
8b5d345eea Merge 5.1 -> 5.2 2012-11-01 15:44:34 +02:00
unknown
ee052c3e14 Fix of non-deterministic results. 2012-11-01 00:06:09 +02:00
Michael Widenius
fb90c36284 Fixed MDEV-612, LP:1010759 - Valgrind error ha_maria::check_if_incompatible_data on
mysql-test/r/partition.result:
  Added test case
mysql-test/t/partition.test:
  Added test case
sql/ha_partition.cc:
  Removed printing of not initialized variable
storage/maria/ha_maria.cc:
  Don't copy variables that are not initialized
2012-10-31 23:49:51 +02:00
Michael Widenius
b7ae1194e2 Fixed MDEV-647,LP:986261 - Aria unit tests fail at ma_test2
storage/maria/ma_test2.c:
  Problem was that rnd() generated bigger value than allocated array
2012-10-31 23:22:32 +02:00
unknown
d9a682adcf Do not build pbxt. 2012-10-31 23:04:53 +02:00
Venkata Sidagam
02501a0f97 BUG#13556441: CHECK AND REPAIR TABLE SHOULD BE MORE ROBUST [4]
Problem description:
mysql server crashes when we run repair table on currupted table.

Analysis:
The problem with this bug seem to be key_reflength out of bounds
(186 according to debugger). We read this value from meta-data
segment of .MYI file while doing mi_open().

If you look into _mi_kpointer() you can see that the upper limit
for key_reflength is 7.

Solution:
In mi_open() there is a line like:
  if (share->base.keystart > 65535 || share->base.rec_reflength > 8)
we should verify key_reflength here as well.
2012-10-31 18:32:53 +05:30
unknown
27bcea09e5 Fix crashes on 32-bit async client lib when -fomit-frame-pointer
- Ensure asm parameters are in registers, so we do not de-reference from
   bogus stack pointer.

 - Make return address undefined in DWARF unwind info in my_context_spawn,
   so DWARF-based unwinders will know this is the end of the call stack
   (same as the amd64 fix for the similar issue).
2012-10-31 12:47:25 +01:00
Ashish Agarwal
2919ca4e0b BUG#14485479: Merge into mysql-5.5 branch 2012-10-31 12:45:57 +05:30
Ashish Agarwal
154860eab5 BUG#14485479: INSTALL AUDIT PLUGIN HANGS IF WE TRY TO
DISABLE AND ENABLED DURING DDL OPERATION

PROBLEM: Same thread trying to acquire the same mutex
         second time leads to hang/server crash.
         While [un]installing audit_log plugin
         a thread acquires the LOCK_plugin mutex
         and after successful initialization tries
         to write in mysql.plugin table. It holds
         this mutex for a long time. If some how
         plugin table is corrupted then a write to 
         plugin table will throw an error, thread try
         to log this error in the audit_log plugin,
         doing so it tries to acquire the mutex
         again and results is server hang/crash.

SOLUTION: Releasing the LOCK_plugin mutex before
          writing in mysql.plugin table. We dont
          need to hold this mutex as thread already
          acquired a TL_WRITE lock on mysql.plugin
          table.
2012-10-31 12:40:48 +05:30
Sergey Petrunya
9b6fe96503 MDEV-772, MDEV-744: Fix test-table-elimination script to work. 2012-10-31 09:34:25 +04:00
Vladislav Vaintroub
bc5232a65d MDEV-672 : storage/maria and storage/perfschema do not appear to honor WITH_UNIT_TESTS
Disable compiling unit tests if WITH_UNIT_TEST is FALSE.

Also, fix CMake code to allow compilation WITHOUT_ARIA_STORAGE_ENGINE
2012-10-30 23:05:55 +01:00
Vladislav Vaintroub
8d2c12a924 MDEV-3824 - xtradb file rename fails on Windows, if new name already exists.
Changed implementation os_file_rename() on Windows  such as it does not fail if destination file already exists. Now MoveFileEx() with MOVEFILE_REPLACE_EXISTING flag is used, instead of prior MoveFile().
This fixed implementation is better compatible with rename() on POSIX systems.
2012-10-30 19:13:39 +01:00
Anirudh Mangipudi
5598603a08 BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE
TO MYISAM_SORT_BUFFER_SIZE
Null Merge from 5.1 to 5.5
2012-10-30 19:40:42 +05:30
Anirudh Mangipudi
a18a3474bb BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE
TO 'MYISAM_SORT_BUFFER_SIZE'
Merging from 5.1 to 5.5
2012-10-30 19:00:12 +05:30
Anirudh Mangipudi
40b8b95142 BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE
TO 'MYISAM_SORT_BUFFER_SIZE'
Problem: 'myisam_sort_buffer_size' is a parameter used by 
mysqld program only whereas 'sort_buffer_size' is used by
mysqld and myisamchk programs. But the error message printed
when myisamchk program is run with insufficient buffer size 
is myisam_sort_buffer_size is too small which may mislead to the
server parameter myisam_sort_buffer_size.
SOLUTION: A parameter 'myisam_sort_buffer_size' is added as an
alias for 'sort_buffer_size' and the 'sort_buffer_size' parameter
is marked as deprecated. So myisamchk also has both the parameters
with the same role.
2012-10-30 18:49:15 +05:30
Anirudh Mangipudi
84d87d938a BUG#11754894: MYISAMCHK ERROR HAS INCORRECT REFERENCE
TO 'MYISAM_SORT_BUFFER_SIZE'
Problem: 'myisam_sort_buffer_size' is a parameter used by 
mysqld program only whereas 'sort_buffer_size' is used by
mysqld and myisamchk programs. But the error message printed
when myisamchk program is run with insufficient buffer size 
is myisam_sort_buffer_size is too small which may mislead to the
server parameter myisam_sort_buffer_size.
SOLUTION: A parameter 'myisam_sort_buffer_size' is added as an
alias for 'sort_buffer_size' and the 'sort_buffer_size' parameter
is marked as deprecated. So myisamchk also has both the parameters
with the same role.
2012-10-30 16:53:55 +05:30
Shivji Kumar Jha
96b6bcc6b2 BUG#14659685: main.mysqlbinlog_row_myisam.test main.mysqlbinlog_row_innodb.test are skipped
merge from 5.1 into 5.5
2012-10-30 10:41:25 +05:30
Shivji Kumar Jha
7c7de142a3 BUG#14659685 - main.mysqlbinlog_row_myisam and
main.mysqlbinlog_row_innodb are skipped by mtr

=== Problem ===

The following tests are wrongly placed in main suite and as a
result these are not run with proper binlog format combinations.
Some are always skipped by mtr.
1) mysqlbinlog_row_myisam
2) mysqlbinlog_row_innodb
3) mysqlbinlog_row.test
4) mysqlbinlog_row_trans.test
5) mysqlbinlog-cp932
6) mysqlbinlog2
7) mysqlbinlog_base64

=== Background ===

mtr runs the tests placed in main suite with binlog format=stmt.
Those that need to be tested against binlog format=row or mixed
or more than one binlog format and require only one mysql server
are placed in binlog suite. mtr runs tests in binlog suite with
all three binlog formats(stmt,row and mixed).

=== Fix ===


1) Moved the test listed in problem section above to binlog suite.
2) Added prefix "binlog_" to the name of each test case moved.
   Renamed the coresponding result files and option files accordingly. 


mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc:
  include file for mysqlbinlog_row_myisam.test and 
  mysqlbinlog_row_myisam.test which are being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog-cp932.result:
  result file for mysqlbinlog-cp932.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result:
  result file for mysqlbinlog2.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog_base64.result:
  result file for mysqlbinlog_base64.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result:
  result file for mysqlbinlog_row.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result:
  result file for mysqlbinlog_row_innodb.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result:
  result file for mysqlbinlog_row_myisam.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result:
  result file for mysqlbinlog_row_trans.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932-master.opt:
  option file for mysqlbinlog-cp932.test which is being moved to
  binlog suite.
mysql-test/suite/binlog/t/binlog_mysqlbinlog-cp932.test:
  the test requires binlog format=stmt or mixed. Since, it was placed in
  main suite earlier, it was only run with binlog format=stmt, and hence
  this test was never run with binlog format=mixed.
mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test:
  the test requires binlog format=stmt or mixed. Since, it was placed in
  main suite earlier, it was only run with binlog format=stmt, and hence
  this test was never run with binlog format=mixed.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_base64.test:
  the test requires binlog format=row. Since, it was placed in main
  suite earlier, it was only run with binlog format=stmt, and hence
  this test was always skipped by mtr.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test:
  the test requires binlog format=row. Since, it was placed in main
  suite earlier, it was only run with binlog format=stmt, and hence
  this test was always skipped by mtr.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test:
  the test requires binlog format=row. Since, it was placed in main
  suite earlier, it was only run with binlog format=stmt, and hence
  this test was always skipped by mtr.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test:
  the test requires binlog format=row. Since, it was placed in main
  suite earlier, it was only run with binlog format=stmt, and hence
  this test was always skipped by mtr.
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test:
  the test requires binlog format=row. Since, it was placed in main
  suite earlier, it was only run with binlog format=stmt, and hence
  this test was always skipped by mtr.
2012-10-30 10:40:07 +05:30
unknown
b5ee1cf549 2012-10-29 16:20:57 +01:00
unknown
21f17ba433 2012-10-29 15:07:49 +01:00
unknown
7de6a91bfa 2012-10-29 14:52:17 +01:00
unknown
4f4632341f 2012-10-29 15:50:04 +05:30
Alexander Nozdrin
122d598a00 Merge from 5.1. 2012-10-29 13:06:43 +04:00
Alexander Nozdrin
6b7419d3d0 Fix sp_notembedded.test. 2012-10-29 12:47:01 +04:00
unknown
974abc7ad8 MDEV-3812
This patch undoes the removal of enum store_key_result by the previous patch for mdev-3812.
2012-10-27 00:56:14 +03:00
unknown
97a1c53c81 MDEV-3812: Remove unneeded extra call to engine->exec() in Item_subselect::exec, remove enum store_key_result
This task fixes an ineffeciency that is a remainder from MySQL 5.0/5.1. There, subqueries
were optimized in a lazy manner, when executed for the first time. During this lazy optimization
it may happen that the server finds a more efficient subquery engine, and substitute the current
engine of the query being executed with the new engine. This required re-execution of the engine.

MariaDB 5.3 pre-optimizes subqueries in almost all cases, and the engine is chosen in most cases,
except when subquery materialization found that it must use partial matching. In this case, the
current code was performing one extra re-execution although it was not needed at all. The patch
performs the re-execution only if the engine was changed while executing.

In addition the patch performs small cleanup by removing "enum store_key_result" because it is
essentially a boolean, and the code that uses it already maps it to a boolean.
2012-10-25 15:50:10 +03:00
Tor Didriksen
4baab59e93 Bug#14737559 BZR JOIN PLUGIN TREES INTO INTERNAL/PLUGIN
Part three:
Fix some search paths.
2012-10-24 17:06:43 +02:00
Tor Didriksen
9934bc5409 local merge 2012-10-23 17:25:22 +02:00
Tor Didriksen
7873a6e4d7 Use MESSAGE(STATUS ...) as we don't want any popup from the build system. 2012-10-23 13:41:34 +02:00
Marko Mäkelä
e5b11572bc Merge mysql-5.1 to mysql-5.5. 2012-10-22 22:13:26 +03:00
Marko Mäkelä
d13554b1f9 Backport from 5.6: Bug#14769820 ASSERT FLEN == LEN
IN ALTER TABLE ... ADD UNIQUE KEY

A bogus debug assertion failure occurred when reporting a duplicate
key on a column prefix of a CHAR column.

This is a regression from Bug#14729221 IN-PLACE ALTER TABLE REPORTS ''
INSTEAD OF REAL DUPLICATE VALUE FOR PREFIX KEYS. The assertion is only
present when UNIV_DEBUG is defined (which it is in debug builds
starting from MySQL 5.5). It is a case of overasserting.

Fix approved by Inaam Rana on IM.
2012-10-22 22:10:33 +03:00
Nuno Carvalho
700b24db62 BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Merge from mysql-5.1 into mysql-5.5.
2012-10-21 20:34:41 +01:00
Nuno Carvalho
62503f9cf5 BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Moved explicit instantiation of available_buffer and valid_buffer_range 
template functions to sql/log_event.cc.
2012-10-21 20:28:19 +01:00
Nuno Carvalho
c752059eb2 BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Null merge from mysql-5.1 into mysql-5.5.
2012-10-21 15:40:04 +01:00
Nuno Carvalho
b645b63956 BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Merge bundle on mysql-5.5.
2012-10-21 15:35:39 +01:00
Nuno Carvalho
aadd8ba695 BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS
Merge bundle on mysql-5.1.
2012-10-21 15:34:38 +01:00
Joerg Bruehe
4828c75af1 Fix formatting in 'INFO_BIN' on Windows - backport. 2012-10-19 20:31:22 +02:00
Joerg Bruehe
b761fe36e3 Upmerge a backport - empty 2012-10-19 20:11:44 +02:00
Joerg Bruehe
86b311fbdf Automerge into main 5.1 2012-10-19 20:09:29 +02:00
Annamalai Gurusami
6ff71d0dd3 Bug #14226171 EXCESSIVE ROW LOCKING WITH UPDATE IN 5.5.25
When a DML statement is issued, and if the index merge 
access method is chosen, then many rows from the
storage engine will be locked because of the way the
algorithm works.  Many rows will be locked, but they
will not be part of the final result set.

To reduce the excessive locking, the locks of unmatched
rows are released by this patch.  This patch will 
affect only transactions with isolation level
equal to or less stricter than READ COMMITTED. This is
because of the behaviour of ha_innobase::unlock_row().

rb://1296 approved by jorgen and olav.
2012-10-19 16:43:48 +05:30
Sergei Golubchik
797082ca71 Fix the incorrect merge 2012-10-19 11:21:35 +02:00
Sergei Golubchik
68baf07dcd 5.3 merge 2012-10-18 23:33:06 +02:00
Neeraj Bisht
44beb951ca Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE_BLOB
Problem:-
When we execute a query which has subquery with GROUP BY, ORDER BY and have a
BLOB column,results a memory leak.

Analysis:-
In case of subquery, which have GROUP BY on BLOB and a ORDER BY on other field
and BLOB is not a key. We allocate a tmp buffer to copy_field to take care of
BLOB value.This copy_field value can have copies of its in two join(objects),
so while freeing this copy_field we have to take care that it is
not deleted twice.
The double deletion of tmp_table_param.copy_field is handled by two patches.

One by Kostja :
revid:sp1r-konstantin@mysql.com-20050627101056-55153
Fix the broken test suite in -debug build.

and other by Oleksandr
revid:sp1r-bell@sanja.is.com.ua-20060118114857-19905
Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851).

both of this patches are commited in different branch and while
merging they both get placed,but there is no need for Kostja patch as Oleksandr
patch handle this.


sql/sql_select.cc:
  Bug13726751, tmp_join clean up is not necessary as later in the code we are taking care of cleaning up of tmp_join copy_field.
2012-10-18 23:54:18 +05:30
Neeraj Bisht
eef1a1957e Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE_BLOB
Problem:-
When we execute a query which has subquery with GROUP BY, ORDER BY and have a
BLOB column,results a memory leak.

Analysis:-
In case of subquery, which have GROUP BY on BLOB and a ORDER BY on other field
and BLOB is not a key. We allocate a tmp buffer to copy_field to take care of
BLOB value.This copy_field value can have copies of its in two join(objects),
so while freeing this copy_field we have to take care that it is
not deleted twice.
The double deletion of tmp_table_param.copy_field is handled by two patches.

One by Kostja :
revid:sp1r-konstantin@mysql.com-20050627101056-55153
Fix the broken test suite in -debug build.

and other by Oleksandr
revid:sp1r-bell@sanja.is.com.ua-20060118114857-19905
Excluded posibility of tmp_table_param.copy_field double deletion (BUG#14851).

both of this patches are commited in different branch and while
merging they both get placed,but there is no need for Kostja patch as Oleksandr
patch handle this.


sql/sql_select.cc:
  Bug13726751, tmp_join clean up is not necessary as later in the code we are taking care of cleaning up of tmp_join copy_field.
2012-10-18 23:45:15 +05:30
Marko Mäkelä
f9389d584d Merge mysql-5.1 to mysql-5.5. 2012-10-18 17:14:57 +03:00