Commit graph

49648 commits

Author SHA1 Message Date
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
davi@moksha.local
77d78a883f Bug#30632 HANDLER read failure causes hang
If, after the tables are locked, one of the conditions to read from a
HANDLER table is not met, the handler code wrongly jumps to a error path
that won't unlock the tables.

The user-visible effect is that after a error in a handler read command,
all subsequent handler operations on the same table will hang.

The fix is simply to correct the code to jump to the (same) error path that
unlocks the tables.
2007-08-27 10:37:12 -03:00
davi@moksha.local
048474064a Merge moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
into  moksha.local:/Users/davi/mysql/push/bugs/29936-5.1
2007-08-27 10:24:20 -03:00
davi@moksha.local
769cd00e13 Merge moksha.local:/Users/davi/mysql/push/bugs/25164-5.0
into  moksha.local:/Users/davi/mysql/push/bugs/25164-5.1
2007-08-27 10:19:58 -03:00
davi@moksha.local
91e1cc2195 Bug#25164 create table a as select * from A hangs
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.

The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.

Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.

Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.

Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.
2007-08-27 10:13:54 -03: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
msvensson@pilot.(none)
76de827058 Enable abi_check for 5.1
- Run icheck on all files in HEADERS_ABI list 
 - Update reference
2007-08-27 13:55:45 +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
msvensson@pilot.(none)
ffc67d70ce Bug#28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
- Set sql_mode to default when creating system tables
2007-08-27 13:39:34 +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
msvensson@pilot.(none)
9d1570302b Cset exclude: msvensson@pilot.(none)|ChangeSet|20070827092310|49459 2007-08-27 13:16:39 +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
df@pippilotta.erinye.com
0c66cf7bbc Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-08-27 11:40:38 +02:00
df@pippilotta.erinye.com
0670af9479 adjust version number 2007-08-27 11:38:32 +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
msvensson@pilot.(none)
bc49f3b652 Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
2007-08-27 11:32:34 +02:00
msvensson@pilot.(none)
f9c245611e Bug#29805 mysql_upgrade test fail if ~/.my.cnf contain a password
- "mysql" and "mysqlcheck" should not read defaults file
2007-08-27 11:31:49 +02:00
msvensson@pilot.(none)
e6b50eb51b Bug#30487 mysql_upgrade reports misleading errors
- Update result file to include these "misleading errors", better to 
run mysql_upgrade with them than not at all.
2007-08-27 11:27:03 +02:00
dfischer/mysqldev@mysql.com/production.mysql.com
ba419bdc8c Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/data0/mysqldev/my/build-200708231546-5.0.48/mysql-5.0-release
2007-08-27 11:24:54 +02:00
msvensson@pilot.(none)
f5489f67e9 Bug#30029 mysql_upgrade fails for 5.0 -> 5.1.21, 5.1.20 -> 5.1.21 upgrades
- Change to use '' to quote a string inside another string
2007-08-27 11:23:10 +02: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
msvensson@pilot.(none)
def81f98e7 Bug#28560 mysql_upgrade test links /usr/local/mysql/lib libraries
- Remove disabling of mysql_upgrade
2007-08-27 11:20:31 +02: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
msvensson@pilot.(none)
0b27b3bc0e Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
2007-08-27 10:50:44 +02:00
msvensson@pilot.(none)
a91bd85215 Bug#28560 mysql_upgrade test links /usr/local/mysql/lib libraries
- Chop off .libs/ part of path if running in non installed builddir
   using libtool
2007-08-27 10:25:34 +02: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
jani@a88-113-38-195.elisa-laajakaista.fi
b82525ecfa Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-25 12:33:23 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
b7231ad5d9 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-25 12:08:18 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
516cafdc79 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-08-25 11:39:56 +03: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
davi@moksha.local
0b8bc8a96b Add test case for bug 29936 Stored Procedure DML ignores low_priority_updates setting.
This test case uses the wait_condition helper (only available in 5.1) in order to wait till the select/update opens and locks the table.
2007-08-24 19:17:29 -03:00
joerg@trift2.
b30fbfd3ca Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-08-24 23:47:31 +02:00
joerg@trift2.
d7c1a81136 Merge trift2.:/MySQL/M50/netware2-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-08-24 23:40:36 +02:00
joerg@trift2.
ae77f187f5 Merge trift2.:/MySQL/M51/netware2-5.1
into  trift2.:/MySQL/M51/push-5.1
2007-08-24 23:29:19 +02: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
malff/marcsql@weblab.(none)
1013eb57ce Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-cleanup
2007-08-24 09:09:19 -06:00
malff/marcsql@weblab.(none)
162a1be4f9 Whitespace cleanup 2007-08-24 09:08:11 -06:00
msvensson@pilot.(none)
89780a84c8 Remove unsued variable $glob_hostname, unused functions
'mtr_short_hostname' and 'mtr_full_hostname'
2007-08-24 15:43:45 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
76835dbaae Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-24 15:26:48 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
b25dacbdee Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-08-24 15:25:02 +03:00
dfischer/mysqldev@production.mysql.com
81528c1a00 Merge bk-internal:/home/bk/mysql-5.0-build
into  mysql.com:/data0/mysqldev/my/build-200708231546-5.0.48/mysql-5.0-release
2007-08-24 13:47:11 +02:00