Commit graph

66442 commits

Author SHA1 Message Date
Bjorn Munch
f886745dfa merge from trunk-mtr 2010-08-05 14:53:09 +02:00
Bjorn Munch
489e6c136b upmerge 55582 2010-08-05 14:41:07 +02:00
Bjorn Munch
992f49c0c4 merge from 5.1 2010-08-04 12:19:51 +02:00
Bjorn Munch
0792d2b069 Bug #55582 mtr root detection (and if-expression execution) broken
Follow-up patch: added test cases for -0 and while
2010-08-04 10:52:45 +02:00
Alexander Nozdrin
a342369478 Fix default.conf. 2010-08-04 12:14:25 +04:00
Bjorn Munch
1ba9d79b7b Bug #55582 mtr root detection (and if-expression execution) broken
if() treated any non-numeric string as false
Fixed to treat those as true instead
Added some test cases
Fixed missing $ in variable name in include/mix2.inc
2010-08-03 16:11:23 +02:00
Bjorn Munch
3cd9a145e3 upmerge 55503,55597 2010-08-02 12:52:18 +02:00
Bjorn Munch
01e6820115 Bug #55597 MTR: Restart the server, from within the test case, with new CLI options.
The expect file can now include "restart:<server options>"
Also drop check-testcase if this has been done
Added comment explaining the restart: syntax
2010-08-02 12:43:28 +02:00
Alexander Nozdrin
86e68740dd Fix federated.federated_server.test. 2010-07-31 17:10:27 +04:00
Alexander Nozdrin
f0ec558d6f Auto-merge from mysql-trunk-bugfixing. 2010-07-31 11:49:42 +04:00
Alexander Nozdrin
361022c60c A follow-up patch for Bug 23032: fix federated_server.result. 2010-07-31 11:45:05 +04:00
Davi Arnaut
b5c8757a6d Revert revision which disabled the generating of configuration
scripts if cmake is available. We need to always generate the
scripts in order for the dual cmake/autotools support to work.
2010-07-30 18:29:54 -03:00
Alexander Nozdrin
d285d75d02 Update .bzrignore. 2010-07-30 19:29:17 +04:00
Alexander Nozdrin
b2f8005094 Auto-merge from mysql-trunk-bugfixing.
******
This patch fixes the following bugs:
  - Bug#5889: Exit handler for a warning doesn't hide the warning in
    trigger
  - Bug#9857: Stored procedures: handler for sqlwarning ignored
  - Bug#23032: Handlers declared in a SP do not handle warnings generated
    in sub-SP
  - Bug#36185: Incorrect precedence for warning and exception handlers

The problem was in the way warnings/errors during stored routine execution
were handled. Prior to this patch the logic was as follows:

  - when a warning/an error happens: if we're executing a stored routine,
    and there is a handler for that warning/error, remember the handler,
    ignore the warning/error and continue execution.

  - after a stored routine instruction is executed: check for a remembered
    handler and activate one (if any).

This logic caused several problems:

  - if one instruction generates several warnings (errors) it's impossible
    to choose the right handler -- a handler for the first generated
    condition was chosen and remembered for activation.

  - mess with handling conditions in scopes different from the current one.

  - not putting generated warnings/errors into Warning Info (Diagnostic
    Area) is against The Standard.

The patch changes the logic as follows:

  - Diagnostic Area is cleared on the beginning of each statement that
    either is able to generate warnings, or is able to work with tables.

  - at the end of a stored routine instruction, Diagnostic Area is left
    intact.

  - Diagnostic Area is checked after each stored routine instruction. If
    an instruction generates several condition, it's now possible to take a
    look at all of them and determine an appropriate handler.
2010-07-30 19:28:36 +04:00
Alexander Nozdrin
02a0787d8d Auto-merge from mysql-trunk-bugfixing. 2010-07-30 19:13:38 +04:00
Konstantin Osipov
c9d2f7ee72 Fix the tree name. 2010-07-29 20:29:01 +04:00
Konstantin Osipov
11c61b57c9 Merge trunk-bugfixing -> trunk-runtime. 2010-07-29 20:27:20 +04:00
Konstantin Osipov
cb4db7d8cb Fix a compilation failure of ha_ndbcluster_binlog.cc. 2010-07-29 20:15:37 +04:00
Alexander Nozdrin
f7c362df8c Fix build failure. 2010-07-29 19:35:22 +04:00
Alexander Nozdrin
dfc63866eb Auto-merge from mysql-trunk-merge. 2010-07-29 16:32:11 +04:00
Konstantin Osipov
14b769cfc6 Merge trunk-bugfixing -> trunk-runtime. 2010-07-29 14:18:13 +04:00
Vasil Dimov
88bf9cf5d9 Merge mysql-trunk-innodb -> mysql-trunk-bugfixing 2010-07-29 12:45:12 +03:00
Vasil Dimov
61eeca5a4c Merge mysql-trunk-bugfixing -> mysql-trunk-innodb 2010-07-29 12:42:55 +03:00
Vasil Dimov
c33caca3a4 Merge mysql-5.1-bugteam -> mysql-trunk-merge
This is a null merge of the InnoDB changesets which get to trunk
by manual porting and committing into mysql-trunk-innodb and then
merging into mysql-trunk-bugfixing.
2010-07-29 12:09:00 +03:00
Vasil Dimov
e91498e9fb Merge mysql-5.1-bugteam -> mysql-trunk-merge 2010-07-29 12:06:54 +03:00
Vasil Dimov
2aee4d8ddd Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-07-29 11:57:33 +03:00
Vasil Dimov
a95441c03a Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-07-29 11:51:00 +03:00
Konstantin Osipov
3d1af939c3 Fix a Windows failure of main.merge test introduced by
the precursor patch for Bug#52044.
When passing the TABLE instance for invalidation to the
query cache, we didn't always have a valid share
(in case of error).
Make sure we invalidate the table using TABLE_LIST, not
TABLE, object.
2010-07-29 12:35:12 +04:00
Alexander Barkov
c7071a7214 Postfix for BUG#45012.
Problem: The original patch didn't compile on debug_werror
due to wrong format in printf("%d") for size_t variables.

Fix: Adding cast to (int).
2010-07-29 10:12:44 +04:00
c61ce4143c Manual merge 2010-07-29 11:24:35 +08:00
2ad690fdf8 BUG#49124 Security issue with /*!-versioned */ SQL statements on Slave
/*![:version:] Query Code */, where [:version:] is a sequence of 5 
digits representing the mysql server version(e.g /*!50200 ... */),
is a special comment that the query in it can be executed on those 
servers whose versions are larger than the version appearing in the 
comment. It leads to a security issue when slave's version is larger 
than master's. A malicious user can improve his privileges on slaves. 
Because slave SQL thread is running with SUPER privileges, so it can
execute queries that he/she does not have privileges on master.

This bug is fixed with the logic below: 
- To replace '!' with ' ' in the magic comments which are not applied on
  master. So they become common comments and will not be applied on slave.

- Example:
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/
  will be binlogged as
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/
2010-07-29 11:00:57 +08:00
Gleb Shchepa
95ec38c5b1 Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on
DELETE statement

Single-table delete ordered by a field that has a hash-type index
may cause an assertion failure or a crash.

An optimization added by the fix for the bug 36569 forced the
optimizer to use ORDER BY-compatible indices when applicable.

However, the existence of unsorted indices (HASH index algorithm
for some engines such as MEMORY/HEAP, NDB) was ignored.

The test_if_order_by_key function has been modified to skip
unsorted indices.
2010-07-29 01:02:43 +04:00
Konstantin Osipov
0b217d9015 Fix a failing assert when running funcs_1.innodb_trig_03 test.
The failure was introduced by a precursor patch for the
fix for Bug#52044.

When opening tables for GRANT statement
to check that subject columns exist,
mysql_table_grant() would try to lock the
tables, and thus start a transaction.
This was unnecessary and lead to an assert.
2010-07-28 21:56:15 +04:00
Davi Arnaut
a0d5be1fd3 Null merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-28 08:35:36 -03:00
Bjorn Munch
0ebd10bc3b Bug #54660 MTR cannot start server properly with non-default innodb_log_file_size
Pass any --innodb* options to bootstrap as well
Backported to v1, where also a removal of --loose-skip-innodb is needed
2010-07-28 13:28:21 +02:00
Alexander Nozdrin
8909586f16 Rename select_send::abort() to select_send::abort_result_set()
to be more descriptive.
2010-07-28 15:17:19 +04:00
Bjorn Munch
56a1917b71 Bug #55597 MTR: Restart the server, from within the test case, with new CLI options.
The expect file can now include "restart:<server options>"
Also drop check-testcase if this has been done
2010-07-28 12:24:38 +02:00
Jimmy Yang
8d28ec7c77 Fix bug #55581 by backporting fix of #52546 from mysql-trunk-innodb
to mysql-5.1-innodb plugin.
2010-07-28 03:20:44 -07:00
Vasil Dimov
9c0a4999af Fix trailing whitespace on ha_innodb.cc:1259 2010-07-28 09:15:07 +03:00
Vasil Dimov
c402eccf79 Remove trailing whitespace on ha_innodb.cc:574 2010-07-28 08:38:28 +03:00
Konstantin Osipov
2abe7b9d4e Merge trunk-bugfixing -> trunk-runtime. 2010-07-27 18:32:42 +04:00
Davi Arnaut
c6a34a9961 Bug#52261: 64 bit atomic operations do not work on Solaris i386 ..
Workaround a interface problem with the atomic macros that was
causing warnings. The correct type is retrieved using typeof if
compiling with GCC.
2010-07-27 10:25:11 -03:00
Konstantin Osipov
6d059673f7 Implement WL#5502 Remove dead 5.0 class Sensitive_cursor.
Remove dead and unused code.
Update to reflect the code review requests.
2010-07-27 16:42:36 +04:00
Konstantin Osipov
ec2c3bf2c1 A pre-requisite patch for the fix for Bug#52044.
This patch also fixes Bug#55452 "SET PASSWORD is
replicated twice in RBR mode".

The goal of this patch is to remove the release of 
metadata locks from close_thread_tables().
This is necessary to not mistakenly release
the locks in the course of a multi-step
operation that involves multiple close_thread_tables()
or close_tables_for_reopen().

On the same token, move statement commit outside 
close_thread_tables().

Other cleanups:
Cleanup COM_FIELD_LIST.
Don't call close_thread_tables() in COM_SHUTDOWN -- there
are no open tables there that can be closed (we leave
the locked tables mode in THD destructor, and this
close_thread_tables() won't leave it anyway).

Make open_and_lock_tables() and open_and_lock_tables_derived()
call close_thread_tables() upon failure.
Remove the calls to close_thread_tables() that are now
unnecessary.

Simplify the back off condition in Open_table_context.

Streamline metadata lock handling in LOCK TABLES 
implementation.

Add asserts to ensure correct life cycle of 
statement transaction in a session.

Remove a piece of dead code that has also become redundant
after the fix for Bug 37521.
2010-07-27 14:25:53 +04:00
Davi Arnaut
fce8b7e193 WL#5486: Remove code for unsupported platforms
Remove ASM for MC68000 and Vax.
2010-07-26 18:16:48 -03:00
Davi Arnaut
9c84153550 WL#5486: Remove code for unsupported platforms
Remove 32-bit SPARC specific code.
2010-07-26 18:14:59 -03:00
Matthias Leich
62b0262dd2 Merge of fix for Bug#53102 perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
into actual tree. No conflicts.
2010-07-26 19:00:01 +02:00
Davi Arnaut
ed434ce045 Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
The problem was that the optimize method of the ARCHIVE storage
engine was not preserving the FRM embedded in the ARZ file when
rewriting the ARZ file for optimization. The ARCHIVE engine stores
the FRM in the ARZ file so it can be transferred from machine to
machine without also copying the FRM -- the engine restores the
embedded FRM during discovery.

The solution is to copy over the FRM when rewriting the ARZ file.
In addition, some initial error checking is performed to ensure
garbage is not copied over.
2010-07-26 12:54:20 -03:00
Luis Soares
3994aa8548 BUG 55387: Automerged bzr bundle from bug report. 2010-07-28 10:43:41 +01:00
Sven Sandberg
8ff3360f07 merged BUG#55322 from 5.1-bugteam to trunk-merge 2010-07-26 12:52:59 +02:00