Commit graph

69208 commits

Author SHA1 Message Date
Mikael Ronström
54574a52bd merge 2011-05-18 11:37:10 +02:00
Mikael Ronström
215ce05aba Split up unlink_thd in several functions 2011-05-18 09:38:05 +02:00
Mikael Ronstrom
419e584bc6 Removed variables no longer needed in plugins, moved to methods instead 2011-05-13 15:46:35 +02:00
Mikael Ronström
ecb3814be8 merge 2011-05-13 13:19:38 +02:00
MySQL Build Team
33b015f30b changed the VERSION tag to 14 2011-05-13 07:00:09 +02:00
chuck.bell@oracle.com
44b2df4aba BUG#12549572 : CMake file does not include gcov option
This patch inserts an 'ENABLE_GCOV' option for enabling gcov compilation
on Linux machines. It modifies the CMakeLists.txt setting this option
to 'OFF' by default.

Note: The option requires a debug build. For example, 
      -DCMAKE_BUILD_TYPE:string="Debug"
2011-05-12 18:22:14 -04:00
Mikael Ronström
06087d2315 merge 2011-05-12 20:35:31 +02:00
Jon Olav Hauglid
7577c115a0 Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS > 0' FAILED
This assert could be triggered during two phase commit if binary
log was used as transaction coordinator log. The triggered assert
checks that the same number of transaction IDs are processed in
the prepare and commit phases.

The reason it was triggered, was that the transaction consisted
of an INSERT/UPDATE IGNORE that had an ignorable error. Since it
had an error, no row log events were made and therefore
prepared_xids was 0. However, since it was an IGNORE statement,
the statement started a read/write statement transaction, committed
it and completed successfully.

This patch fixes the problem by adjusting the assert to take
this possibility into account.

Test case added to binlog.binlog_innodb_row.test.
2011-05-12 14:56:00 +02:00
Tatjana Azundris Nuernberg
e72473450e auto-merge 2011-05-12 13:38:14 +01:00
Mikael Ronström
69396894f1 merge 2011-05-12 14:29:32 +02:00
Tatjana Azundris Nuernberg
f1bad788e5 auto-merge 2011-05-12 10:41:17 +01:00
Tatjana Azundris Nuernberg
614f05e4ca auto-merge 2011-05-12 06:23:16 +01:00
Tatjana Azundris Nuernberg
6fb68a22bd Bug#11902767/Bug#60580: Statement improperly replicated crashes slave SQL thread
If LOAD DATA INFILE featured a SET clause, the name=value pairs
would be regenerated using item::print. Unfortunately, that code
is mostly optimized for EXPLAIN EXTENDED output and such, and can
not be relied on to return valid SQL.

We now name each value its original, user-supplied form and use
that to create LOAD DATA INFILE statements for statement-based
replication.
2011-05-12 05:56:41 +01:00
Tatjana Azundris Nuernberg
25abeed586 auto-merge 2011-05-12 05:43:53 +01:00
Tatjana Azundris Nuernberg
79c1c8e586 auto-merge 2011-05-12 05:32:06 +01:00
Tatjana Azundris Nuernberg
a0f300a6d3 auto-merge Bug#11762799/Bug#55436 2011-05-12 04:05:12 +01:00
Tatjana Azundris Nuernberg
2683078d28 auto-merge Bug#11762799/Bug#55436 2011-05-12 03:41:51 +01:00
Luis Soares
efc20dca00 BUG#12416700
Automerged bzr bundle from bug report into latest mysql-5.5.
2011-05-11 15:16:17 +01:00
Magnus Blåudd
d8a9b36b9d Merge bug 12384993 2011-05-11 15:15:11 +02:00
Alexander Nozdrin
cbf455cf87 Ignore auto-generated files. 2011-05-11 16:45:57 +04:00
Georgi Kodinov
621dc09548 merge from mysql-5.5 2011-05-11 15:34:15 +03:00
MySQL Build Team
94f424652c Cloning of the 5.5.13 release from Mysql-5.5,
increase the version number by two
2011-05-11 13:40:29 +02:00
Georgi Kodinov
a914a32191 Bug #11744875: 4082: integer lengths cause truncation with distinct concat
and innodb

The 5.5 version of the patch.

The server doesn't restrict the data that can be inserted into integer columns 
with explicitly specified length that's smaller than what the type can handle,
e.g. 1234 can be inserted into an INT(2) column just fine.
Thus, when calcualting the maximum width of expressions involving such 
restricted integer columns we need to use the implicit maximum width of 
the field instead of the explicitly speficied one.
Fixed the server to use the implicit maximum in such cases and made sure 
the implicit maximum is addjusted the same way as the explicit one wrt
signedness.

Fixed several test case results (ctype_*.result, metadata.result and 
type_ranges.result) to reflect the extended column widths.

Added a regression test case in distinct.test.

Note : this is the behavior preserving fix that makes 5.5 behave as 5.1 and 
earlier. In the mysql trunk we'll add a insert time check for the explict 
maximum size.
2011-05-11 14:11:57 +03:00
Magnus Blåudd
f8e86f50e2 Bug#12384993 EXTRA/RPL_TEST/CHECK_TYPE.INC NEED SUPPORT FOR SPECIFIC ENGINE
- add support for choosing the engine of test
    table(t1) with $engine_type
 - add primary key to the test table(t1) to support
   replication of BLOB/TEXT (also with ENGINE=ndb)
 - change the suppression since the warning printed to error log
  now says "Column 1"
2011-05-11 09:49:23 +02:00
Serge Kozlov
f978c103bb automerge 2011-05-10 17:50:30 +04:00
Georgi Kodinov
2b9c0451f7 weave null merge mysql-5.1->mysql-5.5 2011-05-10 16:24:34 +03:00
Georgi Kodinov
ef2d701c00 weave merge mysql-5.0->mysql-5.1 2011-05-10 16:21:44 +03:00
Luis Soares
c9eef1d74a BUG#12416700: RPL_SHOW_SLAVE_HOSTS FAILS SPORADICALLY (TIMEOUT
IN WAIT_SHOW_CONDITION) 

There was a typo in the name of one of the parameters to the
include file wait_show_condition. The parameter name was being
set to "connection" instead of "condition".

We fix this typo, improve one instruction in the test case and
deploy parameter checks inside wait_show_condition.inc.
2011-05-10 12:41:09 +01:00
Serge Kozlov
4dde684315 automerge 5.1->5.5 2011-05-09 23:26:41 +04:00
Serge Kozlov
e8b54a7ce9 WL#5867
Replaced the error code by error name
2011-05-09 23:14:24 +04:00
Alexander Nozdrin
75498ef924 Patch for Bug#12362125 (SP INOUT HANDLING IS BROKEN FOR TEXT TYPE).
Attempts to assign value to a table column from trigger by using
NEW.column_name pseudo-variable might result in garbled data.
That happened when:
  - the column had a BLOB-based type (e.g. TEXT)
    and
  - the value being assigned was retrieved from stored routine variable
    of the same type.

The problem was that BLOB values were not copied correctly in this
case. Instead of doing a copy of a real value, the value's representation
in record buffer was copied. This representation is essentially a
pointer to a buffer associated with the virtual table for routine
variables where the real value is stored. Since this buffer got
freed once trigger was left or could have changed its contents when
new value was assigned to corresponding routine variable such a shallow
copying resulted in garbled data in NEW.colum_name column.

It worked in 5.1 due to a subtle bug in create_virtual_tmp_table():
  - in 5.1 create_virtual_tmp_table() returned a table which
    had db_low_byte_first == false.
  - in 5.5 and up create_virtual_tmp_table() returns a table which
    has db_low_byte_first == true.
Actually, db_low_byte_first == false only for ISAM storage engine,
which was deprecated and removed in 5.0.

Having db_low_byte_first == false led to getting false in the
complex condition for the 2nd "if" in field_conv(), which in turn
led to copy-blob-behavior as a fall-back strategy:
  - to->table->s->db_low_byte_first was true (correct value)
  - from->table->s->db_low_byte_first was false (incorrect value)

In 5.5 and up that condition is true, which means blob-values are
not copied.
2011-05-09 12:29:23 +04:00
Alexander Nozdrin
cd501675d8 Patch for Bug#12374486 - SEVERE MEMORY LEAK IN PREPARED STATEMENTS
THAT CALL STORED PROCEDURES.

The bug was introduced by WL#4435. The problem was that if a stored
procedure generated a few result sets with different set of columns,
a new memory would be allocated after every EXECUTE for every
result set.

The fix is to introduce a new memory root in scope of MYSQL_STMT,
and to store result-set metadata in that memory root.
2011-05-06 17:39:20 +04:00
Alexander Nozdrin
bc4095643b Patch for Bug#11848763 / 60025
(SUBSTRING inside a stored function works too slow).

The user-visible problem was that the server started to consume memory if a
stored-routine of some sort is executed subsequently. The memory was freed
only after the corresponding connection was closed.

Technically, the problem was that the memory needed for temporary string
conversions was allocated on the connection ("persistent") memory root,
instead of statement one.

The root cause of this problem was the incorrect patch for Bug 55744.
That patch wrongly fixed a crash in prepared-statement-mode introduced by
another patch. The patch for Bug 55744 used wrong condition to check if
prepared statement mode is active (or whether the connection-scoped or
statement-scoped memory root should be used). The thing is that for
prepared statements such conversions should be done in the connection
memory root, so that that the transformations of item-tree were correctly
remembered in the PREPARE-phase.

The fix is to use proper condition to detect prepared-statement-mode and
use proper memory root.
2011-05-06 15:41:24 +04:00
Alexander Nozdrin
2593b14ccb Preliminary patch for Bug#11848763 / 60025
(SUBSTRING inside a stored function works too slow).

Background:
  - THD classes derives from Query_arena, thus inherits the 'state'
    attribute and related operations (is_stmt_prepare() & co).

  - Although these operations are available in THD, they must not
    be used. THD has its own attribute to point to the active
    Query_arena -- stmt_arena.

  - So, instead of using thd->is_stmt_prepare(),
    thd->stmt_arena->is_stmt_prepare() must be used. This was the root
    cause of Bug 60025.

This patch enforces the proper way of calling those operations.
is_stmt_prepare() & co are declared as private operations
in THD (thus, they are hidden from being called on THD instance).

The patch tries to minimize changes in 5.5.
2011-05-06 15:39:40 +04:00
Magnus Blåudd
b1ff2e6813 Add --with-debug=full support to BUILD/* scripts, this option has been lost
between 5.1 and 5.5, it's purpose is to set the compiler flags in a way that
does not optimize away the call stack(i.e don't use any -OX flags at all)
2011-05-06 11:20:01 +02:00
Magnus Blåudd
ec425cc5ac Merge in patch for bug 12380149 2011-05-06 10:53:42 +02:00
Sunanda Menon
78e73ec219 Merge from mysql-5.0.93-release 2011-05-06 10:36:30 +02:00
bjorn.munch@oracle.com
f152d4cf05 Merge from mysql-5.5.12-release 2011-05-06 10:27:04 +02:00
Karen Langford
74afcca8f2 Merge from mysql-5.1.57-release 2011-05-06 10:03:02 +02:00
Luis Soares
f8b2499efe BUG#12354268
Automerge from mysql-5.1 into mysql-5.5.
2011-05-06 00:55:44 +01:00
Luis Soares
8cc75b2d1e BUG#12354268
Automerged bzr bundle from bug report:
luis.soares@oracle.com-20110505224815-6ob90n7suxsoizvs.bundle
2011-05-06 00:54:36 +01:00
Luis Soares
6f3e97a6cb BUG#11762616: BUG#55229: 'POSTION'
Manual merge from mysql-5.1 into mysql-5.5.

Conflicts
=========
Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
Text conflict in sql/handler.h
Text conflict in storage/archive/ha_archive.cc
2011-05-06 00:50:31 +01:00
Luis Soares
ed6aae83c3 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Luis Soares
9b5ca1b9f4 BUG#12425924
Automerging cset into latest mysql-5.5.
2011-05-06 00:16:20 +01:00
Luis Soares
e367a789d1 BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOT
WORK WITH --START-POSITION
      
If setting --start-position to start after the FD event, mysqlbinlog
will output an error stating that it has not found an FD event.
However, its not that mysqlbinlog does not find it but rather that it
does not processes it in the regular way (i.e., it does not print it).
Given that one is using --base64-output=DECODE-ROWS then not printing
it is actually fine.
      
To fix this, we make mysqlbinlog not to complain when it has not
printed the FD event, is outputing in base64, but is decoding the
rows.
2011-05-05 23:48:15 +01:00
Tatiana Azundris Nurnberg
4e9e69e5f8 auto-merge conservative fix for Bug#55436/Bug#11762799 2011-05-05 06:39:38 +01:00
Luis Soares
ca9e2bd6d2 BUG#12425924: SEMI-SYNC RELATED VALGRIND WARNINGS IN 5.5 CODEBASE
There are a couple of valgrind warnings in 5.5 codebase, that
do not exist in 5.6. The root cause was found and fixed in 5.6
codebase before (BUG#11763880 and BUG#11763879), but the patches
were only pushed to 5.6.

To fix it in 5.5, we cherrypicked the csets from 5.6 and merged 
them in 5.5.
2011-05-04 14:54:35 +01:00
Alexander Nozdrin
1ca5e4226d Manual merge from mysql-5.1. 2011-05-04 17:22:38 +04:00
Luis Soares
96a41c47d4 Automerged (cherrypicked) cset from 5.6:
zhenxing.he@sun.com-20101117085902-n9gfvlkmm44t38y0
  
This takes care of valgrind warnings in 5.5 that exhibit
the same trace as in BUG#11763879 (BUG#56649).
2011-05-04 14:09:54 +01:00
Luis Soares
47ef8f3452 Automerged (cherrypicked) cset from 5.6:
zhenxing.he@sun.com-20101202073812-iel8lvhmulyagtsv

This takes care of valgrind warnings in 5.5 that exhibit
the same trace as in BUG#11763880 (BUG#56650).
2011-05-04 14:07:59 +01:00