Commit graph

69816 commits

Author SHA1 Message Date
Marko Mäkelä
622246ec74 Merge mysql-5.1 to mysql-5.5. 2011-10-05 12:07:38 +03:00
Marko Mäkelä
739c529672 Add InnoDB UNIV_SYNC_DEBUG assertions to rw-lock code.
rw_lock_x_lock_func(): Assert that the thread is not already holding
the lock in a conflicting mode (RW_LOCK_SHARED).

rw_lock_s_lock_func(): Assert that the thread is not already holding
the lock in a conflicting mode (RW_LOCK_EX).
2011-10-05 12:01:47 +03:00
Marko Mäkelä
32d770fba3 Merge mysql-5.1 to mysql-5.5. 2011-10-04 21:20:45 +03:00
Marko Mäkelä
836c3a2378 Correct the ChangeLog 2011-10-04 21:01:40 +03:00
kevin.lewis@oracle.com
a82edd985f Merge to current mysql-5.1 2011-10-04 10:46:54 -05:00
kevin.lewis@oracle.com
0e5f12d056 Merge with current mysql-5.5 2011-10-04 10:43:59 -05:00
Joerg Bruehe
11f90e4b81 Upmerge of a merge changeset - empty. 2011-10-04 17:20:33 +02:00
Joerg Bruehe
eb488a7aeb Merge to main. 2011-10-04 17:17:17 +02:00
Joerg Bruehe
9c83fabc90 Merge to main. 2011-10-04 17:16:32 +02:00
kevin.lewis@oracle.com
b0dd5e7ad5 Merge from mysql-5.1 to mysql-5.5 2011-10-04 10:10:14 -05:00
kevin.lewis@oracle.com
239236462b Bug#12980094 and Bug#13034534
Bug 12980094 - ASSERTION IN INNODB DETECTED IN RQG_PARTITION_DDL
Bug 13034534 - RQG TESTS FAIL ON WINDOWS WITH CRASH NEAR RW_LOCK_DEBUG_PRINT

All access to struct rw_lock_debug_struct must be protected by rw_lock_debug_mutex_enter().
2011-10-04 09:21:47 -05:00
Joerg Bruehe
332fa530e3 Fix bug#11886309: RPM UPGRADE OF MYSQL ADVANCED GPL TO MYSQL SERVER ADVANCED DOES NOT WORK
Upmerge from 5.1 to 5.5
2011-10-04 16:21:32 +02:00
Joerg Bruehe
961f0fd0fc Fix bug#11886309: RPM UPGRADE OF MYSQL ADVANCED GPL TO MYSQL SERVER ADVANCED DOES NOT WORK
Change the RPM spec file so that each RPM "obsoletes" the corresponding RPMs
of all (other) configurations, so a "server" RPM of any configuration
can replace the "server" RPM of any other configuration on a "rpm -U".
2011-10-04 15:58:19 +02:00
Rohit Kalhans
4c4a2599c1 BUG#11758262 BUG#13043055:
Fix for commit_1innodb failure on pb2.

Background: as status increment differs for an unsafe statement 
when logged in stmt and row format,  mtr throws a content mismatch
error.

Fix:  call p_verify_status_increment with different arguments
for loging format as stmt and row/mixed and disable query log.
2011-10-03 16:05:52 +05:30
Jon Olav Hauglid
b91f134ae1 Bug#13030056 62533: UNITTEST/MYSYS/MY_ATOMIC-T.C DOES NOT
COMPILE ON MACOSX LION

The problem was that on optimized builds, the wrong code was generated
for my_atomic_add64 if a variable argument was optimized away as a
constant.

This patch fixes the problem by making the variable volatile.

Another workaround is to specify architecture explicitly using e.g.
CFLAGS/CXXFLAGS= "-m64".

No test case added.
2011-10-03 09:31:55 +02:00
Bjorn Munch
0bc430286e 12956584 followup fix for mysqltest
run_query_stmt() might use disable_xxx vars after calling handle_no_error
  But handle_no_error() hes reverted any ONCE settings
  Fix is to take revert_properties() out of handle_no_error()
2011-09-30 15:25:19 +02:00
Andrei Elkin
2788e98ad3 bug#bug11747416 post-push fixes to correct file name print out. 2011-09-30 15:58:02 +03:00
Inaam Rana
b3d8803926 Revert original fix for Bug 12612184 and the follow up fix for
Bug 12704861.

Bug 12704861 fix was revno: 3504.1.1 (rb://693)
Bug 12612184 fix was revno: 3445.1.10 (rb://678)
2011-09-30 07:02:19 -04:00
Rohit Kalhans
132c41604a BUG#11758262 BUG#13043055
Problem: commit_1innodb fails on pb2 after the patch for BUG#11758262
Background: Certain statements threw warnings only in statement mode causing
the result cintent mismatch.

Fix: disabled warnings from the statements.
2011-09-30 15:16:35 +05:30
Rafal Somla
f03a55cc5b Bug#12982926 CLIENT CAN OVERRIDE ZERO-LENGTH-ALLOCATE BUFFER
Changes in client plugin needed for testing the issue (test instrumentation).
2011-09-29 17:02:16 +02:00
Marko Mäkelä
4db6d87789 Update the German error message translations (by Stefan Hinz)
and fix some Swedish too.
2011-09-29 15:31:46 +03:00
Andrei Elkin
b426043b7c Bug#11747416 : 32228 A disk full makes binary log corrupt
Binary log of master can get a partially logged event if the server
runs out of disk space and, while waiting for some space to be freed,
is shut down (or crashes). If the server is not stopped, it will just
wait endlessly for space to be freed, thus no partial event anomaly
occurs.  The restarted master server has had a dubious policy to send
the incomplete event to slave which it apparently can't handle.
Although an error was printed out the fact of sending with unclear
error message is a source of confusion.
Actually the problem of presence an incomplete event in the binary log
was already fixed by WL 5493 (which was merged to our current trunk
branch, major version 5.6). The fix makes the server truncate the
binary log on server restart and recovery.

However 5.5 master can't do that. So the current issue is a problem of
sending incomplete events to the slave by 5.5 master.

It is fixed in this patch by changing the policy so that only complete
events are pushed by the dump thread to the IO thread. In addition,
the error text that master sends to the slave when an incomplete event
is found, now states that incomplete event may have been caused by an
out-of-disk space situation and provides coordinates of
the first and the last event bytes read.
2011-09-29 14:14:43 +03:00
Rohit Kalhans
b140784fbc BUG#11758262 - 50439: MARK INSERT...SEL...ON DUP KEY UPD,REPLACE...SEL,CREATE...[IGN|REPL] SEL
Problem: The following statements can cause the slave to go out of sync 
if logged in statement format: 
INSERT IGNORE...SELECT 
INSERT ... SELECT ... ON DUPLICATE KEY UPDATE 
REPLACE ... SELECT 
UPDATE IGNORE :
CREATE ... IGNORE SELECT 
CREATE ... REPLACE SELECT  
           
Background: Since the order of the rows returned by the SELECT 
statement or otherwise may differ on master and slave, therefore
the above statements may cuase the salve to go out of sync with
the master. 
      
Fix:
Issue a warning when statements like the above are exectued and 
the bin-logging format is statement. If the logging format is mixed,
use row based logging. Marking a statement as unsafe has been 
done in the sql/sql_parse.cc instead of sql/sql_yacc.cc, because while
parsing for a token has been done we cannot be sure if the parsing
of the other tokens has been done as well.
      
Six new warning  messages has been added for each unsafe statement. 
      
binlog.binlog_unsafe.test has been updated to incoporate these additional unsafe statments.


******
BUG#11758262 - 50439: MARK INSERT...SEL...ON DUP KEY UPD,REPLACE...SEL,CREATE...[IGN|REPL] SEL 
Problem: The following statements can cause the slave to go out of sync 
if logged in statement format: 
INSERT IGNORE...SELECT 
INSERT ... SELECT ... ON DUPLICATE KEY UPDATE 
REPLACE ... SELECT 
UPDATE IGNORE :
CREATE ... IGNORE SELECT 
CREATE ... REPLACE SELECT  
           
Background: Since the order of the rows returned by the SELECT 
statement or otherwise may differ on master and slave, therefore
the above statements may cuase the salve to go out of sync with
the master. 
      
Fix:
Issue a warning when statements like the above are exectued and 
the bin-logging format is statement. If the logging format is mixed,
use row based logging. Marking a statement as unsafe has been 
done in the sql/sql_parse.cc instead of sql/sql_yacc.cc, because while
parsing for a token has been done we cannot be sure if the parsing
of the other tokens has been done as well.
      
Six new warning  messages has been added for each unsafe statement. 
      
binlog.binlog_unsafe.test has been updated to incoporate these additional unsafe statments.
2011-09-29 14:47:27 +05:30
Raghav Kapoor
3cf0b4cc17 Merge of fix for bug#11758062 from mysql-5.1. 2011-09-28 16:54:15 +05:30
Raghav Kapoor
92d96d1437 BUG#11758062 - 50206: ER_TOO_BIG_SELECT REFERS TO OUTMODED
SYSTEM VARIABLE NAME SQL_MAX_JOIN_SI 

BACKGROUND:

ER_TOO_BIG_SELECT refers to SQL_MAX_JOIN_SIZE, which is the
old name for MAX_JOIN_SIZE.

FIX:

Support for old name SQL_MAX_JOIN_SIZE is removed in MySQL 5.6
and is renamed as MAX_JOIN_SIZE.So the errmsg.txt 
and mysql.cc files have been updated and the corresponding result
files have also been updated.
2011-09-28 15:39:21 +05:30
Joerg Bruehe
23dbea0f3f Raising the version after cloning for the 5.5.17 build. 2011-09-27 19:21:40 +02:00
Ashish Agarwal
e5c43f5835 Bug#11759349 -- Merge of patch from mysql-5.1. 2011-09-27 17:44:31 +05:30
Ashish Agarwal
d8c68db1f1 BUG#11759349 - 51655: CREATE TABLE IN MEMORY ENGINE DOESN'T STORE
CREATE_TIME IN INFORMATION_SC

It was impossible to determine MEMORY table creation time,
since it wasn't stored/exposed.

With this patch creation time is saved and it is available via
I_S.TABLES.CREATE_TIME.

Note: it was decided that additional analysis is required before
implementing UPDATE_TIME. Thus this patch doesn't store UPDATE_TIME.
2011-09-27 17:38:51 +05:30
Tor Didriksen
6dbd633bd3 local merge 2011-09-26 14:29:27 +02:00
Tor Didriksen
a151d14453 Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
Re-write the test, to make pushbuild green.
Workaraound for broken pow() function on:
SunOS tyr40 5.10 Generic_127112-05 i86pc i386 i86pc

(dbx) where
current thread: t@1
=>[1] Item_func_pow::val_real(this = 0x238af20) (optimized), at 0xaa8d13 (line ~1980) in "item_func.cc"

(dbx) print pow(1.01, 1.0)
pow(1.01, 1) = 1.01
(dbx) print pow(1.01, 10.0)
pow(1.01, 10) = 1.1046221254112
(dbx) print pow(1.01, 100.0)
pow(1.01, 100) = 2.7048138294215
(dbx) print pow(1.01, 1000.0)
pow(1.01, 1000) = 20959.155637814
(dbx) print pow(1.01, 10000.0)
pow(1.01, 10000) = 1.635828711189e+43
(dbx) print pow(1.01, 100000.0)
pow(1.01, 100000) = Infinity
(dbx) print pow(1.01, 1000000.0)
pow(1.01, 1000000) = Infinity
(dbx) print pow(1.01, 10000000.0)
pow(1.01, 10000000) = Infinity
(dbx) print pow(1.01, 100000000.0)
pow(1.01, 100000000) = Infinity
(dbx) print pow(1.01, 1000000000.0)
pow(1.01, 1000000000) = 0.0
(dbx) print pow(1.01, 10000000000.0)
pow(1.01, 10000000000) = 0.0

(dbx) print value
value = 1.0111111111111
(dbx) print val2
val2 = 8796093022207.0

(dbx) print pow(value, val2)
pow(value, val2) = 0.0

so it seems pow(1.01, y)
returns Infinity for large y, but then starts to return 0.0 for even larger values of y.
2011-09-26 14:21:28 +02:00
Bjorn Munch
2b423fb559 null upmerge 2011-09-26 12:46:18 +02:00
Bjorn Munch
043cb83e29 merge from 5.5-mtr 2011-09-26 12:32:49 +02:00
Bjorn Munch
3f5c0cc78b merge from 5.1-mtr 2011-09-26 12:26:16 +02:00
Bjorn Munch
ae41b0073b Fixed test sys_vars.all_vars: innodb_large_prefix no longer missing 2011-09-26 10:47:08 +02:00
Bjorn Munch
d34087dce3 null upmerge 2011-09-26 10:29:12 +02:00
Bjorn Munch
d1eb81f6ab merge from 5.5 main 2011-09-26 10:27:54 +02:00
Bjorn Munch
1a937b184d merge from 5.1 main 2011-09-26 10:06:25 +02:00
Marko Mäkelä
095475e6df Merge mysql-5.1 to mysql-5.5. 2011-09-26 10:08:42 +03:00
Luis Soares
ffa70c1270 BUG#13001711
Automerged bundle from committed and approved cset.
2011-09-23 12:39:08 +01:00
Daniel Fischer
9e4117ba61 merge 2011-09-23 12:18:15 +02:00
Marko Mäkelä
5c57f8cc9b Bug#12963823 CRASH IN PURGE THREAD UNDER UNUSUAL CIRCUMSTANCES
Replace part of the patch that Kevin apparently forgot to push.
Fix the bug also in the built-in InnoDB of MySQL 5.1.

I cannot explain why the test case was not failing without the
full patch.

This was rb:762, approved by me.
2011-09-22 13:35:02 +03:00
Tor Didriksen
8d1c4bba67 Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
Extra fix: 'if (p5 < p5_a + P5A_MAX)' is not portable.
p5 starts out pointing to a static array, then may point
to a buffer on the stack, then may point to malloc()ed memory.
2011-09-21 13:46:49 +02:00
Daniel Fischer
d5957d0d77 post-merge fix 2011-09-21 12:43:02 +02:00
Daniel Fischer
fe1b205d02 merge from 5.5.16 2011-09-21 12:40:41 +02:00
kevin.lewis@oracle.com
0f359571c5 Bug 12963823 - Crash in Purge thread under unusual circumstances.
The problem occurred when indexes are added between the time that an
UNDO record is created and the time that the purge thread comes around
and deletes the old secondary index entries.  The purge thread would
hit an assert when trying to build a secondary index entry for
searching.  The problem was that the old value of those fields were not
in the UNDO record since they were not part of an index when the UPDATE
occured. 
A test case was added to innodb-index.test.
2011-09-20 18:17:36 -06:00
kevin.lewis@oracle.com
8d036bcd61 Bug 12963823 - Crash in Purge thread under unusual circumstances.
The problem occurred when indexes are added between the time that an
UNDO record is created and the time that the purge thread comes around
and deletes the old secondary index entries.  The purge thread would
hit an assert when trying to build a secondary index entry for
searching.  The problem was that the old value of those fields were not
in the UNDO record since they were not part of an index when the UPDATE
occured. 
A test case was added to innodb-index.test.
2011-09-20 18:12:36 -06:00
Jonathan Perkin
2e7098561b Update email address for Release Engineering. 2011-09-20 17:47:53 +02:00
Luis Soares
ea29bf8935 BUG#13001711: UNINITIALIZED VALUE IN MASTER_INFO::CLEAR_IN_MEMORY_INFO
WITH MYSQL_REFRESH()

reset_slave_info.all was not initialized.

We fix this by setting lex->reset_slave_info.all= false in
the lex_start routine, which is called before every statement.
2011-09-20 11:48:52 +01:00
Bjorn Munch
aa16e961d3 null upmerge 2011-09-20 12:30:45 +02:00
Bjorn Munch
8589a3e251 merge from 5.5 main 2011-09-20 12:14:35 +02:00