Commit graph

55062 commits

Author SHA1 Message Date
Davi Arnaut
fd793526b4 Merge from mysql-5.1 main. 2008-08-15 12:58:19 -03:00
Davi Arnaut
c380238116 Bug#38560: valgrind warnings on PB due to query profiling
Fix for a valgrind warning due to a jump on a uninitialized
variable. The problem was that the sql profile preparation
function wasn't being called for all possible code paths
of query execution.

The solution is to ensure that query profiling is always
started before dispatch_command function is called and to
explicitly call the profile preparation function on bootstrap.
2008-08-15 12:38:46 -03:00
Sergey Glukhov
7eb1507ad1 Bug#36638 mysqld crashes when open file limit is passed and general query log enabled
The problem:
CSV storage engine open function returns success even
thought it failed to open the data file
The fix:
return error
Additional fixes:
added MY_WME to my_open to avoid mysterious error message
free share struct if open the file was unsuccessful
2008-08-15 11:53:54 +05:00
Ramil Kalimullin
ebe0c22691 Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls

Problem: FEDERATED SE improperly stores NULL fields in the record buffer.

Fix: store them properly.
2008-08-15 11:40:05 +05:00
Ramil Kalimullin
5bafde319e Fix for bug#37537: myisamchk fails with Assertion failure with partitioned table
Problem: missed "break" in a switch leads to unexpected assertion failure
of 'myisamchk compressed_table'.

Fix: add the break.
2008-08-15 10:55:20 +05:00
Ramil Kalimullin
fb79a269c4 Fix for bug#37337: Function returns different results
Problem: REGEXP in functions/PSs may return wrong results
due to improper initialization.

Fix: initialize required REGEXP params.
2008-08-15 10:53:25 +05:00
He Zhenxing
f94e914d47 post fixes after merge 2008-08-15 10:31:04 +08:00
He Zhenxing
c697822582 auto merge 2008-08-15 06:56:46 +08:00
Evgeny Potemkin
1c42e93fe9 Fixed failing test case for the bug#38195. 2008-08-14 23:55:18 +04:00
He Zhenxing
c707e6ab13 merge mysql-5.1-rpl-testfixes -> mysql-5.1 2008-08-14 22:01:37 +08:00
He Zhenxing
ea30bcda06 auto merge 2008-08-14 17:59:12 +08:00
He Zhenxing
c6c2e66c67 Merge 5.1-rpl-testfixes -> 5.1-rpl 2008-08-14 17:38:22 +08:00
He Zhenxing
e2516c53fe fix after merge 2008-08-14 16:27:28 +08:00
He Zhenxing
6e38830c53 Merge with mysql-5.1-rpl-testfixes 2008-08-14 15:16:04 +08:00
He Zhenxing
84187687d3 auto merge 2008-08-14 14:47:48 +08:00
He Zhenxing
646c509b18 Auto merge from mysql-5.1 main 2008-08-14 14:27:18 +08:00
He Zhenxing
316e463cc5 BUG#38290 valgrind warnings in binlog_base64_flag
The problem was because the event allocated in mysql_client_binlog_statement
was not freed when an error occured while applying the event.
2008-08-14 10:42:10 +08:00
Andrei Elkin
2923e91b5a Bug #38738 rpl_ndb_mixed_engines_transactions result content mismatch
pb notices differences in results at the very beginning of the test.

Absense of mysql.ndb_apply_status must be benign anyway, but the warning should not happen
if have_ndb.inc is invoked ahead of ndb_master-slave.
Fixed with relocation of the macros.
2008-08-14 00:18:31 +03:00
Matthias Leich
494c0e6d7c Merge 2008-08-13 22:17:43 +02:00
Matthias Leich
5d48042e45 Fix for Bug#37853
Test "funcs_1.processlist_val_ps" fails in various ways
+ corrections of logic in poll routines
+ minor improvements
2008-08-13 21:44:54 +02:00
Matthias Leich
b14c8930c0 Improve the testcases for Bug 12093 in ps_ddl.test
Details:
- add subtest with drop unrelated view
- rearrange existing tests so that a distinction
  between drop procedure and drop function effects
  is possible
2008-08-13 21:42:21 +02:00
Serge Kozlov
35e47b31a2 Bug#18817, removing --binlog-format option from .opt files 2008-08-13 23:12:51 +04:00
Mattias Jonsson
8ca9c150b5 Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

Post push fix

an DBUG_ASSERT broke the embedded server, fixed by initializing
it in the embedded version of Protocol_text::prepare_for_resend
2008-08-13 20:50:08 +02:00
Evgeny Potemkin
cf28ff2616 Bug#38195: Incorrect handling of aggregate functions when loose index scan is
used causes server crash.

When the loose index scan access method is used values of aggregated functions
are precomputed by it. Aggregation of such functions shouldn't be performed
in this case and functions should be treated as normal ones.
The create_tmp_table function wasn't taking this into account and this led to
a crash if a query has MIN/MAX aggregate functions and employs temporary table
and loose index scan.
Now the JOIN::exec and the create_tmp_table functions treat MIN/MAX aggregate
functions as normal ones when the loose index scan is used.
2008-08-13 22:24:55 +04:00
Joerg Bruehe
9d54d41e13 Null-merge a 5.0 version number change up to 5.1 2008-08-13 12:45:56 +02:00
Joerg Bruehe
d2c1c3977b Correct the version number to 5.0.70. 2008-08-13 12:34:35 +02:00
timothy.smith@sun.com
1ae849bbdd Raise version number after cloning 5.0.68 2008-08-13 11:05:24 +02:00
Mattias Jonsson
08d9e1207d Bug#37402: Mysql cant read partitioned table with capital letter in the name
Post push fix (compiler warning)
2008-08-13 10:47:24 +02:00
Timothy Smith
d62d3f34a7 Up-merge from 5.0; adds test for innodb bug 34286 (but no code changes). 2008-08-13 01:27:22 -06:00
Mattias Jonsson
45c8998bdd merge (into the latest mysql-5.1-bugteam tree) 2008-08-13 08:59:05 +02:00
Timothy Smith
793a928127 Merge in new test case 2008-08-13 00:12:06 -06:00
Timothy Smith
492a83a5e3 Merge some 5.0 innodb changes 2008-08-13 00:11:11 -06:00
Marc Alff
6eb4de5dcc Merge mysql-5.1-bugteam -> local bugfix branch 2008-08-12 17:45:04 -06:00
Marc Alff
9b619d2d49 Bug#38296 (low memory crash with many conditions in a query)
This fix is for 5.1 only : back porting the 6.0 patch manually

The parser code in sql/sql_yacc.yy needs to be more robust to out of
memory conditions, so that when parsing a query fails due to OOM,
the thread gracefully returns an error.

Before this fix, a new/alloc returning NULL could:
- cause a crash, if dereferencing the NULL pointer,
- produce a corrupted parsed tree, containing NULL nodes,
- alter the semantic of a query, by silently dropping token values or nodes

With this fix:
- C++ constructors are *not* executed with a NULL "this" pointer
when operator new fails.
This is achieved by declaring "operator new" with a "throw ()" clause,
so that a failed new gracefully returns NULL on OOM conditions.

- calls to new/alloc are tested for a NULL result,

- The thread diagnostic area is set to an error status when OOM occurs.
This ensures that a request failing in the server properly returns an
ER_OUT_OF_RESOURCES error to the client.

- OOM conditions cause the parser to stop immediately (MYSQL_YYABORT).
This prevents causing further crashes when using a partially built parsed
tree in further rules in the parser.

No test scripts are provided, since automating OOM failures is not
instrumented in the server.
Tested under the debugger, to verify that an error in alloc_root cause the
thread to returns gracefully all the way to the client application, with
an ER_OUT_OF_RESOURCES error.
2008-08-12 17:05:19 -06:00
Davi Arnaut
cd4f9115f6 Merge and fix tree name. 2008-08-12 17:08:19 -03:00
Davi Arnaut
084a2c94f4 Merge and fix tree name. 2008-08-12 16:52:52 -03:00
Davi Arnaut
b9a9ae561a Merge mysql-5.0-bugteam into mysql-5.0 2008-08-12 15:51:00 -03:00
Mattias Jonsson
b3cac2e422 merge 2008-08-12 17:45:51 +02:00
Davi Arnaut
0be4d2c0df Merge mysql-5.1-bugteam into mysql-5.1 main. 2008-08-12 11:28:43 -03:00
Mattias Jonsson
f84bf0077d manual merge of bug#37402 2008-08-12 12:26:23 +02:00
He Zhenxing
87b43cf0df Apply tomas's patch to fix rpl_row_basic.test, this can fix BUG#37884,
BUG#38369, enable rpl_row_basic_7ndb test
2008-08-12 17:09:36 +08:00
Mattias Jonsson
4cb12690c7 Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

Updated result files after merge
2008-08-12 10:02:30 +02:00
Davi Arnaut
f4313a4d2d Merge mysql-5.0-bugteam into mysql-5.1-bugteam 2008-08-11 21:27:17 -03:00
Davi Arnaut
d5620961a6 Bug#38486: Crash when using cursor protocol
Post-merge fix: mysql_client_test.c is compiled by C compilers
and some C compilers don't support mixed declarations and code
and it's explicitly forbidden by ISO C90.
2008-08-11 20:27:09 -03:00
Marc Alff
385b4bf7ff Manual merge of mysql-5.0-bugteam -> mysql-5.1-bugteam
Note: NULL merge of sql/sql_yacc.yy, the fix for bug#38296 will be provided separately for 5.1
2008-08-11 16:44:13 -06:00
Marc Alff
e087c05d3d Merge mysql-5.0-bugteam -> local bugfix branch 2008-08-11 15:21:29 -06:00
Marc Alff
fd324dd3ff Bug#37302 (missing DBUG_RETURN macro in function "find_key_block" (5.0 only))
Fixed missing DBUG_RETURN in the function find_key_block
2008-08-11 15:08:12 -06:00
Mattias Jonsson
1e73141b65 manual merge of Bug#20129 into 5.1-bugteam 2008-08-11 20:06:08 +02:00
Mattias Jonsson
07e9a6dc2a Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR
PARTITION took another code path (over mysql_alter_table instead of
mysql_admin_table) which differs in two ways:
1) alter table opens the tables in a different way than admin tables do
   resulting in returning with error before it tried the command
2) alter table does not start to send any diagnostic rows to the client
   which the lower admin functions continue to use -> resulting in
   assertion crash

The fix:
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use
the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t.
Adding check in mysql_admin_table to setup the partition list for
which partitions that should be used.


Partitioned tables will still not work with
REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions
to tables, REPAIR TABLE t USE_FRM, and check that the data still
fulfills the partitioning function and then move the table back to
being a partition.

NOTE: I have removed the following functions from the handler
interface:
analyze_partitions, check_partitions, optimize_partitions,
repair_partitions
Since they are not longer needed.
THIS ALTERS THE STORAGE ENGINE API
2008-08-11 20:02:03 +02:00
Chad MILLER
318d288a34 Merge from bugteam 5.0 trunk. 2008-08-11 13:56:54 -04:00