Commit graph

66249 commits

Author SHA1 Message Date
Ashish Agarwal
a00f87bf15 BUG#11751793 - 42784: ARCHIVE TABLES CAUSE 100% CPU USAGE
AND HANG IN SHOW TABLE STATUS.

ISSUE: Table corruption due to concurrent queries.
       Different threads running insert and check
       query leads to table corruption. Not properly locked,
       rows are inserted in between check query.

SOLUTION: In check query mutex lock is acquired
          for a longer time to handle concurrent
          insert and check query.

NOTE: Additionally we backported the fix for CHECKSUM
      issue(bug#11758979).
2011-11-23 18:33:29 +05:30
Michael Widenius
c8768a091a Fixes of testcases after merge with MySQL 5.1.59 2011-11-23 10:25:27 +02:00
Jon Olav Hauglid
9f9b5996f5 Disabling main.query_cache_28249.test since this test fails
sporadically on 5.1. See Bug#12584161.

Test runs successfully on 5.5/trunk, so this changeset will
be null-merged.
2011-11-22 14:16:13 +01:00
Michael Widenius
ccb2c805de Merge of XtraDB for 5.1.59 2011-11-21 19:19:37 +02:00
Michael Widenius
2addb35fff Automatic merge 2011-11-21 19:17:56 +02:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
unknown
ec889cd2e2 Merge XtraDB from Percona-Server-5.1.59-13 into MariaDB 5.1. 2011-11-21 14:21:13 +01:00
unknown
190ccd244b Updated with changes from Percona Server 5.1.56-13, from
lp:percona-server/5.1, tag Percona-Server-5.1.59-13.0.

Merged: revid:ignacio.nin@percona.com-20111016133841-fzpr5s89n13ft1s1
2011-11-21 13:20:15 +01:00
Inaam Rana
f28e7bd064 Bug#13390506 - VALGRIND FAILURE AFTER THE FIX FOR 13371000
rb://816
approved by: Marko Makela
  
The title is misleading. This bug was actually introduced by
bug 12635227 and was unearthed by a later optimization.
We need to free buf_page_t structs that we are allocating using
malloc() at shutdown.
2011-11-18 10:59:10 -05:00
Jorgen Loland
523c849d14 Backmerge of BUG#12997905 2011-11-18 14:47:11 +01:00
Karen Langford
e1df69f75a Merge from mysql-5.1.60-release 2011-11-17 00:26:16 +01:00
Sergei Golubchik
ac20f84e7e don't make feedback_plugin_send.test as 'big'
don't assume that the http reply packet will arrive in all in one piece
2011-11-13 13:28:35 +01:00
Sergei Golubchik
f967575457 increase feedback plugin version 2011-11-12 18:40:51 +01:00
Sergei Golubchik
5c7aa5f2ae feedback plugin:
fix for mem_total on windows
  report the time of the data snapshot
2011-11-12 16:41:00 +01:00
Marko Mäkelä
8c886b3bc0 Bug #12842206 INNODB LOCKING REGRESSION FOR INSERT IGNORE: Add a test case.
The bug was accidentally fixed by fixing
Bug#11759688 52020: InnoDB can still deadlock on just INSERT...ON DUPLICATE KEY
a.k.a. the reintroduction of
Bug#7975 deadlock without any locking, simple select and update
2011-11-10 16:45:47 +02:00
Marko Mäkelä
a0a51251e4 Bug#11759688 52020: InnoDB can still deadlock on just INSERT...ON DUPLICATE KEY
a.k.a. Bug#7975 deadlock without any locking, simple select and update

Bug#7975 was reintroduced when the storage engine API was made
pluggable in MySQL 5.1. Instead of looking at thd->lex directly, we
rely on handler::extra(). But, we were looking at the wrong extra()
flag, and we were ignoring the TRX_DUP_REPLACE flag in places where we
should obey it.

innodb_replace.test: Add tests for hopefully all affected statement
types, so that bug should never ever resurface. This kind of tests
should have been added when fixing Bug#7975 in MySQL 5.0.3 in the
first place.

rb:806 approved by Sunny Bains
2011-11-10 12:49:31 +02:00
Sergei Golubchik
04f3ecf632 typos fixed
(thanks viva64.com)
2011-11-08 23:07:19 +01:00
Marko Mäkelä
77eb01b827 Bug#13358468 ASSERTION FAILURE IN BTR_PCUR_GET_BLOCK
btr_pcur_restore_position_func(): When the cursor was positioned at
the tree infimum or supremum, initialize pos_state and latch_mode. The
assertion failed, because pos_state was BTR_PCUR_WAS_POSITIONED.  In
the test failure of WL#5874, the purge thread attempted to restore the
cursor position on the infimum record (the clustered index was empty).

btr_pcur_detach(), btr_pcur_is_detached(): Unused functions, remove.

rb:804 approved by Inaam Rana
2011-11-08 14:15:22 +02:00
Marko Mäkelä
b003b6294c Add debug assertions to catch Bug#13345378 earlier.
In all callers of row_sel_convert_mysql_key_to_innobase(), assert
that the converted key is empty or nonempty when it should be.
2011-11-07 13:37:19 +02:00
Georgi Kodinov
e68afa7c53 auto-merge mysql-5.1->mysql-5.5 2011-11-04 14:33:38 +02:00
Tor Didriksen
0e2af2cdd3 Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build.
Also fixed possibly uninitialized use of need_copy_table_res.
2011-11-01 07:50:54 +01:00
Tor Didriksen
2e7dd62646 Bug#12406055 post-push fix: unused variable 'num_chars' in optimized build. 2011-10-31 10:10:04 +01:00
Karen Langford
aac0319336 Patch to fix stdint.h missing from pre Solaris 10 versions. 2011-10-29 20:08:40 +02:00
Karen Langford
20ffbd3dd7 Patch to fix libedit vis.h problem (OSX/FreeBSD) 2011-10-28 16:40:46 +02:00
unknown
28e2777991 Fix gcc 4.6 warnings about assigned but not used variables.
Fixed my_gethwaddr.c to allow compilation on Mac OS X.
2011-10-27 15:22:52 +03:00
Marko Mäkelä
1d9c841c3b Bug #12884631 62146: TABLES ARE LOST FOR DDL
row_rename_table_for_mysql(): Return DB_ERROR instead of DB_SUCCESS
when fil_rename_tablespace() returns an error. This bug was introduced
in the InnoDB Plugin.

Approved by Sunny Bains over IM.
2011-10-27 14:58:12 +03:00
Alexander Nozdrin
5510bf466a Empty merge from mysql-5.1. 2011-10-27 10:22:19 +04:00
Karen Langford
006f649f4b Increased version number after cloning 5.1.60 2011-10-26 20:48:42 +02:00
Karen Langford
cba07d5bfd Raise version number after cloning 5.1.60 2011-10-26 17:03:53 +02:00
Marko Mäkelä
2c67d5066d Revert revno:3452.71.32 (Bug#12612184 fix).
Bug#12612184 RACE CONDITION AFTER BTR_CUR_PESSIMISTIC_UPDATE()

The fix introduced potentially more severe crash recovery problems
than the bug causes. Revert the fix for now.
2011-10-26 12:23:57 +03:00
Marko Mäkelä
91b5e9352a Revert most of revno 3560.9.1 (Bug#12704861)
This was an attempt to address problems with the Bug#12612184 fix.
Even with this follow-up fix, crash recovery can be broken.
Let us fix the bug later.
2011-10-26 11:44:28 +03:00
Marko Mäkelä
5cd2cb0c4f Copy and adapt innodb_misc1.test from innodb to innodb_plugin. 2011-10-26 09:38:28 +03:00
Marko Mäkelä
86c72a3fad Fix results after Bug#12661768 fix. 2011-10-26 09:34:32 +03:00
Marko Mäkelä
e8d793f870 Fix results after Bug#12661768 fix. 2011-10-25 17:58:34 +03:00
Marko Mäkelä
013ba71dfd Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR
In the ON UPDATE CASCADE clause of FOREIGN KEY constraints, the
calculated update vector was not fully initialized. This bug was
introduced in the InnoDB Plugin when implementing support for
ROW_FORMAT=DYNAMIC.

Additionally, the data type information was not initialized, but
apparently it has never been needed in this case.  Nevertheless, it is
not good programming practice to pass uninitialized values around.

calc_row_difference(): Declare the update field uninitialized in
Valgrind. Copy the data type information as well, except when the
field is SQL NULL. In the built-in InnoDB, initialize
ufield->extern_storage = FALSE (an initialization bug that had gone
unnoticed this far). The InnoDB Plugin and later have this flag to
dfield_t and have always initialized it properly.

row_ins_cascade_calc_update_vec(): Reduce the scope of some
pointers. Initialize orig_len. (This caused the bug in InnoDB Plugin
and later.)

row_ins_foreign_check_on_constraint(): Simplify a condition. Declare
the update vector uninitialized.

rb:771 approved by Jimmy Yang
2011-10-25 17:33:38 +03:00
Vasil Dimov
dce337406e Fix Bug#12661768 UPDATE IGNORE CRASHES SERVER IF TABLE IS INNODB AND IT IS
PARENT FOR OTHER ONE

Do not try to lookup key_nr'th key in 'table' because there may not be such
a key there. key_nr is the number of the key in the _child_ table name, not
in the parent table.

Instead just print the fields of the record that are covered by the first key
defined on the parent table.

This bug gets a better fix in MySQL 5.6, which is too risky for 5.1 and 5.5.

Approved by:	Jon Olav Hauglid (via IM)
2011-10-25 16:46:38 +03:00
Alexander Nozdrin
11a1a5633a Auto-merge from mysql-5.1. 2011-10-24 12:44:27 +04:00
Nirbhay Choubey
f66002f8eb WL#5945 - Improve libedit library
Fixed a misplaced parenthesis, injected due to
syncing from libedit CVS head.
2011-10-24 13:35:28 +05:30
Nirbhay Choubey
62a40350b1 Bug#13106585 PUSH FOR "WL#5945 : IMPROVE LIBEDIT LIBRARY"
BREAKS SOURCE RELEASE BUILD

Some of the required files were not getting copied while
performing 'make dist' and hence the build failed for
the created distribution source.

Added the missing files to Makefile.am.
2011-10-21 18:10:12 +05:30
Sergey Vojtovich
e1c4021bde Merge. 2011-10-21 09:30:56 +04:00
Marko Mäkelä
8a0be8a541 Bug#13116045 Compilation failure using GCC 4.6.1 in btr/btr0cur.c
btr_record_not_null_field_in_rec(): Remove the parameter rec.
Use rec_offs_nth_sql_null() instead of rec_get_nth_field().

rb:788 approved by Jimmy Yang
2011-10-21 06:32:16 +03:00
Alexander Nozdrin
ca881510f2 Fix Windows-build failure: use my_snprintf() instead of snprintf(). 2011-10-20 18:06:41 +04:00
Sergey Vojtovich
de8c70e70b BUG#11757032 - 49030: OPTIMIZE TABLE BREAKS MYISAM TABLE WHEN
USING MYISAM_USE_MMAP ON WINDOWS

When OPTIMIZE/REPAIR TABLE is switching to new data file,
old data file is removed while memory mapping is still
active.

With 5.1 implementation of nt_share_delete() it is not
permitted to remove mmaped file.

This fix disables memory mapping for mi_repair() operations.

mysql-test/r/myisam.result:
  A test case for BUG#11757032.
mysql-test/t/myisam.test:
  A test case for BUG#11757032.
storage/myisam/ha_myisam.cc:
  mi_repair*() functions family use file I/O even if memory
  mapping is available.
  
  Since mixing mmap I/O and file I/O may cause various artifacts,
  memory mapping must be disabled.
storage/myisam/mi_delete_all.c:
  Clean-up: do not attempt to remap file after truncate, since
  there is nothing to map.
2011-10-20 15:03:22 +04:00
Vladislav Vaintroub
78eb1d48c9 Fix endless loop in my_gethwaddr() 2011-10-19 20:51:01 +02:00
Bjorn Munch
14dff92d58 Remove copyright header from parser_stack.test 2011-10-19 13:36:57 +02:00
Tatjana Azundris Nuernberg
8444b6a114 Bug12589870 post-merge fixes for Sparc64 and friends
sql/sp_head.cc:
  alignment-safe copy
sql/sql_cache.cc:
  alignment-safe copy
sql/sql_parse.cc:
  alignment-safe copy
2011-10-19 03:21:31 +01:00
Nirbhay Choubey
fd955448c8 Bug#13102538 : COMPILE ERROR ON SOLARIS WHEN COMPILING
WITH LIBEDIT

Libedit won't build on platforms that do not provide
"sys/cdefs.h".

Removed the inclusion of cdefs.h from all files
other that sys.h, which includes this file only
when the header is found while configuring.
2011-10-18 22:47:32 +05:30
Tor Didriksen
5dc553cd28 merge 5.0-security => 5.1 security 2011-10-14 10:44:27 +02:00
Tor Didriksen
a6145f4b62 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 ...


mysql-test/r/type_newdecimal.result:
  New test cases.
mysql-test/t/type_newdecimal.test:
  New test cases.
sql/my_decimal.h:
  Add sanity checking code, to catch buffer over/under-run.
strings/decimal.c:
  The original initialization of intg1 (add 1 if buf[0] == DIG_MAX)
  will set p1 to point outside the buffer, and the loop to copy the original value
      while (buf0 < p0)
        *(--p1) = *(--p0);
  will overwrite memory outside the my_decimal object.
2011-10-14 10:09:53 +02:00
Nirbhay Choubey
d96c25a790 WL#5945 : Improve libedit library
Updated libedit library.
2011-10-14 01:03:25 +05:30