Commit graph

68746 commits

Author SHA1 Message Date
MySQL Build Team
39f85a4476 removing EXCEPTIONS-CLIENT 2011-02-09 22:14:11 +01:00
MySQL Build Team
6497b7aa4d Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3545
> revision-id: holyfoot@mysql.com-20110112130241-50lwmhq562otxw31
> parent: dmitry.lenev@oracle.com-20110112130830-csanweanbny2ua3n
> committer: Alexey Botchkov <holyfoot@mysql.com>
> branch nick: 51mrg
> timestamp: Wed 2011-01-12 17:02:41 +0400
> message:
>   Bug #57321 crashes and valgrind errors from spatial types 
>           Item_func_spatial_collection::fix_length_and_dec didn't call parent's method, so
>           the maybe_null was set to '0' after it. But in this case the result was
>           just NULL, that caused wrong behaviour.
>   
>   per-file comments:
>     mysql-test/r/gis.result
>   Bug #57321 crashes and valgrind errors from spatial types 
>           test result updated.
>   
>     mysql-test/t/gis.test
>   Bug #57321 crashes and valgrind errors from spatial types 
>           test case added.
>     sql/item_geofunc.h
>   Bug #57321 crashes and valgrind errors from spatial types 
>           Item_func_geometry::fix_length_and_dec() called in
>           Item_func_spatial_collection::fix_length_and_dec().
2011-02-09 22:06:24 +01:00
MySQL Build Team
5ac3c5dea3 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3537
> revision-id: davi.arnaut@oracle.com-20110107192806-rmvvxwhk10sy0219
> parent: davi.arnaut@oracle.com-20110107183336-kp8niwm2hz3wb4c3
> committer: Davi Arnaut <davi.arnaut@oracle.com>
> branch nick: mysql-5.1
> timestamp: Fri 2011-01-07 17:28:06 -0200
> message:
>   Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files
>   
>   WIN32 compilation fixes: define ETIMEDOUT only if not available and
>   fix typos and add a missing parameter.
2011-02-09 22:04:11 +01:00
MySQL Build Team
436b67e324 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3536
> revision-id: davi.arnaut@oracle.com-20110107183336-kp8niwm2hz3wb4c3
> parent: saikumar.v@sun.com-20110106103945-rhsek9uy6f63db44
> committer: Davi Arnaut <davi.arnaut@oracle.com>
> branch nick: 51023-5.1
> timestamp: Fri 2011-01-07 16:33:36 -0200
> message:
>   Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files
>   
>   From a user perspective, the problem is that a FLUSH LOGS or SIGHUP
>   signal could end up associating the stdout and stderr to random
>   files. In the case of this bug report, the streams would end up
>   associated to InnoDB ibd files.
>   
>   The freopen(3) function is not thread-safe on FreeBSD. What this
>   means is that if another thread calls open(2) during freopen()
>   is executing that another thread's fd returned by open(2) may get
>   re-associated with the file being passed to freopen(3). See FreeBSD
>   PR number 79887 for reference:
>   
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=79887
>   
>   This problem is worked around by substituting a internal hook within
>   the FILE structure. This avoids the loss of atomicity by not having
>   the original fd closed before its duplicated.
>   
>   Patch based on the original work by Vasil Dimov.
2011-02-09 22:02:48 +01:00
MySQL Build Team
d19c8ec930 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3527.3.2
> revision-id: mattias.jonsson@oracle.com-20101222144517-cbv3l5jlbd0mq5s8
> parent: mattias.jonsson@oracle.com-20101222095036-2lpx0gqu4i45jtkz
> committer: Mattias Jonsson <mattias.jonsson@oracle.com>
> branch nick: b54483-51-bt_2
> timestamp: Wed 2010-12-22 15:45:17 +0100
> message:
>   Bug#54483: valgrind errors when making warnings for
>   multiline inserts into partition
>   Bug#57071: EXTRACT(WEEK from date_col) cannot be
>   allowed as partitioning function
>   
>   Renamed function according to reviewers comments.
2011-02-09 22:01:35 +01:00
MySQL Build Team
e4f23ff581 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3527.3.1
> revision-id: mattias.jonsson@oracle.com-20101222095036-2lpx0gqu4i45jtkz
> parent: sven.sandberg@oracle.com-20101220090735-psae11j9nwuj8vzl
> committer: Mattias Jonsson <mattias.jonsson@oracle.com>
> branch nick: b54483-51-bt_2
> timestamp: Wed 2010-12-22 10:50:36 +0100
> message:
>   Bug#54483: valgrind errors when making warnings for multiline inserts into partition
>   Bug#57071: EXTRACT(WEEK from date_col) cannot be allowed as partitioning function
>   
>   There were functions allowed as partitioning functions
>   that implicit allowed cast. That could result in unacceptable
>   behaviour.
>   
>   Solution was to check that the arguments of date and time functions
>   have allowed types (field and date/datetime/time depending on function).
2011-02-09 21:59:29 +01:00
MySQL Build Team
89b9934cdb Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3520
> revision-id: sergey.glukhov@oracle.com-20101214093303-wmo9mqcb8rz0wv9f
> parent: tor.didriksen@oracle.com-20101213161301-81lprlbune7r98dl
> committer: Sergey Glukhov <sergey.glukhov@oracle.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Tue 2010-12-14 12:33:03 +0300
> message:
>   Fixed following problems:
>   --Bug#52157 various crashes and assertions with multi-table update, stored function
>   --Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
>   --Bug#57703 create view cause Assertion failed: 0, file .\item_subselect.cc, line 846
>   --Bug#57352 valgrind warnings when creating view
>   --Recently discovered problem when a nested materialized derived table is used
>     before being populated and it leads to incorrect result
>   
>   We have several modes when we should disable subquery evaluation.
>   The reasons for disabling are different. It could be
>   uselessness of the evaluation as in case of 'CREATE VIEW'
>   or 'PREPARE stmt', or we should disable subquery evaluation
>   if tables are not locked yet as it happens in bug#54475, or
>   too early evaluation of subqueries can lead to wrong result
>   as it happened in Bug#19077.
>   Main problem is that if subquery items are treated as const
>   they are evaluated in ::fix_fields(), ::fix_length_and_dec()
>   of the parental items as a lot of these methods have
>   Item::val_...() calls inside.
>   We have to make subqueries non-const to prevent unnecessary
>   subquery evaluation. At the moment we have different methods
>   for this. Here is a list of these modes:
>   
>   1. PREPARE stmt;
>   We use UNCACHEABLE_PREPARE flag.
>   It is set during parsing in sql_parse.cc, mysql_new_select() for
>   each SELECT_LEX object and cleared at the end of PREPARE in
>   sql_prepare.cc, init_stmt_after_parse(). If this flag is set
>   subquery becomes non-const and evaluation does not happen.
>   
>   2. CREATE|ALTER VIEW, SHOW CREATE VIEW, I_S tables which
>      process FRM files
>   We use LEX::view_prepare_mode field. We set it before
>   view preparation and check this flag in
>   ::fix_fields(), ::fix_length_and_dec().
>   Some bugs are fixed using this approach,
>   some are not(Bug#57352, Bug#57703). The problem here is
>   that we have a lot of ::fix_fields(), ::fix_length_and_dec()
>   where we use Item::val_...() calls for const items.
>   
>   3. Derived tables with subquery = wrong result(Bug19077)
>   The reason of this bug is too early subquery evaluation.
>   It was fixed by adding Item::with_subselect field
>   The check of this field in appropriate places prevents
>   const item evaluation if the item have subquery.
>   The fix for Bug19077 fixes only the problem with
>   convert_constant_item() function and does not cover
>   other places(::fix_fields(), ::fix_length_and_dec() again)
>   where subqueries could be evaluated.
>   
>   Example:
>   CREATE TABLE t1 (i INT, j BIGINT);
>   INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
>   SELECT * FROM (SELECT MIN(i) FROM t1
>   WHERE j = SUBSTRING('12', (SELECT * FROM (SELECT MIN(j) FROM t1) t2))) t3;
>   DROP TABLE t1;
>   
>   4. Derived tables with subquery where subquery
>      is evaluated before table locking(Bug#54475, Bug#52157)
>   
>   Suggested solution is following:
>   
>   -Introduce new field LEX::context_analysis_only with the following
>    possible flags:
>    #define CONTEXT_ANALYSIS_ONLY_PREPARE 1
>    #define CONTEXT_ANALYSIS_ONLY_VIEW    2
>    #define CONTEXT_ANALYSIS_ONLY_DERIVED 4
>   -Set/clean these flags when we perform
>    context analysis operation
>   -Item_subselect::const_item() returns
>    result depending on LEX::context_analysis_only.
>    If context_analysis_only is set then we return
>    FALSE that means that subquery is non-const.
>    As all subquery types are wrapped by Item_subselect
>    it allow as to make subquery non-const when
>    it's necessary.
2011-02-09 21:57:57 +01:00
MySQL Build Team
c044b77aa9 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3518
> revision-id: sergey.glukhov@oracle.com-20101213114812-kaq7sh0s623128lv
> parent: sergey.glukhov@oracle.com-20101213103926-okypkn10adeeyns8
> committer: Sergey Glukhov <sergey.glukhov@oracle.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Mon 2010-12-13 14:48:12 +0300
> message:
>   Bug#39828 : Autoinc wraps around when offset and increment > 1
>   Auto increment value wraps when performing a bulk insert with
>   auto_increment_increment and auto_increment_offset greater than
>   one.
>   The fix:
>   If overflow happened then return MAX_ULONGLONG value as an
>   indication of overflow and check this before storing the
>   value into the field in update_auto_increment().
2011-02-09 21:55:28 +01:00
MySQL Build Team
00447eadd5 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3517
> revision-id: sergey.glukhov@oracle.com-20101213103926-okypkn10adeeyns8
> parent: davi.arnaut@oracle.com-20101207150620-s49dstok48oy585o
> committer: Sergey Glukhov <sergey.glukhov@oracle.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Mon 2010-12-13 13:39:26 +0300
> message:
>   Bug#58396 group_concat and explain extended are still crashy
>   Explain fails at fix_fields stage and some items are left unfixed,
>   particulary Item_group_concat. Item_group_concat::orig_args field
>   is uninitialized in this case and Item_group_concat::print call 
>   leads to crash.
>   The fix:
>   move the initialization of Item_group_concat::orig_args
>   into constructor.
2011-02-09 21:37:36 +01:00
MySQL Build Team
3eff3ea242 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3507.1.7
> revision-id: guilhem@mysql.com-20101122085759-53uuoyqyjkh4em2m
> parent: davi.arnaut@oracle.com-20101120142951-l0f3bxmcwibcplxq
> committer: Guilhem Bichot <guilhem@mysql.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Mon 2010-11-22 09:57:59 +0100
> message:
>   Fix for Bug#56138 "valgrind errors about overlapping memory when double-assigning same variable",
>   and related small fixes.
2011-02-09 21:30:48 +01:00
MySQL Build Team
30a3e345a7 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3507.1.26
> revision-id: mattias.jonsson@oracle.com-20101201112046-2ugtweya0dltcrys
> parent: nirbhay.choubey@sun.com-20101201065531-w2f0j3g5yzok8z9x
> committer: Mattias Jonsson <mattias.jonsson@oracle.com>
> branch nick: b56380-51-bt
> timestamp: Wed 2010-12-01 12:20:46 +0100
> message:
>   Bug#56380: valgrind memory leak warning from partition tests
>   
>   There could be memory leaks if ALTER ... PARTITION command fails.
>   
>   Problem was that the list of items to free was not set in
>   the partition info structure when fix_partition_func call failed
>   during ALTER ... PARTITION.
>   
>   Solved by always setting the list in the partition info struct.
2011-02-09 21:28:45 +01:00
MySQL Build Team
829f6b85e1 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3504
> revision-id: svoj@oracle.com-20101111100317-3bjzbj6c2ihfzb9t
> parent: dmitry.shulga@oracle.com-20101111045251-jl1spfh3xjti1sll
> committer: Sergey Vojtovich <svoj@oracle.com>
> branch nick: mysql-5.1-bugteam-bug58079
> timestamp: Thu 2010-11-11 13:03:17 +0300
> message:
>   BUG#58079 - Remove the IBM DB2 storage engine
2011-02-09 21:26:44 +01:00
MySQL Build Team
6b98655714 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3496.1.39
> revision-id: jon.hauglid@oracle.com-20101019081957-zf2ohl7wgnhvnnb0
> parent: tor.didriksen@oracle.com-20101019070648-jhi9ezq3b5qk4wcm
> committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
> branch nick: mysql-5.1-bugteam-bug57274
> timestamp: Tue 2010-10-19 10:19:57 +0200
> message:
>   Bug #57274 SET GLOBAL debug crashes on Solaris in embedded server mode
>              (variables_debug fails)
>   
>   The problem was that "SET GLOBAL debug" could cause a crash on Solaris.
>   The crash happened if the server failed to open the trace file given in 
>   the "SET GLOBAL debug" statement. This caused an error message to be
>   printed to stderr containing the process name. However, printing to
>   stderr crashed the server since the pointer to the process name had
>   not been initialized.
>   
>   This patch fixes the problem by initializing the process name 
>   properly when doing "SET GLOBAL debug".
>   
>   No test case added as this bug was repeatable with existing test
>   coverage in variables_debug.test.
2011-02-09 21:22:26 +01:00
MySQL Build Team
f31cc126b8 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3452.17.1
> revision-id: mattias.jonsson@oracle.com-20101005125751-ds92svhhb13ds8ri
> parent: sergey.glukhov@sun.com-20101004085126-ia6veky4w6j87i43
> committer: Mattias Jonsson <mattias.jonsson@oracle.com>
> branch nick: b55091-51-security
> timestamp: Tue 2010-10-05 14:57:51 +0200
> message:
>   Bug#55091: Server crashes on ADD PARTITION after a failed attempt
>   
>   In case of failure in ALTER ... PARTITION under LOCK TABLE
>   the server could crash, due to it had modified the locked
>   table object, which was not reverted in case of failure,
>   resulting in a bad table definition used after the failed
>   command.
>   
>   Solved by always closing the LOCKED TABLE, even in case
>   of error.
>   
>   Note: this is a 5.1-only fix, bug#56172 fixed it in 5.5+
2011-02-09 21:21:06 +01:00
MySQL Build Team
9b65664381 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3452.13.54
> revision-id: oystein.grovlen@oracle.com-20110112093715-tc076voaxwblqk8v
> parent: georgi.kodinov@oracle.com-20110110130833-1c9q21mr7zoq07vg
> committer: Oystein Grovlen <oystein.grovlen@oracle.com>
> branch nick: mysql-5.1-security
> timestamp: Wed 2011-01-12 10:37:15 +0100
> message:
>   Bug#59211: Select Returns Different Value for min(year) Function
>   
>   get_year_value() contains code to convert 2-digits year to
>   4-digits.  The fix for Bug#49910 added a check on the size of
>   the underlying field so that this conversion is not done for
>   YEAR(4) values. (Since otherwise one would convert invalid
>   YEAR(4) values to valid ones.)
>   
>   The existing check does not work when Item_cache is used, since
>   it is not detected when the cache is based on a Field.  The
>   reported change in behavior is due to Bug#58030 which added
>   extra cached items in min/max computations.
>   
>   The elegant solution would be to implement
>   Item_cache::real_item() to return the underlying Item.
>   However, some side effects are observed (change in explain
>   output) that indicates that such a change is not straight-
>   forward, and definitely not appropriate for an MRU.
>   
>   Instead, a Item_cache::field() method has been added in order
>   to get access to the underlying field.  (This field() method
>   eliminates the need for Item_cache::eq_def() used in
>   test_if_ref(), but in order to limit the scope of this fix,
>   that code has been left as is.)
2011-02-09 21:15:36 +01:00
MySQL Build Team
aee322264f Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3452.13.4 [merge]
> revision-id: mmakela@bk-internal.mysql.com-20101011192851-u3bdt7erjkrgn90t
> parent: marko.makela@oracle.com-20101011081800-sby6kmb8n1mnryfq
> parent: jimmy.yang@oracle.com-20101011123613-guz1qgdktywmel1g
> committer: Marko Makela <mmakela@bk-internal.mysql.com>
> branch nick: mysql-5.1-security
> timestamp: Mon 2010-10-11 21:28:51 +0200
> message:
>   Merge Bug #57345, Bug #56982, Bug#53307 test from mysql-5.1-innodb
> ------------------------------------------------------------
> Use --include-merges or -n0 to see merged revisions.
2011-02-09 21:13:20 +01:00
MySQL Build Team
17234d6088 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 3351.14.280
> revision-id: inaam.rana@oracle.com-20101026205418-aq835zpvxdskdf4c
> parent: jimmy.yang@oracle.com-20101025055121-j319j363abfgdh6n
> committer: Inaam Rana <inaam.rana@oracle.com>
> branch nick: mysql-5.1-innodb
> timestamp: Tue 2010-10-26 16:54:18 -0400
> message:
>   Bug #57611	ibdata file and continuous growing undo logs
>   rb://498
>   
>   Fix handling of update_undo_logs at trx commit. Previously, when
>   rseg->update_undo_list grows beyond 500 the update_undo_logs were
>   marked with state TRX_UNDO_TO_FREE which should have been
>   TRX_UNDO_TO_PURGE.
>   
>   Approved by: Sunny Bains
2011-02-09 21:10:07 +01:00
MySQL Build Team
34812d0f09 Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 1810.3987.44
> revision-id: alexander.nozdrin@oracle.com-20101124095339-oatpqq684jpbbso2
> parent: alexander.nozdrin@oracle.com-20101122132749-tl6m39zsfgvzi2mf
> committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
> branch nick: mysql-5.0-bugteam
> timestamp: Wed 2010-11-24 12:53:39 +0300
> message:
>   A follow-up for Bug#58340 (Remove Server GPL EXCEPTIONS-CLIENT file) -- remove all
>   EXCEPTIONS-CLIENT from all the places.
2011-02-09 21:08:15 +01:00
MySQL Build Team
d4549347ef Backport into build-201102032246-5.1.52sp1
> ------------------------------------------------------------
> revno: 1810.3987.43
> revision-id: alexander.nozdrin@oracle.com-20101122132749-tl6m39zsfgvzi2mf
> parent: alexander.nozdrin@oracle.com-20101122132550-hcu608iuq5un9k0q
> committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
> branch nick: mysql-5.0-bugteam
> timestamp: Mon 2010-11-22 16:27:49 +0300
> message:
>   Patch for Bug#58340 (Remove Server GPL EXCEPTIONS-CLIENT file).
2011-02-09 21:03:17 +01:00
unknown
f5dab8c83b Set version number for mysql-5.1.52sp1 release 2011-02-09 19:02:38 +01:00
Joerg Bruehe
7856500b0d Merge bugfix 56581 into main. 2011-02-09 14:37:27 +01:00
Dmitry Shulga
960ae6da6a Follow up fix for bug#57450.
batch_readline_init() was modified - make check for 
type of file for input stream unless target platform
is WINDOWS since on this platform S_IFBLK is undefined.
2011-02-09 17:13:17 +06:00
John H. Embretsen
5c10aa1409 Null merge from mysql-5.0 2011-02-09 11:13:23 +01:00
John H. Embretsen
d9a768f766 Backport to 5.0: Fix for Bug#52060 - test udf fails on Snow Leopard.
Reverse DNS lookup of "localhost" returns "broadcasthost" on Snow Leopard (Mac), and NULL on most others.
Simply ignore the output, as this is not an essential part of UDF testing.
2011-02-09 10:50:09 +01:00
Georgi Kodinov
7629dad0db empty weave merge of 5.1-security -> 5.5-security 2011-02-09 11:32:31 +02:00
Georgi Kodinov
74fef12722 weave merge mysql-5.5->mysql-5.5-security 2011-02-09 11:27:31 +02:00
Jimmy Yang
82d8ca01c8 Fix Bug #59048 truncate table or create index could leave index->page
to be FIL_NULL

rb://545 approved by Sunny Bains
2011-02-09 01:15:06 -08:00
Georgi Kodinov
64184770f0 empty weave merge of 5.0-security->5.1-security 2011-02-09 10:52:37 +02:00
Georgi Kodinov
6b1b898ef6 weave merge mysql-5.1->mysql-5.1-security 2011-02-09 10:30:44 +02:00
Georgi Kodinov
bc35f8cdf1 merge 5.0->5.0-security 2011-02-09 10:16:32 +02:00
Dmitry Shulga
9a044cc240 Automerge from mysql-5.1 for follow-up bug#57450. 2011-02-09 12:50:11 +06:00
Dmitry Shulga
c46e20f6c1 Follow up fix for bug#57450.
batch_readline_init() was modified - return an error
if the input source is a directory or a block device.

This follow-up is necessary because on some platforms,
such as Solaris, call to read() from directory may be
successful.
2011-02-09 12:46:12 +06:00
Bjorn Munch
6746a5dc0f null upmerge 2011-02-09 07:41:29 +01:00
Bjorn Munch
5bedf15444 merge from 5.5 2011-02-09 07:22:05 +01:00
Bjorn Munch
7fe2980563 merge from 5.1 2011-02-09 07:20:07 +01:00
Vasil Dimov
d144f43ac3 Merge mysql-5.1 -> mysql-5.5 (empty) 2011-02-08 19:30:46 +02:00
Vasil Dimov
be01dbf587 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-08 19:28:00 +02:00
Vasil Dimov
aa7a928502 Merge mysql-5.1-innodb -> mysql-5.1 2011-02-08 19:26:42 +02:00
Georgi Kodinov
4e523ad68d weave merge from mysql-5.1 to mysql-5.5
Resolved an innodb conflict thanks to vasil.
2011-02-08 17:47:33 +02:00
Georgi Kodinov
e0d0554bac weave merge of mysql-5.0 to mysql-5.1. 2011-02-08 17:02:04 +02:00
Jonathan Perkin
5e1777f921 merge 2011-02-08 15:07:36 +01:00
Jonathan Perkin
f13788c9fd Merge from mysql-5.5.9-release 2011-02-08 14:59:03 +01:00
Jonathan Perkin
d2495d1796 Merge from mysql-5.0.92-release 2011-02-08 14:43:27 +01:00
Anitha Gopi
63218454d5 Bug#59979: Added --debug-server option to collections 2011-02-08 17:25:42 +05:30
unknown
17fe23e46c Merge from mysql-5.1.55-release 2011-02-08 12:52:33 +01:00
Marko Mäkelä
27fbb7c18c Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-08 13:39:24 +02:00
Marko Mäkelä
89621ad738 Implement UNIV_BLOB_DEBUG. An early version of this caught Bug #55284.
This option is known to be broken when tablespaces contain off-page
columns after crash recovery. It has only been tested when creating
the data files from the scratch.

btr_blob_dbg_t: A map from page_no:heap_no:field_no to first_blob_page_no.
This map is instantiated for every clustered index in index->blobs.
It is protected by index->blobs_mutex.

btr_blob_dbg_msg_issue(): Issue a diagnostic message.
Invoked when btr_blob_dbg_msg is set.

btr_blob_dbg_rbt_insert(): Insert a btr_blob_dbg_t into index->blobs.

btr_blob_dbg_rbt_delete(): Remove a btr_blob_dbg_t from index->blobs.

btr_blob_dbg_cmp(): Comparator for btr_blob_dbg_t.

btr_blob_dbg_add_blob(): Add a BLOB reference to the map.

btr_blob_dbg_add_rec(): Add all BLOB references from a record to the map.

btr_blob_dbg_print(): Display the map of BLOB references in an index.

btr_blob_dbg_remove_rec(): Remove all BLOB references of a record from
the map.

btr_blob_dbg_is_empty(): Check that no BLOB references exist to or
from a page. Disowned references from delete-marked records are
tolerated.

btr_blob_dbg_op(): Perform an operation on all BLOB references on a
B-tree page.

btr_blob_dbg_add(): Add all BLOB references from a B-tree page to the
map.

btr_blob_dbg_remove(): Remove all BLOB references from a B-tree page
from the map.

btr_blob_dbg_restore(): Restore the BLOB references after a failed
page reorganize.

btr_blob_dbg_set_deleted_flag(): Modify the 'deleted' flag in the BLOB
references of a record.

btr_blob_dbg_owner(): Own or disown a BLOB reference.

btr_page_create(), btr_page_free_low(): Assert that no BLOB references exist.

btr_create(): Create index->blobs for clustered indexes.

btr_page_reorganize_low(): Invoke btr_blob_dbg_remove() before copying
the records. Invoke btr_blob_dbg_restore() if the operation fails.

btr_page_empty(), btr_lift_page_up(), btr_compress(), btr_discard_page():
Invoke btr_blob_dbg_remove().

btr_cur_del_mark_set_clust_rec(): Invoke btr_blob_dbg_set_deleted_flag().

Other cases of modifying the delete mark are either in the secondary
index or during crash recovery, which we do not promise to support.

btr_cur_set_ownership_of_extern_field(): Invoke btr_blob_dbg_owner().

btr_store_big_rec_extern_fields(): Invoke btr_blob_dbg_add_blob().

btr_free_externally_stored_field(): Invoke btr_blob_dbg_assert_empty()
on the first BLOB page.

page_cur_insert_rec_low(), page_cur_insert_rec_zip(),
page_copy_rec_list_end_to_created_page(): Invoke btr_blob_dbg_add_rec().

page_cur_insert_rec_zip_reorg(), page_copy_rec_list_end(),
page_copy_rec_list_start(): After failure, invoke
btr_blob_dbg_remove() and btr_blob_dbg_add().

page_cur_delete_rec(): Invoke btr_blob_dbg_remove_rec().

page_delete_rec_list_end(): Invoke btr_blob_dbg_op(btr_blob_dbg_remove_rec).

page_zip_reorganize(): Invoke btr_blob_dbg_remove() before copying the records.

page_zip_copy_recs(): Invoke btr_blob_dbg_add().

row_upd_rec_in_place(): Invoke btr_blob_dbg_rbt_delete() and
btr_blob_dbg_rbt_insert().

innobase_start_or_create_for_mysql(): Warn when UNIV_BLOB_DEBUG is enabled.

rb://550 approved by Jimmy Yang
2011-02-08 12:56:23 +02:00
John H. Embretsen
8805ecee53 Merge fix for bug 59837 from mysql-5.1 to mysql-5.5. 2011-02-08 10:53:02 +01:00
John H. Embretsen
994132add6 Fix for Bug#59837 - mysqlhotcopy fails with wrong error (11) on specific platforms:
Test failed on a certain Linux platform in automated environment. It turns out that this platform has an old version of Perl modules DBI and DBD::mysql installed, as well as the OS itself being relatively old.
Allowing error code 11 to be returned from mysqlhotcopy on expected error seems harmless and will make the test pass also with older libraries.
2011-02-08 10:51:09 +01:00
Anitha Gopi
37adcd8c40 Added more tests to daily 2011-02-08 13:20:32 +05:30