Commit graph

54889 commits

Author SHA1 Message Date
Alexey Botchkov
acdaa9aef6 Bug#38005 Partitions: error with insert select.
MyISAM blocks index usage for bulk insert into zero-records tables.
See ha_myisam::start_bulk_insert() lines from
...
    if (file->state->records == 0 ...
...

That causes problems for partition engine when some partitions have records some not
as the engine uses same access method for all partitions.

Now partition engine doesn't call index_first/index_last
for empty tables.

per-file comments:
  mysql-test/r/partition.result
        Bug#38005 Partitions: error with insert select.
        test result

  mysql-test/t/partition.test
        Bug#38005 Partitions: error with insert select.
        test case

  sql/ha_partition.cc
        Bug#38005 Partitions: error with insert select.
        ha_engine::index_first and
        ha_engine::index_last not called for empty tables.
2008-10-06 18:14:20 +05:00
Alexey Botchkov
79a66a9763 Bug#38083 Error-causing row inserted into partitioned table despite error 2008-10-06 17:22:38 +05:00
Mattias Jonsson
0b097b7777 merge 2008-10-03 14:38:16 +02:00
Mats Kindahl
e29acd99b8 Merging with 5.1-5.1.29-rc. 2008-10-03 13:03:17 +02:00
Mats Kindahl
d19bdf3b30 The test rpl_blackhole was executed even when
there were no blackhole installed. This patch
adds a check for that.
2008-10-03 12:52:01 +02:00
Georgi Kodinov
1d15cb560a Bug #38370: The test ndb.ndb_index_ordered fails with the community features on
The problem was caused by a wrong merge. Fixed by enabling the correct ndb variables
initialization.
2008-10-03 13:10:09 +03:00
Georgi Kodinov
b58e6f2e49 merged 5.1.29-rc 2008-10-03 12:54:53 +03:00
Mattias Jonsson
c2d55ee203 post push fix for bug#38804 (back port of bug#33479)
Removes the regression bug#38751.
2008-10-03 11:30:54 +02:00
Georgi Kodinov
de57273639 merged 5.1-5.1.29-rc 2008-10-03 11:09:20 +03:00
Mats Kindahl
66a3dbceff Merging with 5.1-5.1.29-rc. 2008-10-03 09:36:22 +02:00
Mats Kindahl
3337923cfd Bug #38360: BLACKHOLE replication with RBR is broken
Incremental patch to add comments to test cases.
2008-10-02 21:13:15 +02:00
Georgi Kodinov
452fed70eb Bug #37348: Crash in or immediately after JOIN::make_sum_func_list
The optimizer pulls up aggregate functions which should be aggregated in
an outer select. At some point it may substitute such a function for a field
in the temporary table. The setup_copy_fields function doesn't take this
into account and may overrun the copy_field buffer.
      
Fixed by filtering out the fields referenced through the specialized
reference for aggregates (Item_aggregate_ref).
Added an assertion to make sure bugs that cause similar discrepancy 
don't go undetected.
2008-10-02 17:44:49 +03:00
Mats Kindahl
43fb8633b0 Bug #38360: BLACKHOLE replication with RBR is broken
The Blackhole engine did not support row-based replication
since the delete_row(), update_row(), and the index and range
searching functions were not implemented.

This patch adds row-based replication support for the
Blackhole engine by implementing the two functions mentioned
above, and making the engine pretend that it has found the
correct row to delete or update when executed from the slave
SQL thread by implementing index and range searching functions.

It is necessary to only pretend this for the SQL thread, since
a SELECT executed on the Blackhole engine will otherwise never
return EOF, causing a livelock.
2008-10-02 11:02:38 +02:00
Andrei Elkin
a5dee74dbd merge from the 5.1-5.1.29 to the local tree. 2008-10-02 11:42:23 +03:00
Andrei Elkin
4310d57305 Bug #36968 rpl_temporary_errors.test produces warning in pushbuild
backporting a part of the bug patch to 5.1.29 tree which uses an older version of mtr.
2008-10-02 10:46:14 +03:00
Ramil Kalimullin
0be194e5c3 Merge 2008-10-02 10:56:07 +05:00
Georgi Kodinov
74f2babadf merged 5.1-5.1.29 -> 5.1-bugteam 2008-10-01 17:48:38 +03:00
Mattias Jonsson
cfdc39d323 merge 2008-10-01 15:21:55 +02:00
Georgi Kodinov
0005175e5e null merge of the 5.0-bugteam symlink test failure fix 2008-10-01 16:01:04 +03:00
Georgi Kodinov
bed942c9ad fixed a failure in symlink.test caused by replacing rm with remove_file 2008-10-01 15:53:11 +03:00
Davi Arnaut
4103dea401 Bug#35164: Large number of invalid pthread_attr_setschedparam calls
Bug#37536: Thread scheduling causes performance degradation at low thread count

Deprecated --skip-thread-priority startup option as newer versions of
the server won't change the thread priorities by default.

Giving threads different priorities might yield marginal improvements
in some platforms (where it actually works) but on the other hand it
might cause significant degradation depending on the thread count and
number of processors. Meddling with the thread priorities is a not a
safe bet as it is very dependent on the behavior of the cpu scheduler
and system where MySQL is being run.

From MySQL 6.0 and up the default behavior is that of not modifying
the threads priorities.
2008-10-01 09:24:35 -03:00
Mattias Jonsson
91d6278c5e pre push fix for bug#38804 2008-10-01 12:40:05 +02:00
Mattias Jonsson
c51023d90b merge 2008-10-01 12:14:55 +02:00
Georgi Kodinov
74a905df93 fixed a win32 warning caused by the fix for bug #35981 2008-10-01 13:12:08 +03:00
Georgi Kodinov
da6ea5a194 merged 5.0-bugteam -> 5.1-bugteam 2008-10-01 12:52:51 +03:00
Ramil Kalimullin
dc6a5ff899 Fix for bug#39182: Binary log producing incompatible character set query
from stored procedure. 

Problem: we replace all references to local variables in stored procedures     
with NAME_CONST(name, value) logging to the binary log. However, if the
value's collation differs we might get an 'illegal mix of collation'           
error as we don't pass the collation to the function.

Fix: pass the value's collation to NAME_CONST().

Note: actually we should pass to NAME_CONST() the value's derivation as well.
It's impossible without the parser modifying. Now we always set the 
derivation to DERIVATION_IMPLICIT, the same as local variables have.
2008-10-01 14:48:47 +05:00
Georgi Kodinov
435f54fce0 merged 5.1-5.1.29-rc -> 5.1-bugteam 2008-10-01 12:47:25 +03:00
Georgi Kodinov
b97291d2dc fixed a wrong directory in distinct.test 2008-10-01 12:45:02 +03:00
Georgi Kodinov
d80f408d63 merged 5.0-main -> 5.0-bugteam 2008-10-01 12:42:45 +03:00
Georgi Kodinov
9c9a92b99a merged 5.0-5.1.29-rc into 5.0-bugteam 2008-10-01 12:41:13 +03:00
Patrick Crews
749f8b3ec1 automerge 2008-09-30 22:01:50 -04:00
Patrick Crews
af84837635 Bug#38311 Some tests use 'rm' which is not portable
Repush of change to fix tests on Pushbuild.
2008-09-30 20:54:06 -04:00
Davi Arnaut
16898ad123 Merge from main branch. 2008-09-30 18:23:04 -03:00
Davi Arnaut
44fbfe6fdb Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc
Link with mtmalloc on Solaris as it is done in our release builds.
Replace deprecated flag with the newer option as already done in
other scripts.
2008-09-30 17:57:48 -03:00
Patrick Crews
2f58dc7972 automerge 2008-09-30 16:23:04 -04:00
Patrick Crews
99abc81c5f Merge 5.0 -> 5.1 2008-09-30 15:32:35 -04:00
Patrick Crews
c7f32b02ac Automerge 2008-09-30 12:56:12 -04:00
Davi Arnaut
f87973fe2c Bug#34306: Can't make copy of log tables when server binary log is enabled
Post-merge bug fix: lock_type is a enumeration type and not a bit mask.
2008-09-30 10:47:01 -03:00
Gleb Shchepa
a938da539c manual merge 5.0-bugteam --> 5.1-bugteam 2008-09-30 18:16:11 +05:00
Gleb Shchepa
e20b9de18e Fixed bug #17823: 'arc' directories inside database directories.
Server created "arc" directories inside database directories and
maintained there useless copies of .frm files.

Creation and renaming procedures of those copies as well as
creation of "arc" directories has been discontinued.
Removal procedure has been kept untouched to be able to
cleanup existent database directories by the DROP DATABASE
query. Also view renaming procedure has been updated to remove
these directories.
2008-09-30 17:50:28 +05:00
Alexey Botchkov
3bf44a8622 merging 2008-09-30 10:41:30 +05:00
Davi Arnaut
b976918c3f Merge from parent branch. 2008-09-29 14:42:36 -03:00
Alexey Botchkov
b6f4b1c083 Bug#37949 Crash if argument to SP is a subquery that returns more than one row
JOIN for the subselect wasn't cleaned if we came upon an error
     during sub_select() execution. That leads to the assertion failure
     in close_thread_tables()

     part of the 6.0 code backported

per-file comments:
  mysql-test/r/sp-error.result
Bug#37949 Crash if argument to SP is a subquery that returns more than one row 
    test result

  mysql-test/t/sp-error.test
Bug#37949 Crash if argument to SP is a subquery that returns more than one row 
    test case

  sql/sp_head.cc
Bug#37949 Crash if argument to SP is a subquery that returns more than one row 
    lex->unit.cleanup() call added if not substatement
2008-09-29 19:11:34 +05:00
Davi Arnaut
35ffaf10e3 Bug#34306: Can't make copy of log tables when server binary log is enabled
The problem is that when statement-based replication was enabled,
statements such as INSERT INTO .. SELECT FROM .. and CREATE TABLE
.. SELECT FROM need to grab a read lock on the source table that
does not permit concurrent inserts, which would in turn be denied
if the source table is a log table because log tables can't be
locked exclusively.

The solution is to not take such a lock when the source table is
a log table as it is unsafe to replicate log tables under statement
based replication. Furthermore, the read lock that does not permits
concurrent inserts is now only taken if statement-based replication
is enabled and if the source table is not a log table.
2008-09-29 10:53:40 -03:00
He Zhenxing
05c0a9de97 BUG#35843 Slow replication slave when using partitioned myisam table
In order to improve the performance when replicating to partitioned
myisam tables with row-based format, the number of rows of current 
rows log event is estimated and used to setup storage engine for bulk
inserts.
2008-09-26 17:39:47 +08:00
Kristofer Pettersson
4223fa0e1e Automerge 2008-09-25 19:08:46 +02:00
Patrick Crews
51c40c5bd0 Bug#38311 - Fix of some cruft from remove_files in ndb_autodiscover.test, clean up of distinct.test,
and replacing error numbers with error names.
2008-09-23 05:24:32 -04:00
Mattias Jonsson
9d7aac9cef merge 2008-09-23 12:24:30 +03:00
Patrick Crews
9a86c50092 merge of changes 2008-09-22 15:33:38 -04:00
Patrick Crews
92a3b67393 Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust
Trimmed some error-prone and variable portions of the test and added 'flush status' to ensure deterministic test
2008-09-22 15:15:52 -04:00