Commit graph

75813 commits

Author SHA1 Message Date
Gleb Shchepa
521deaf36f minor update to make MSVS happy 2012-06-29 18:24:43 +04:00
Georgi Kodinov
e65c291807 merge bug#13708485 5.1->5.5 2012-06-29 16:54:55 +03:00
Bjorn Munch
5f5df5091e Fix mysql_plugin test to handle version XXa 2012-06-29 14:19:31 +02:00
Jon Olav Hauglid
66ef5b0d48 Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)
Manual merge from mysql-5.1 to mysql-5.5
2012-06-29 13:36:01 +02:00
Jon Olav Hauglid
1ede2dd814 Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)
This patch fixes various compilation warnings of the type
"error: narrowing conversion of 'x' from 'datatype1' to
'datatype2'
2012-06-29 13:25:57 +02:00
Georgi Kodinov
d672a10593 Bug #12910665: AUTH-PLUGIN-DATA-LEN NOT TESTED FOR VALIDITY BY THE
CLIENT

Added a check for a negative second part of the scramble length.
2012-06-29 14:04:24 +03:00
Georgi Kodinov
5a496caeb5 merge 2012-07-05 14:41:04 +03:00
Gleb Shchepa
4661d95433 manual merge (WL6219)
sql/sql_yacc.yy:
  manual merge (backport of WL6219)
2012-06-29 14:12:21 +04:00
Gleb Shchepa
767501fb54 Backport of the deprecation warning from WL#6219: "Deprecate and remove YEAR(2) type"
Print the warning(note):

 YEAR(x) is deprecated and will be removed in a future release. Please use YEAR(4) instead

on "CREATE TABLE ... YEAR(x)" or "ALTER TABLE MODIFY ... YEAR(x)", where x != 4
2012-06-29 12:55:45 +04:00
Yasufumi Kinoshita
6058319dba Bug#14251529 : FIX FOR BUG 13704145 CREATES POSSIBLE RACE CONDITION
make buf_read_page_low() to treat DB_TABLESPACE_DELETED error correctly
rb#1129 approved by Inaam
2012-06-29 12:04:44 +09:00
Joerg Bruehe
59c79cc5d0 Bug#65745: UPDATE ON INNODB TABLE ENTERS RECURSION
Introduction of cost based decision on filesort vs index for UPDATE
statements changed detection of the fact that the index used to scan the
table is being updated. The new design missed the case of index merge
when there is no single index to check. That was worked until a recent
change in InnoDB after which it went into infinite recursion if update of
the used index wasn't properly detected.

The fix consists of 'used key being updated' detection code from 5.1.

Patch done by Evgeny Potemkin <evgeny.potemkin@oracle.com>
and transferred into the 5.5.25a release build by Joerg Bruehe.

This changeset is the difference between MySQL 5.5.25 and 5.5.25a.


VERSION:
  Version number change.
sql/sql_update.cc:
  Bug#65745: UPDATE ON INNODB TABLE ENTERS RECURSION
  The check for used key being updated is extended to cover the case when
  index merge is used.
2012-06-28 20:03:53 +02:00
Georgi Kodinov
107c894a54 Bug #13708485: malformed resultset packet crashes client
Several fixes :

* sql-common/client.c
Added a validity check of the fields metadata packet sent 
by the server.
Now libmysql will check if the length of the data sent by
the server matches what's expected by the protocol before
using the data.

* client/mysqltest.cc
Fixed the error handling code in mysqltest to avoid sending
new commands when the reading the result set failed (and 
there are unread data in the pipe).

* sql_common.h + libmysql/libmysql.c + sql-common/client.c
unpack_fields() now generates a proper error when it fails.
Added a new argument to this function to support the error 
generation.

* sql/protocol.cc
Added a debug trigger to cause the server to send a NULL
insted of the packet expected by the client for testing 
purposes.
2012-06-28 18:38:55 +03:00
Evgeny Potemkin
247262347e Bug#14248833: UPDATE ON INNODB TABLE ENTERS RECURSION
Introduction of cost based decision on filesort vs index for UPDATE
statements changed detection of the fact that the index used to scan the
table is being updated. The new design missed the case of index merge
when there is no single index to check. That was worked until a recent
change in InnoDB after which it went into infinite recursion if update of
the used index wasn't properly detected.

The fix consists of 'used key being updated' detection code from 5.1.

sql/sql_update.cc:
  Bug#14248833: UPDATE ON INNODB TABLE ENTERS RECURSION
  The check for used key being updated is extended to cover the case when
  index merge is used.
2012-06-28 16:53:45 +04:00
Norvald H. Ryeng
970da4bdf2 Null merge 5.1->5.5. 2012-06-28 14:36:26 +02:00
Norvald H. Ryeng
07a17e302c Merge. 2012-06-28 14:34:49 +02:00
Norvald H. Ryeng
2b91121e58 Merge 2012-06-28 14:07:21 +02:00
Michael Widenius
69b817755a Automatic merge with 5.5
Fixed failing test case
2012-06-27 19:49:59 +03:00
Michael Widenius
aa67a198e8 automatic merge with 5.5 2012-06-27 17:22:23 +03:00
Michael Widenius
44d8fe9646 Don't abort InnoDB/XtraDB if one can't allocate resources for AIO
- Better error messages

This fixes that one again can run the test systems with many threads without having to increase fs.aio-max-nr.


mysql-test/include/mtr_check.sql:
  Ignore the INNODB_USE_NATIVE_AIO variable (may change during execution)
mysql-test/mysql-test-run.pl:
  Ignore warnings for failure to setup AIO
storage/innobase/os/os0file.c:
  Continue without AIO even if we can't allocate resources for AIO
storage/xtradb/os/os0file.c:
  Continue without AIO even if we can't allocate resources for AIO
storage/xtradb/srv/srv0start.c:
  Give an error message (instead of core dump) if AIO can't be initialized
2012-06-27 17:13:12 +03:00
unknown
1b84c0cfee Fix for LP bug#1007622
TABLE_LIST::check_single_table made aware about fact that now if table attached to a merged view it can be (unopened) temporary table
(in 5.2 it was always leaf table or non (in case of several tables)).
2012-06-26 21:43:34 +03:00
Kent Boortz
5f86ecbf36 Solve a linkage problem with "libmysqld" on several Solaris platforms:
a multiple definition of 'THD::clear_error()' in (at least)
libmysqld.a(lib_sql.o) and libmysqld.a(libfederated_a-ha_federated.o).

Patch provided by Ramil Kalimullin.
2012-06-26 16:30:15 +02:00
Vladislav Vaintroub
072097174c fix compile error, when building with oqgraph 2012-06-25 18:17:24 +02:00
Igor Babaev
2954ed1ec9 Merge 5.3->5.5. 2012-06-24 09:10:11 -07:00
Igor Babaev
20f3f4a273 Merge 5.2->5.3 2012-06-23 15:00:05 -07:00
Igor Babaev
d9c3a3e39e Fixed bug mdev-360.
The bug was the result of the incomplete fix for bug lp bug 1008293.
2012-06-23 12:19:07 -07:00
Sergey Petrunya
f8f65accf9 Add back testcase for lp:817966 (was lost in the merge) 2012-06-23 20:12:54 +04:00
Sergey Petrunya
e7bfda3b3c Added comment about QUICK_RANGE_SELECT::free_cond being unused. 2012-06-22 14:14:22 +04:00
unknown
0697ee265f MDEV-181: XID crash recovery across binlog boundaries
Keep track of how many pending XIDs (transactions that are prepared in
storage engine and written into binlog, but not yet durably committed
on disk in the engine) there are in each binlog.

When the count of one binlog drops to zero, write a new binlog checkpoint
event, telling which is the oldest binlog with pending XIDs.

When doing XA recovery after a crash, check the last binlog checkpoint
event, and scan all binlog files from that point onwards for XIDs that
must be committed if found in prepared state inside engine.

Remove the code in binlog rotation that waits for all prepared XIDs to
be committed before writing a new binlog file (this is no longer necessary
when recovery can scan multiple binlog files).
2012-06-22 11:46:28 +02:00
unknown
9fe317ffd6 MDEV-225: Replace with dummy events an event that is not understood by a slave to which it should be sent
Add function to replace arbitrary event with dummy event.

Add code which uses this to fix the bug that enabling row_annotate events
on the master breaks slaves which do not request such events.

Add that slaves set a variable @mariadb_slave_capability to inform the
master in a robust way about which events it can, and cannot, handle.

Add tests.
2012-06-22 11:40:40 +02:00
Sergei Golubchik
c562c74478 MDEV-457 Inconsistent data truncation on datetime values with fractional seconds represented as strings with no delimiters
New implementation for str_to_datetime. Fix MDEV-457 and related issues.
2012-09-08 12:15:55 +02:00
unknown
048cc42052 MDEV-342: fix two race conditions in the test case that could occasionally cause spurious failures. 2012-06-22 10:42:55 +02:00
unknown
a5731b27b7 MDEV-342: Do not mark old binlog file as cleanly closed during rotate until
the new file is fully synced to disk and binlog index. This fixes a window
where a crash would leave next server restart unable to detect that a crash
occured, causing recovery to fail.
2012-06-21 21:17:34 +02:00
unknown
e7362d457a MDEV-359: Fix another case where switch-off semisync could cause a race that ended with server crash.
This one was when the code releases and reaquires the lock with pthread_cond_wait() - and semisync is switched off meanwhile.
2012-06-21 19:02:53 +02:00
unknown
60561ae613 Fix for LP bug#1001505 and LP bug#1001510
We set correct cmp_context during preparation to avoid changing it later by Item_field::equal_fields_propagator.
(see mysql bugs #57135 #57692 during merging)
2012-06-21 18:47:13 +03:00
Sergei Golubchik
14b756c739 Use the portable form of INSTALL PLUGIN in rpl_mdev359.test 2012-06-21 17:39:21 +02:00
Joerg Bruehe
5c724f7b94 Fixing wrong comment syntax (discovered by Kent) 2012-06-21 16:26:50 +02:00
Sergei Golubchik
c2ca301cd8 fixing the order of includes in the rpl_mdev359.test 2012-06-21 14:00:19 +02:00
Sergey Petrunya
eeea010fdc Update test results (checked) 2012-06-21 14:33:36 +04:00
unknown
5e13093df1 MDEV-359: Server crash when SET GLOBAL rpl_semi_sync_master_enabled = OFF
The semisync code does a fast-but-unsafe check for enabled or not without lock,
followed by a slow-but-safe check under lock. However, if the slow check failed,
the code still referenced not valid data (in an assert() expression), causing a
crash.

Fixed by not running the incorrect assert when semisync is disabled.
2012-06-21 11:52:54 +02:00
Sergei Golubchik
39005ea06f MDEV-349 5.5 xtradb innodb_prefix_index_liftedlimit crash with valgrind
This is XtraDB bug lp:1015109, introduced by innodb_split_buf_pool_mutex.patch

Comment the offending assertion, until the fixed XtraDB is available
2012-06-21 11:26:53 +02:00
Vladislav Vaintroub
49cadc9114 MDEV-361 - Fix handle leak in os_thread_create (Windows) 2012-06-21 00:49:24 +02:00
Sergey Petrunya
20de3c8968 Update test results. 2012-06-20 22:30:24 +04:00
unknown
166d4c1feb Fix memory leak introduced with merge of mysql 5.5.
MySQL introduced a class Deferred_log_events. This class keeps a pointer
last_added. The code was keeping this pointer around even after the memory
pointed to was freed, and later comparing the bogus pointer against other
allocated memory. This is illegal, and can randomly produce false equal
comparisons depending on whatever the malloc() subsystem decides to return.
2012-06-20 14:23:23 +02:00
Michael Widenius
3aef21344f Automatic merge 2012-06-20 14:50:44 +03:00
Michael Widenius
4f703fe70b Fixed MDEV-348: 5.5 valgrind warinings on maria tests 2012-06-20 14:37:37 +03:00
Kent Boortz
983fcfaf62 Version for this release build is 5.1.64 2012-06-20 13:10:13 +02:00
Kent Boortz
a09838f6b0 Merge 2012-06-20 13:06:32 +02:00
Sergey Petrunya
8c762965d3 Merge 5.3 -> 5.5 2012-06-20 15:01:28 +04:00
Sergey Petrunya
584d923c32 Post-merge fixes:
- put back the result encoding in func_in.result (messed up by kdiff3)
- update .result for other tests (checked)
2012-06-20 13:41:31 +04:00
unknown
0b93b444b6 Merged the fix for bug lp:944706, mdev-193 2012-06-19 15:06:45 +03:00