Commit graph

49160 commits

Author SHA1 Message Date
tomas@whalegate.ndb.mysql.com
afb817e95a Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-29 09:50:20 +02:00
tomas@whalegate.ndb.mysql.com
53eaf05bb2 Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue
- reverting patch as there where unknows sideeffects that we do not have time to follow up on just now
2007-08-29 09:44:37 +02:00
tsmith@ramayana.hindu.god
0af6a5fa9e Fix another compiler warning on Windows in InnoDB. 2007-08-28 10:17:15 -06:00
rafal@quant.(none)
88b8ad10c5 A fix for handling endianess in Field_blob::unpack(). 2007-08-28 10:37:29 +02:00
rafal@quant.(none)
7d72a132b6 Merge quant.(none):/ext/mysql/bk/mysql-5.1-bug21842-5.1.22
into  quant.(none):/ext/mysql/bk/mysql-5.1-bug21842-5.1.22-merge
2007-08-28 10:24:40 +02:00
rafal@quant.(none)
c55627e9e2 BUG#21842: Exclude Rows_log_event members used in event application if
not compiled as a replication server - a fix from rpl clone now applied
to 5.1.22 tree.
2007-08-28 10:14:45 +02:00
tomas@whalegate.ndb.mysql.com
17f751ed05 correct compile error 2007-08-28 07:55:07 +02:00
tomas@whalegate.ndb.mysql.com
148bd2158a Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-28 07:45:14 +02:00
tomas@whalegate.ndb.mysql.com
037f79a43c Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue 2007-08-28 07:42:43 +02:00
tsmith@ramayana.hindu.god
82a3e8cfaf Fix some Windows compiler warnings. 2007-08-27 18:18:14 -06:00
rafal@quant.(none)
0924d086f7 Merge quant.(none):/ext/mysql/bkroot/mysql-5.1-target-5.1.22
into  quant.(none):/ext/mysql/bk/mysql-5.1-bug21842-5.1.22-merge
2007-08-27 22:51:13 +02:00
tsmith@ramayana.hindu.god
2c44def1ee Bug #30389: connection_id() always return 0 in embedded server
Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.
2007-08-27 14:31:27 -06:00
tsmith@ramayana.hindu.god
c0fd09224b Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  ramayana.hindu.god:/home/tsmith/m/bk/51-target22-X
2007-08-27 14:23:02 -06:00
tsmith@ramayana.hindu.god
7dbef328be Bug #30412 and Bug #30413
Update some tests in the "parts" suite, so they're skipped if the
requisite plugins are not present in the mysqld.
2007-08-27 14:12:12 -06:00
tsmith@ramayana.hindu.god
220cd12f0b Fixes for the following bugs:
Bug #30316: Some "parts" tests fail because the server uses "--secure-file-priv"
Bug #30341: Test suite "parts" needs to be adapted to the new rules disallowing many functio
Bug #30408: Suite "parts" needs bug numbers updated
Bug #30411: Suite "parts" needs bug numbers updated: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir
Bug #30581: partition_value tests use disallowed CAST() function

Included are some general fixes to allow the "parts" test suite to be run
successfully.  This includes disabling a few tests or parts of tests,
cleaning up the test cases and their results, etc.  Basically, these tests
have not been run for some time, and had suffered some bit rot.

The bugs were fixed as a single changeset, because in some ways they depend
on each other.  I couldn't be sure I'd updated all the error codes (for
bugs 30408 and 30411) without also adapting to the new allowed functions
rules (bug 30341), and vice versa.
2007-08-27 14:08:32 -06:00
rafal@quant.(none)
95bece5d11 Merge quant.(none):/ext/mysql/bk/mysql-5.1-bug21842-5.1.22
into  quant.(none):/ext/mysql/bk/mysql-5.1-bug21842-5.1.22-merge
2007-08-27 21:15:20 +02:00
rafal@quant.(none)
3584a4d400 BUG#21842: There was an inconsistency in the use of table->record[0] and
table->record[1] buffers inside Rows_log_event::find_row() function. 
The patch fixes this.
2007-08-27 20:22:04 +02:00
tsmith@ramayana.hindu.god
549ed88635 Bug #30648: Partition handler may not initialize variable used w/ autoincrement
A local variable may be used uninitialized in 
ha_partition::get_auto_increment().  Initialize it properly.
2007-08-27 11:46:34 -06:00
tomas@whalegate.ndb.mysql.com
7d23f75534 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-27 15:41:24 +02:00
tomas@whalegate.ndb.mysql.com
e1f827da84 Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue 2007-08-27 15:40:49 +02:00
gkodinov/kgeorge@magare.gmz
7a486b927f Merge bk-internal:/home/bk/mysql-5.1-target-5.1.22
into  magare.gmz:/home/kgeorge/mysql/work/mysql-5.1-target-5.1.22-joro
2007-08-27 15:08:55 +03:00
gkodinov/kgeorge@magare.gmz
240e9329e7 portation fixes for bug 29536 and 29325 in
re-pushing for 5.1.22.
2007-08-27 15:01:29 +03:00
joerg@trift2.
30fdecb393 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  trift2.:/MySQL/M51/target-5.1.22
2007-08-27 13:59:32 +02:00
joerg@trift2.
cb279c906a Merge trift2.:/MySQL/M51/netware3-5.1
into  trift2.:/MySQL/M51/target-5.1.22
2007-08-27 13:53:23 +02:00
joerg@trift2.
e42afa010d More cleanup / fixing for NetWare:
1) "test_db.sql" is a plaintext file, no binary;
2) do not try to strip the binaries, it will not work.
2007-08-27 13:30:22 +02:00
tomas@whalegate.ndb.mysql.com
857a157c3c Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-27 13:14:37 +02:00
tomas@whalegate.ndb.mysql.com
c45f5bc691 repair some rpl_ndb test cases 2007-08-27 13:13:00 +02:00
gkodinov/kgeorge@magare.gmz
424e70353f re-push of Bug 29536 for 5.1.22: timestamp inconsistent in replication around 1970
MySQL replicates the time zone only when operations that involve
it are performed. This is controlled by a flag. But this flag
is set only on successful operation.
The flag must be set also when there is an error that involves
a timezone (so the master would replicate the error to the slaves).
2007-08-27 12:33:57 +03:00
gkodinov/kgeorge@magare.gmz
56a880179f recommit of Bug 25228 for 5.1.22: rpl_relayspace.test fails on powermacg5, vm-win2003-32-a
A test case was waiting for a fixed number of seconds for a specific 
  state of the slave IO thread to take place.
  Fixed by waiting in a loop for that specific thread state instead 
  (or timeout).
2007-08-27 12:21:47 +03:00
gkodinov/kgeorge@magare.gmz
682258a699 recommit of Addendum to bug #29325 to 5.1.22 tree
keep_files_on_create made a startup option
2007-08-27 12:15:01 +03:00
rafal@quant.(none)
f8b64e17f9 BUG#21842 (Cluster fails to replicate to innodb or myisam with err 134
using TPC-B):
 
Problem: A RBR event can contain incomplete row data (only key value and
fields which have been changed). In that case, when the row is unpacked
into record and written to a table, the missing fields get incorrect NULL
values leading to master-slave inconsistency.
 
Solution: Use values found in slave's table for columns which are not given
in the rows event. The code for writing a single row uses the following 
algorithm: 

1. unpack row_data into table->record[0],
2. try to insert record,
3. if duplicate record found, fetch it into table->record[0],
4. unpack row_data into table->record[0],
5. write table->record[0] into the table.

Where row_data is the row as stored in the data area of a rows event. 
Thus:

a) unpacking of row_data happens at the time when row is written into 
 a table,

b) when unpacking (in step 4), only columns present in row_data are 
 overwritten - all other columns remain as they were found in the table.
 
Since all data needed for the above algorithm is stored inside 
Rows_log_event class, functions which locate and write rows are turned 
into methods of that class.

replace_record()     -> Rows_log_event::write_row()
find_and_fetch_row() -> Rows_log_event::find_row()

Both methods take row data from event's data buffer - the row being 
processed is pointed by m_curr_row. They unpack the data as needed into 
table's record buffers record[0] or record[1]. When row is unpacked, 
m_curr_row_end is set to point at next row in the data buffer.

Other changes introduced in this changeset:

- Change signature of unpack_row(): don't report errors and don't
setup table's rw_set here. Errors can happen only when setting default 
values in prepare_record() function and are detected there.
 
- In Rows_log_event and derived classes, don't pass arguments to
the execution primitives (do_...() member functions) but use class
members instead.

- Move old row handling code into log_event_old.cc to be used by 
*_rows_log_event_old classes.

Also, a new test rpl_ndb_2other is added which tests basic replication 
from master using ndb tables to slave storing the same tables using 
(possibly) different engine (myisam,innodb).
  
Test is based on existing tests rpl_ndb_2myisam and rpl_ndb_2innodb. 
However, these tests doesn't work for various reasons and currently are 
disabled (see BUG#19227).
  
The new test differs from the ones it is based on as follows:
  
1. Single test tests replication with different storage engines on slave 
(myisam, innodb, ndb).
  
2. Include file extra/rpl_tests/rpl_ndb_2multi_eng.test containing 
original tests is replaced by extra/rpl_tests/rpl_ndb_2multi_basic.test 
which doesn't contain tests using partitioned tables as these don't work 
currently. Instead, it tests replication to a slave which has more or 
less columns than master.
  
3. Include file include/rpl_multi_engine3.inc is replaced with 
include/rpl_multi_engine2.inc. The later differs by performing slightly 
different operations (updating more than one row in the table) and 
clearing table with "TRUNCATE TABLE" statement instead of "DELETE FROM" 
as replication of "DELETE" doesn't work well in this setting.
  
4. Slave must use option --log-slave-updates=0 as otherwise execution of 
replication events generated by ndb fails if table uses a different 
storage engine on slave (see BUG#29569).
2007-08-26 14:31:10 +02:00
tsmith@ramayana.hindu.god
f01f1993dd Apply InnoDB snapshot innodb-5.1-ss1751.
Bug #16979: AUTO_INC lock in InnoDB works a table level lock
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
Bug #27950: Duplicate entry error in auto-inc after mysqld restart
  We check whether the AUTOINC sub-system has been initialized (first) by
  holding the AUTOINC mutex and if initialization is required then we
  initialize using our normal procedure.
2007-08-25 03:55:38 -06:00
tsmith@ramayana.hindu.god
159d5b71b1 Apply InnoDB snapshot innodb-5.1-ss1726.
Bug #16979: AUTO_INC lock in InnoDB works a table level lock
  - this is a major change in InnoDB auto-inc handling.
Bug #27950: Duplicate entry error in auto-inc after mysqld restart
  - Init AUTOINC from delete_row().
Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE
  - Use value specified by MySQL, in update_row().
2007-08-24 19:14:52 -06:00
joerg@trift2.
c6d2337b82 Merge trift2.:/MySQL/M51/netware2-5.1
into  trift2.:/MySQL/M51/target-5.1.22
2007-08-24 23:22:55 +02:00
joerg@trift2.
4d375e46e3 Merge trift2.:/MySQL/M50/netware2-5.0
into  trift2.:/MySQL/M51/netware2-5.1
2007-08-24 23:12:19 +02:00
joerg@trift2.
2fd45aaee6 Fixes for the NetWare builds, discovered during 5.1.21-beta and backported to 5.0:
1) Ensure "init_db.sql" and "test_db-sql" really get built.

2) Ensure the "*.def" files with NetWare linker options get distributed to the proper directories.
2007-08-24 23:07:59 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
eb6651b017 ha_partition.cc, ha_partition.h:
bug fixed
partition_pruning.result:
  test fixed
2007-08-24 21:36:51 +05:00
tomas@whalegate.ndb.mysql.com
7f429ecc7f Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-24 09:51:41 +02:00
tomas@whalegate.ndb.mysql.com
af5a367311 unable to reproduce bug, perhaps pushbuild can give more info 2007-08-24 09:50:54 +02:00
gshchepa/uchum@gleb.loc
72bcbc655e Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  gleb.loc:/home/uchum/work/bk/target-5.1.22/mysql-5.1-target-5.1.22
2007-08-24 02:26:30 +05:00
gshchepa/uchum@gleb.loc
4a7fdf8611 Fixed bug #30396.
Recommit to 5.1.22.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and 
other sargable predicates in disjunctive parts of the condition.

The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
2007-08-24 02:23:49 +05:00
gshchepa/uchum@gleb.loc
6e76e82e8b Fixed bug #30201.
Recommit to 5.1.22.
Killing a SELECT query with KILL QUERY or KILL CONNECTION
causes a server crash if the query cache is enabled.

Normal evaluation of a query may be interrupted by the
KILL QUERY/CONNECTION statement, in this case the mysql_execute_command
function returns TRUE, and the thd->killed flag has true value.
In this case the result of the query may
be cached incompletely (omitting call to query_cache_insert inside
the net_real_write function), and next call to query_cache_end_of_result
may lead to server crash.
Thus, the query_cache_end_of_result function has been modified to abort
query cache in the case of killed thread.
2007-08-24 01:59:48 +05:00
gshchepa/uchum@gleb.loc
e543c7436e Fixed bug #30287.
Recommit to 5.1.22.
The server created temporary tables for filesort in the working directory
instead of the specified tmpdir directory.
2007-08-24 01:54:18 +05:00
tomas@whalegate.ndb.mysql.com
eea05b726f Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
2007-08-23 16:25:35 +02:00
tomas@whalegate.ndb.mysql.com
8fb593b840 BUG#30017 log-slave-updates incorrect behavior for cluster
- let the receiving injector thread decide what to do
(recommit for 5.1.22 target)
2007-08-23 16:13:21 +02:00
skozlov/ksm@mysql.com/virtop.localdomain
7094223ea2 Bug#28744, Bug#29363 2007-08-23 17:33:06 +04:00
jmiller/ndbdev@ndb08.mysql.com
af68cdb2a8 Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-target-5.1.22
into  mysql.com:/data1/mysql-5.1-target-5.1.22
2007-08-23 15:33:05 +02:00
tomas@whalegate.ndb.mysql.com
749b40612e BUG#30134 restore of backup from different endian can work for timestamp column
(recommit for 5.1.22 target)
2007-08-23 15:17:44 +02:00
antony@pcg5ppc.xiphis.org
c7cf3e05b5 Bug#30359
"Test federated_bug_25714 issues non-existing shell command"
  Problem caused by missing '$' symbol in eval statement causing it
  to always attempt to run test even if the test was not compiled.
2007-08-22 10:15:20 -07:00
joerg@trift2.
e33ff1c708 Fix the version number. 2007-08-22 15:58:03 +02:00