Commit graph

59922 commits

Author SHA1 Message Date
Magne Mahre
0482b6ebca WL#5154 Remove deprecated 4.1 features
Several items said to be deprecated in the 4.1 manual
have never been removed.  This worklog adds deprecation
warnings when these items are used, and warns the user 
that the items will be removed in MySQL 5.6.

A couple of previously deprecation decision have been
reversed (see single file comments)
2010-01-21 09:10:05 +01:00
Davi Arnaut
cdcf2ae9f9 Apply patch on behalf of Magnus:
3325 Magnus Blåudd    2010-01-05
     Bug #49860 new compiler warning ha_archive
      - fix compiler warning by casting to ulong
2010-01-20 22:22:20 -02:00
Davi Arnaut
ec6e4ffa67 Apply patch on behalf of the NDB team:
3321 Magnus Blåudd    2010-01-05
     BUG#44840 - ndbapi compiler warning - type qualifier ignored for function return type
      - Remove the "const"
      - NOTE! This is an ABI incompatible change for some C++ compilers, NdbApi applications
        using any of the four changed functions may need a recompile if it's using dynamic linking.
2010-01-20 22:21:18 -02:00
Alfranio Correia
0aa3aee0da BUG#46364 MyISAM transbuffer problems (NTM problem)
It is well-known that due to concurrency issues, a slave can become
inconsistent when a transaction contains updates to both transaction and
non-transactional tables in statement and mixed modes.

In a nutshell, the current code-base tries to preserve causality among the
statements by writing non-transactional statements to the txn-cache which
is flushed upon commit. However, modifications done to non-transactional
tables on behalf of a transaction become immediately visible to other
connections but may not immediately get into the binary log and therefore
consistency may be broken.

In general, it is impossible to automatically detect causality/dependency
among statements by just analyzing the statements sent to the server. This
happen because dependency may be hidden in the application code and it is
necessary to know a priori all the statements processed in the context of
a transaction such as in a procedure. Moreover, even for the few cases that
we could automatically address in the server, the computation effort
required could make the approach infeasible.

So, in this patch we introduce the option
    - "--binlog-direct-non-transactional-updates" that can be used to bypass
    the current behavior in order to write directly to binary log statements
    that change non-transactional tables.
2010-01-20 19:08:16 +00:00
Mattias Jonsson
fdf1441a5a post-push patch for bug#47343.
Missing ha_rnd_end in copy_partitions, found due to a
DBUG_ASSERT in mysql-pe
2010-01-19 17:02:51 +01:00
Luis Soares
22cff39274 Fix for BUG#49481 and BUG#49482 reverted.
PB2 run uncovered issue that needs further analysis.
2010-01-19 00:10:00 +00:00
Alexander Nozdrin
8a433bc4dc Manual merge from mysql-trunk.
Conflicts:
  - support-files/mysql.spec.sh
2010-01-18 23:15:17 +03:00
Mattias Jonsson
be2a015e12 merge 2010-01-17 22:00:37 +01:00
6f380d1650 BUG#47418 RBR fails, failure with mixup of base/temporary/view
'CREATE TABLE IF NOT EXISTS ... SELECT' statement were causing 'CREATE
TEMPORARY TABLE ...' to be written to the binary log in row-based 
mode (a.k.a. RBR), when there was a temporary table with the same name.
Because the 'CREATE TABLE ... SELECT' statement was executed as 
'INSERT ... SELECT' into the temporary table. Since in RBR mode no 
other statements related to temporary tables are written into binary log,
this sometimes broke replication.

This patch changes behavior of 'CREATE TABLE [IF NOT EXISTS] ... SELECT ...'.
it ignores existence of temporary table with the 
same name as table being created and is interpreted
as attempt to create/insert into base table. This makes behavior of
'CREATE TABLE [IF NOT EXISTS] ... SELECT' consistent with
how ordinary 'CREATE TABLE' and 'CREATE TABLE ... LIKE' behave.
2010-01-16 15:44:24 +08:00
karen.langford@sun.com
35960b6137 Raise version number after cloning 5.1.43 2010-01-15 18:03:48 +01:00
Georgi Kodinov
440f5a9cad Bug #46175: NULL read_view and consistent read assertion
The optimizer must not continue executing the current query
if e.g. the storage engine reports an error.
This is somewhat hard to implement with Item::val_xxx()
because they do not have means to return error code.
This is why we need to check the thread's error state after
a call to one of the Item::val_xxx() methods.

Fixed store_key_item::copy_inner() to return an error state 
if an error happened during the call to Item::save_in_field() 
because it calls Item::val_xxx().
Also added similar checks to related places.
2010-01-15 16:09:20 +02:00
Alexey Kopytov
82ba3e1dbc Manual merge from mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
Text conflict in mysql-test/t/mysqlbinlog.test
Text conflict in sql/sql_acl.cc
Text conflict in sql/sql_servers.cc
Text conflict in sql/sql_update.cc
Text conflict in support-files/mysql.spec.sh
2010-01-15 14:26:53 +03:00
sunanda.menon@sun.com
dede1549d6 Raise version number after cloning 5.0.90 2010-01-15 10:35:35 +01:00
Georgi Kodinov
6d66e66030 merge 2010-01-15 11:06:46 +02:00
Georgi Kodinov
30a8c53a9c merge of version change.
Added not_embedded to the new dbug_sync test file.
2010-01-15 10:51:39 +02:00
MySQL Build Team
00c1e8076f Automerge the 5.5.1-m2 release back into the main branch. 2010-01-15 01:10:40 +01:00
MySQL Build Team
5b16bedaf5 Automerge main branch with Trondheim copy. 2010-01-15 00:59:11 +01:00
Luis Soares
a0a5152fb3 Fix for BUG#49481 and BUG#49482.
BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on delete: 
cant find record
      
BUG#49482: RBR: Replication may break on deletes when MyISAM tables + 
char field are used

When using MyISAM tables, despite the fact that the null bit is
set for some fields, their old value is still in the row. This
can cause the comparison of records to fail when the slave is
doing an index or range scan.

We fix this by avoiding memcmp for MyISAM tables when comparing
records. Additionally, when comparing field by field, we first
check if both fields are not null and if so, then we compare
them. If just one field is null we return failure immediately. If
both fields are null, we move on to the next field.
2010-01-14 14:26:51 +00:00
Luis Soares
c374c2bd2f BUG#50018: binlog corruption when table has many columns
Small fix in the test case. Changed the UNLOCK tables 
to happen after each insert.
2010-01-14 10:49:40 +00:00
Luis Soares
36a4772e2d BUG#50018: automerge from 5.1-bt local --> 5.1-bt local latest. 2010-01-14 10:47:23 +00:00
Georgi Kodinov
c00701a48c version change 2010-01-14 10:24:02 +02:00
Kristofer Pettersson
48db75d8ad automerge 2010-01-13 15:01:49 +01:00
Kristofer Pettersson
da877f64fe Bug#33982 debug assertion and crash reloading grant tables after sighup or kill
In certain rare cases when a process was interrupted
during a FLUSH PRIVILEGES operation the diagnostic
area would be set to an error state but the function
responsible for the operation would still signal
success. This would lead to a debug assertion error
later on when the server would attempt to reset the
DA before sending the error message.

This patch fixes the issue by assuring that
reload_acl_and_cache() always fails if an error
condition is raised.

The second issue was that a KILL could cause
a console error message which referred to a DA
state without first making sure that such a
state existed.

This patch fixes this issue in two different
palces by first checking DA state before
fetching the error message.
2010-01-13 12:39:00 +01:00
Martin Hansson
b9d37b83a6 Merge of fix for Bug#48157. 2010-01-13 12:38:06 +01:00
Ramil Kalimullin
18be529bb5 Auto-merge. 2010-01-13 15:08:48 +04:00
Ramil Kalimullin
032822a62e Auto-merge. 2010-01-13 15:04:59 +04:00
Georgi Kodinov
748ff84ef3 merge 2010-01-13 12:47:42 +02:00
Georgi Kodinov
b433f7f23a version change 2010-01-13 12:43:07 +02:00
Joerg Bruehe
1e5d0f08b5 Automerge from parent - no conflicts. 2010-01-13 11:36:48 +01:00
Georgi Kodinov
c3ba50ade1 merge 5.1-main to 5.1-bugteam 2010-01-13 12:28:42 +02:00
Ramil Kalimullin
14afe5c4ce Auto-merge. 2010-01-13 14:11:42 +04:00
Sven Sandberg
94946c6807 BUG#49222: Mark RAND() as unsafe
Problem: When RAND() is binlogged in statement mode, the seed is
binlogged too, so the replication slave generates the same
sequence of random numbers. This makes replication work in many
cases, but not in all cases: the order of rows is not guaranteed
for, e.g., UPDATE or INSERT...SELECT statements, so the row data
will be different if master and slave retrieve the rows in
different orders.
Fix: Mark RAND() as unsafe. It will generate a warning if
binlog_format=STATEMENT and switch to row-logging if
binlog_format=ROW.
2010-01-13 10:00:03 +01:00
Ramil Kalimullin
5622b586d9 Fix for bug#50227: Pre-auth buffer-overflow in mySQL through yaSSL
Problem: copying issuer's (or subject's) name tags into an internal
buffer from incoming stream we didn't check the buffer overflow. 
That may lead to memory overrun, crash etc.

Fix: ensure we don't overrun the buffer.

Note: there's no simple test case (exploit needed).
2010-01-13 09:20:45 +04:00
Gleb Shchepa
30212033ed Bug #50096: CONCAT_WS inside procedure returning wrong data
Selecting of the CONCAT_WS(...<PS parameter>...) result into
a user variable may return wrong data.

Item_func_concat_ws::val_str contains a number of memory
allocation-saving optimization tricks. After the fix
for bug 46815 the control flow has been changed to a
branch that is commented as "This is quite uncommon!":
one of places where we are trying to concatenate
strings inplace. However, that "uncommon" place
didn't care about PS parameters, that have another
trick in Item_sp_variable::val_str(): they use the
intermediate Item_sp_variable::str_value field,
where they may store a reference to an external
argument's buffer.

The Item_func_concat_ws::val_str function has been
modified to take into account val_str functions
(such as Item_sp_variable::val_str) that return a
pointer to an internal Item member variable that
may reference to a buffer provided.
2010-01-13 08:16:36 +04:00
Martin Hansson
e57ea46d5a Bug#48157: crash in Item_field::used_tables
MySQL handles the join syntax "JOIN ... USING( field1,
... )" and natural joins by building the same parse tree as
a corresponding join with an "ON t1.field1 = t2.field1 ..."
expression would produce. This parse tree was not cleaned up
properly in the following scenario. If a thread tries to
lock some tables and finds that the tables were dropped and
re-created while waiting for the lock, it cleans up column
references in the statement by means a per-statement free
list. But if the statement was part of a stored procedure,
column references on the stored procedure's free list weren't
cleaned up and thus contained pointers to freed objects.

Fixed by adding a call to clean up the current prepared
statement's free list.
2010-01-12 15:16:26 +01:00
Joerg Bruehe
b0dad6edf4 Upmerge the changes for RPM versioning/naming from 5.0 to 5.1.
This includes "MYSQL_U_SCORE_VERSION" in "configure.in".
2010-01-12 12:57:51 +01:00
Joerg Bruehe
789352e87b Implement the change of RPM versioning and file naming:
- "release" starts from 1
- "level" ("m2", "rc", ...) is included in the RPM version.
2010-01-12 12:41:18 +01:00
Joerg Bruehe
685166a5e1 Merge from main tree,
but don't take the "tree name" change.
2010-01-12 12:12:42 +01:00
Joerg Bruehe
684405a5d3 Implement the change of RPM versioning and file naming:
- "release" starts from 1
- "level" ("m2", "rc", ...) is included in the RPM version.
2010-01-11 19:23:36 +01:00
Gleb Shchepa
ff55967d42 manual merge 5.0-bugteam --> 5.1-bugteam (bug 49955) 2010-01-11 18:31:06 +04:00
Gleb Shchepa
94acd48041 Bug #49955: ld error message: undefined reference to `strmov_overlapp'
32bit builds with the --enable-assembler flag (enabled by default)
fail with an error message: undefined reference to `strmov_overlapp'.

Since the fix for bug 48866 we use a home-grown strmov function
instead of the ctpcpy function, but the source file for this
function was missed in the Makefile.am.

The strings/Makefile.am file has been modified to include strmov.c
file into ASSEMBLER_x86 and ASSEMBLER_sparc32 sections.
2010-01-11 18:21:22 +04:00
2ae528aaae Postfix
Recover the right contents of the index file at the end of the test case.
2010-01-08 23:32:40 +08:00
8c677779ff BUG #28421 Infinite loop on slave relay logs
Manually deleteing one or more entries from 'master-bin.index', will
cause master infinitely loop to send one binlog file. 

When starting a dump session, master opens index file and search the binlog file
which is being requested by the slave. The position of the binlog file in the
index file is recorded. it will be used to find the next binlog file when current
binlog file has dumped completely. As only the position is used, it may
not get the correct file if some entries has been removed manually from the index file.
the master will reopen the current binlog file which has been dump completely
and redump it if it can not get the next binlog file's name from index file.
It obviously is a logical error.


Even though it is allowed to manually change index file,
but it is not recommended. so after this patch, master
sends a fatal error to slave and close the dump session if a new binlog file
has been generated and master can not get it from the index file.
2010-01-08 13:42:23 +08:00
Luis Soares
4c4c7b0908 BUG#50018: binlog corruption when table has many columns
Some improvements on the test case as suggested during review.
2010-01-07 17:45:54 +00:00
Luis Soares
0597dc7c9c merge: 5.1-bugteam bug branch --> 5.1 bugteam latest. 2010-01-07 10:34:27 +00:00
Georgi Kodinov
870a8cde9c Addendum to Bug #49734 : fixed an unstable test case. 2010-01-06 12:24:51 +02:00
917024b2e9 Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE
Fixed valgrind failure on PB2.
2010-01-06 13:28:06 +08:00
fd931d7bf7 Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE
Fixed valgrind failure on PB2.
2010-01-06 13:12:40 +08:00
7e2078c995 Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE
Fixed valgrind failure on PB2.
2010-01-06 10:44:14 +08:00
cae9c79772 Bug #49137 Replication failure on SBR/MBR + multi-table DROP TEMPORARY TABLE
Fixed valgrind failure on PB2.
2010-01-06 10:36:29 +08:00