Commit graph

16751 commits

Author SHA1 Message Date
guilhem@gbichot3.local
fdb0f85a0c * Mixed replication mode * :
1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog":
a stored function inserting into two such tables may fail to replicate
(inserting wrong data in the slave's copy of the second table) if the slave's
second table had an internal auto_increment counter different from master's.
Because the auto_increment value autogenerated by master for the 2nd table
does not go into binlog, only the first does, so the slave lacks information.
To fix this, if running in mixed binlogging mode, if the stored function or
trigger plans to update two different tables both having auto_increment
columns, we switch to row-based for the whole function.
We don't have a simple solution for statement-based binlogging mode, there
the bug remains and will be documented as a known problem.
Re-enabling rpl_switch_stm_row_mixed.
2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored
functions, triggers, views", which was a documented limitation (in mixed
mode, we didn't detect that a stored function's execution needed row-based
binlogging (due to some UUID() call for example); same for
triggers, same for views (a view created from a SELECT UUID(), and doing
INSERT INTO sometable SELECT theview; would not replicate row-based).
This is implemented by, after parsing a routine's body, remembering in sp_head
that this routine needs row-based binlogging. Then when this routine is used,
the caller is marked to require row-based binlogging too.
Same for views: when we parse a view and detect that its SELECT needs
row-based binary logging, we mark the calling LEX as such.
3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog":
a temporary table containing e.g. UUID has its changes not binlogged,
so any query updating a permanent table with data from the temporary table
will run wrongly on slave. Solution: in mixed mode we don't switch back
from row-based to statement-based when there exists temporary tables.
4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog;
impossible due to BUG#11312 and BUG#20329, but test is in place for when
they are fixed.
2006-07-09 17:00:47 +02:00
mikael@dator5.(none)
d5bb513021 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1
into  dator5.(none):/home/pappa/bug17138
2006-07-01 19:47:24 -04:00
mikael@dator5.(none)
55109a802d Merge dator5.(none):/home/pappa/bug20583
into  dator5.(none):/home/pappa/bug17138
2006-07-01 00:28:04 -04:00
mikael@dator5.(none)
9e56572e5c Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug20583
2006-07-01 00:22:25 -04:00
mikael@dator5.(none)
5853823bb2 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug17138
2006-07-01 00:19:23 -04:00
mikael@dator5.(none)
4e390d711a BUG#17138: Crashes in stored procedure
Last round of review fixes
2006-07-01 00:01:37 -04:00
evgen@moonbone.local
1459784aba Reverted wrong bug fix (Bug#11228) 2006-07-01 01:37:20 +04:00
evgen@moonbone.local
a989f7261e Merge moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
into moonbone.local:/work/merge-5.1
2006-06-30 16:10:26 +04:00
monty@hasky.mysql.fi
0b00ae6bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-29 23:41:33 +03:00
monty@mysql.com
8eb9c06d70 Replaced assert with argument checking, as rpl_ndb_UUID caused slave to fail on x86 64 bit
(It failed even if test was marked as skipped)
2006-06-29 23:22:55 +03:00
tomas@poseidon.ndb.mysql.com
3b3dde6f4e Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-29 22:13:19 +02:00
tomas@poseidon.ndb.mysql.com
5d67b05203 corrected merge error 2006-06-29 22:11:29 +02:00
tomas@poseidon.ndb.mysql.com
9d902d4cf8 manual merge 2006-06-29 21:25:37 +02:00
tomas@poseidon.ndb.mysql.com
6f318d1658 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2006-06-29 21:05:43 +02:00
tomas@poseidon.ndb.mysql.com
87460ec76a Bug #19202 Incorrect errorhandling in select count(*) wrt temporary error 2006-06-29 20:55:21 +02:00
lars@dl145k.mysql.com
f3d8d60259 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-06-29 14:24:02 +02:00
tomas@poseidon.ndb.mysql.com
0d22cc662b Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-29 10:48:31 +02:00
gkodinov@mysql.com
3447374939 Merge mysql.com:/home/kgeorge/mysql/4.1/warnings
into  mysql.com:/home/kgeorge/mysql/5.0/warnings
2006-06-29 10:46:30 +03:00
gkodinov@mysql.com
9dbb09182b Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/warnings
2006-06-29 10:36:08 +03:00
monty@narttu.mysql.fi
7b0f8635ae Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-29 00:09:53 +03:00
monty@narttu.mysql.fi
91c3e28d77 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-28 20:03:46 +03:00
evgen@moonbone.local
82369c4e65 Manual merge 2006-06-28 19:34:04 +04:00
tomas@poseidon.ndb.mysql.com
470087cb58 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-28 17:20:01 +02:00
tomas@poseidon.ndb.mysql.com
63c72dc02b Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-28 17:12:18 +02:00
lars@dl145k.mysql.com
d4f7943594 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-06-28 16:44:54 +02:00
gkodinov@mysql.com
96ceb6c234 gcc 4.1 linux warning fixes backported from 5.0. 2006-06-28 16:28:29 +03:00
lars@mysql.com
c75584d8d9 Merge mysql.com:/users/lthalmann/bk/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/mysql-5.1-new-rpl
2006-06-28 15:27:25 +02:00
gkodinov@mysql.com
2cda7f5d80 4.1->5.0 merge for bug #16458 2006-06-28 15:53:54 +03:00
stewart@willster.(none)
1cc537d9fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  mysql.com:/home/stewart/Documents/MySQL/5.1/bug20725
2006-06-28 22:47:25 +10:00
stewart@willster.(none)
c19578fbfd Merge mysql.com:/home/stewart/Documents/MySQL/5.1/ndb
into  mysql.com:/home/stewart/Documents/MySQL/5.1/merge
2006-06-28 22:16:04 +10:00
monty@mysql.com
31fdcd3be0 Added purecov comment for new, not executed code for my recent changeset
(Found by dgcov)
2006-06-28 14:03:08 +03:00
stewart@willster.(none)
a61cf1116e Merge mysql.com:/home/stewart/Documents/MySQL/5.0/bug11459
into  mysql.com:/home/stewart/Documents/MySQL/5.1/merge
2006-06-28 18:21:37 +10:00
gluh@eagle.intranet.mysql.r18.ru
3e22ea44e5 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-kt
2006-06-28 11:55:15 +05:00
jonas@perch.ndb.mysql.com
b26e651f98 Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
2006-06-28 08:47:43 +02:00
aivanov@mysql.com
0a9c238993 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/alexi/bugs/mysql-5.0-19208
2006-06-28 10:24:10 +04:00
aivanov@mysql.com
7dc30c68f4 Fixing BUG#17719 "Delete of binlog files fails on Windows"
and BUG#19208 "Test 'rpl000017' hangs on Windows".
 Both bugs are caused by attempting to delete an opened
 file and to create immediatedly a new one with the same
 name. On Windows it can be supported only on NT-platforms
 (by using FILE_SHARE_DELETE mode and with renaming the
 file before deletion). Because deleting not-closed files
 is not supported on all platforms (e.g. Win 98|ME) this
 is to be considered harmful and should be eliminated by
 a "code redesign".
2006-06-28 10:21:01 +04:00
tomas@poseidon.ndb.mysql.com
a23259c2ef Bug #20705 table truncation from one mysqld causes ERROR 1412 on other mysqld servers
- make sure to invalidate even if table is not binlogged
2006-06-28 02:35:13 +02:00
tomas@poseidon.ndb.mysql.com
ec4738fcf0 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-27 22:27:25 +02:00
tomas@poseidon.ndb.mysql.com
9791d53445 partition functions to pass create_info, not only max_rows 2006-06-27 22:19:27 +02:00
gkodinov@mysql.com
be3c4a154f Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/B16458
2006-06-27 18:47:22 +03:00
stewart@mysql.com
bd54e6769b BUG#20725 MySQLD cluster use "fast count" is broken
fix based on review by tomas.

conform to bug we haven't fixed yet.
2006-06-28 01:28:07 +10:00
stewart@mysql.com
bc91efe0ae BUG#20725 MySQLD cluster use "fast count" is broken
Post recent handler changes, fast count(*) for cluster was broken.

Seeing as we maintain an exact count for ndb, we can easily use this for an optimisation.

With this patch, and use_exact_count DISABLED, we will use the fast way
of getting count(*) but not use the exact count for the optimiser.

With this patch and use_exact_count ENABLED, we will use the fast way of
getting count(*) and use the exact count for the optimiser.
2006-06-28 01:07:44 +10:00
gkodinov@mysql.com
7149f48d97 Merge mysql.com:/home/kgeorge/mysql/4.1/B16458
into  mysql.com:/home/kgeorge/mysql/5.0/B16458
2006-06-27 17:59:49 +03:00
gkodinov@mysql.com
9ec681ef35 Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
'SELECT DISTINCT a,b FROM t1' should not use temp table if there is unique 
index (or primary key) on a.
There are a number of other similar cases that can be calculated without the
use of a temp table : multi-part unique indexes, primary keys or using GROUP BY 
instead of DISTINCT.
When a GROUP BY/DISTINCT clause contains all key parts of a unique
index, then it is guaranteed that the fields of the clause will be
unique, therefore we can optimize away GROUP BY/DISTINCT altogether.
This optimization has two effects:
* there is no need to create a temporary table to compute the
   GROUP/DISTINCT operation (or the temporary table will be smaller if only GROUP 
   is removed and DISTINCT stays or if DISTINCT is removed and GROUP BY stays)
* this causes the statement in effect to become updatable in Connector/Java
because the result set columns will be direct reference to the primary key of 
the table (instead to the temporary table that it currently references). 

Implemented a check that will optimize away GROUP BY/DISTINCT for queries like 
the above.
Currently it will work only for single non-constant table in the FROM clause.
2006-06-27 17:40:19 +03:00
gluh@eagle.intranet.mysql.r18.ru
49afa7d075 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-kt
2006-06-27 18:24:14 +05:00
tomas@poseidon.ndb.mysql.com
08bec7b954 changed signature of get_default_no_partitions 2006-06-27 14:31:34 +02:00
holyfoot@deer.(none)
1530106bac Merge mysql.com:/home/hf/work/mysql-5.0.19672
into mysql.com:/home/hf/work/mysql-5.1.clean
2006-06-27 15:22:43 +05:00
tomas@poseidon.ndb.mysql.com
18e008a1ba Bug #19852 Restoring backup made from cluster with full data memory fails
- correction of previous patch
2006-06-27 11:26:00 +02:00
tomas@poseidon.ndb.mysql.com
f923d6395d Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-06-27 11:22:42 +02:00
tomas@poseidon.ndb.mysql.com
95447f9d1a Bug #19852 Restoring backup made from cluster with full data memory fails
- make sure to allocate just enough pages in the fragments by using the actual
  row count from the backup, to avoid over allocation of pages to fragments, and
  thus avoid the bug
2006-06-27 10:02:58 +02:00