Commit graph

58107 commits

Author SHA1 Message Date
Alexander Nozdrin
96c8843514 A patch for Bug#45118 (mysqld.exe crashed in debug mode
on Windows in dbug.c) -- part 2: a patch for the DBUG subsystem
to detect misuse of DBUG_ENTER / DBUG_RETURN macros.
5.1 version.
2009-09-10 11:40:57 +04:00
Georgi Kodinov
d92b2238f9 null merge of the 5.0 test cleanup 2009-09-09 16:49:33 +03:00
Georgi Kodinov
54847efffd Bug #45159 Part 1 : rejuvenate the jp test suite using normal run.
Updates the results of all the out-dated test suites and adds 
the special mysqltest command to enable innodb for the tests that need it.
2009-09-09 12:06:15 +03:00
Georgi Kodinov
3ec517416b automerge 2009-09-08 12:37:09 +03:00
Alexey Kopytov
97920d3ad9 Automerge. 2009-09-08 12:36:40 +04:00
Martin Hansson
a37c61b0d0 Bug#46259: Merge 2009-09-07 16:52:47 +02:00
Mikael Ronstrom
6a368130ae Automerge 2009-09-07 12:22:57 +02:00
Martin Hansson
fa604f0a3d Bug#46259: 5.0.83 -> 5.1.36, query doesn't work
The parser rule for expressions in a udf parameter list contains 
two hacks: 
First, the parser input stream is read verbatim, bypassing 
the lexer.
Second, the Item::name field is overwritten. If the argument to a
udf was a field, the field's name as seen by name resolution was
overwritten this way.
If the field name was quoted or escaped, it would appear as e.g. "`field`".
Fixed by not overwriting field names.
2009-09-07 11:57:22 +02:00
Mikael Ronstrom
ea5d204370 Fix to ensure that all subpartitions gets deleted before renaming starts, BUG#47029 2009-09-07 10:37:54 +02:00
a7ba25f72b Bug#46010 main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
This test case uses mysqlbinlog to dump the content of master-bin.000001,
but the content of master-bin.000001 is not that this test needs.

MTR runs a lot of test cases on one server, so when this test starts, the current binlog file
might not be master-bin.000001, or there are other events are written by tests before.
'RESET MASTER' command must be called at the begin, it ensures that binlog of this test
is wrote to master-bin.000001 correctly.  

Three other tests have the same problem, They were fixed together.
mysqlbinlog-cp932
binlog_incident
binlog_tmp_table
2009-09-07 13:42:54 +08:00
c21168f37a Bug#45581 Test rpl_row_sp006_InnoDB fails randomly: Unknown database 'mysqltest1'
Postfix.
extra/rpl_tests/rpl_row_sp006.test had changed to fix this bug.
extra/rpl_tests/rpl_row_sp006.test is also referenced by rpl_ndb_sp006,
So rpl_row_sp006.result must be changed too.
2009-09-07 13:01:03 +08:00
Alexey Kopytov
f161723821 Bug #46159: simple query that never returns
The external 'for' loop in remove_dup_with_compare() handled 
HA_ERR_RECORD_DELETED by just starting over without advancing 
to the next record which caused an infinite loop. 
 
This condition could be triggered on certain data by a SELECT 
query containing DISTINCT, GROUP BY and HAVING clauses. 

Fixed remove_dup_with_compare() so that we always advance to 
the next record when receiving HA_ERR_RECORD_DELETED from 
rnd_next().
2009-09-06 00:42:17 +04:00
Davi Arnaut
7d82f7846c Bug#45605: ps_not_windows.test fails:
The plugin feature is disabled, you need HAVE_DLOPEN

Selectively skip tests that require dynamic loading (ie: static builds).
2009-09-04 17:02:17 -03:00
Ramil Kalimullin
770c7d308c Automerge 2009-09-04 21:37:40 +05:00
Ramil Kalimullin
b6ef08bb73 Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0'
on subquery inside a SP 

Problem: repeated call of a SP containing an incorrect query with a 
subselect may lead to failed ASSERT().

Fix: set proper sublelect's state in case of error occured during 
subquery transformation.
2009-09-04 13:14:54 +05:00
Sergey Glukhov
510eac6ec1 5.0-bugteam->5.1-bugteam merge 2009-09-04 12:39:56 +05:00
Sergey Glukhov
e1d49b8143 Bug#45989 memory leak after explain encounters an error in the query
Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up.
The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy.
2009-09-04 12:20:53 +05:00
Satya B
22a97a93b8 merge mysql-5.0-bugteam to mysql-5.1-bugteam 2009-09-04 12:27:10 +05:30
Satya B
eebffb422b Fix for BUG#46384 - mysqld segfault when trying to create table with same
name as existing view

When trying to create a table with the same name as existing view with
join, mysql server crashes.

The problem is when create table is issued with the same name as view, while
verifying with the existing tables, we assume that base table object is 
created always.

In this case, since it is a view over multiple tables, we don't have the 
mysql derived table object.

Fixed the logic which checks if there is an existing table to not to assume
that table object is created when the base table is view over multiple 
tables.
2009-09-04 12:21:54 +05:30
Satya B
23cd4edc42 NULL merge the additional fix for BUG#46591 from mysql-5.0-bugteam to mysql-5.1-bugteam 2009-09-04 11:24:16 +05:30
Satya B
81053daf97 Addition to Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled
for CREATE TABLE...LIKE...

Add my_sync.c to mysqltest sources list in CMakeLists.txt
2009-09-04 11:19:44 +05:30
V Narayanan
097023fee7 Bug#45823 Assertion failure in file row/row0mysql.c line 1386
Inserting a negative value in the autoincrement column of a
partitioned innodb table was causing the value of the auto
increment counter to wrap around into a very large positive
value. The consequences are the same as if a very large positive
value was inserted into a column, e.g. reduced autoincrement
range, failure to read autoincrement counter.

The current patch ensures that before calculating the next
auto increment value, the current value is within the positive
maximum allowed limit.
2009-09-04 09:27:11 +05:30
73a5527e46 BUG#45581 Test rpl_row_sp006_InnoDB fails randomly: Unknown database 'mysqltest1'
Essentially, Bug#45574 results in this bug. The 'CREATE DATABASE IF NOT EXISTS' statement was not 
binlogged, when the database has existed.
Sometimes, the master and slaves become inconsistent. The "CREATE DATABASE
IF NOT EXISTS mysqltest1" statement is not binlogged
if the db 'mysqltest1' existed before the test case is executed. 
So the db 'mysqltest1' can't be created on slave.
     
Patch of Bug#45574 has resolved this problem. 
But I think it is better to replace 'mysqltest1' by default db 'test'.
2009-09-04 09:33:45 +08:00
Satya B
6f7c78509f merge mysql-5.0-bugteam to mysql-5.1-bugteam 2009-09-03 23:54:38 +05:30
Satya B
5a41fb5ce0 Fix for Bug#33785 - myisamchk show warning message
myisamchk tool generates warnings when run on an myisam files (.MYI or .MYD)
This is because of the conversion of max_value for certain options in myisamchk 
from singed long to unsigned long

The max value for the options key_buffer_size, read_buffer_size, write_buffer
_size and sort_buffer_size is given as (long) ~0L which becomes -1  when casted
from signed long to longlong and then casted to ulonglong. When (ulonglong) -1 
is compared with maximal value for GET_ULONG data type, we adjust it to 
(ulonglong) ULONG_MAX and throw the warning.

Fixed by using the right max size.

Max values for the variables (from mysqld.cc)
----------------------------
1. key_buffer_size
   5.0: ULONG_MAX
   5.1: SIZE_T_MAX
   6.0: SIZE_T_MAX

2. read_buffer_size and write_buffer_size
   5.0: INT_MAX32
   5.1: INT_MAX32
   6.0: INT_MAX32

3. sort_buffer_size (aka myisam_sort_buffer_size)
   5.0: UINT_MAX32
   5.1: ULONG_MAX
   6.0: ULONG_MAX

Note: testcase not attached
2009-09-03 23:34:42 +05:30
Georgi Kodinov
acc76a97a0 Bug #46791: Assertion failed:(table->key_read==0),function unknown
function,file sql_base.cc

When uncacheable queries are written to a temp table the optimizer must 
preserve the original JOIN structure, because it is re-using the JOIN 
structure to read from the resulting temporary table.
This was done only for uncacheable sub-queries. 
But top level queries can also benefit from this mechanism, specially if 
they're using index access and need a reset.
Fixed by not limiting the saving of JOIN structure to subqueries
exclusively.
Added a new test file to extend the existing (large) subquery.test.
2009-09-03 18:03:46 +03:00
Satya B
fc2243d69b merge mysql-5.0-bugteam to mysql-5.1-bugteam 2009-09-03 17:59:25 +05:30
Satya B
4a9e7e8e25 Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
      
The mysql server option 'sync_frm' is ignored when table is created with 
syntax CREATE TABLE .. LIKE.. 
      
Fixed by adding the MY_SYNC flag and calling my_sync() from my_copy() when
the flag is set.

In mysql_create_table(), when the 'sync_frm' is set, MY_SYNC flag is passed 
to my_copy(). 
      
Note: TestCase is not attached and can be tested manually using debugger.
2009-09-03 16:02:03 +05:30
Georgi Kodinov
80d872bd9d back to -bugteam 2009-09-02 19:42:46 +03:00
Georgi Kodinov
b14439985f null merge of 5.0 fixes backported from 5.1 2009-09-02 18:45:33 +03:00
Georgi Kodinov
21a01bd60e fixed a valgrind warning in partition_pruning 2009-09-02 18:42:08 +03:00
Georgi Kodinov
db8471aa85 Backported the --parallel=str option from mtr2 for backward compatibility
with the newer pb2 testing environments
2009-09-02 16:36:52 +03:00
Georgi Kodinov
e254a67787 merge 2009-09-02 16:07:52 +03:00
Georgi Kodinov
bb4c5acfb3 merge 2009-09-02 15:33:18 +03:00
Georgi Kodinov
f68c3c0a6e automerge 2009-09-02 15:22:32 +03:00
Georgi Kodinov
7d9f97f5ee fixed a valgrind warning in partitioning code 2009-09-02 15:20:47 +03:00
Davi Arnaut
f076ba2803 Manual merge. 2009-09-02 09:12:18 -03:00
Davi Arnaut
ca96ac5351 Post-merge fix. Observe C declaration placement rules. 2009-09-02 09:02:22 -03:00
Davi Arnaut
5109313e66 Increase thread stack size on HP-UX when built with debug. 2009-09-02 08:45:48 -03:00
Georgi Kodinov
6cfe48d727 moved version to 5.0-main 2009-09-02 13:23:37 +03:00
Georgi Kodinov
8f5b17f529 Fixed win32 compilation warnings 2009-09-02 13:22:47 +03:00
Georgi Kodinov
f7fa5d5a02 fixed compilation warnings 2009-09-02 13:09:01 +03:00
Mattias Jonsson
a04801b6fc merge to update with latest mysql-5.1-bugteam 2009-09-01 15:54:59 +02:00
Georgi Kodinov
dfcbeee1b4 Fixed a problem in how BUILD/check_cpu handles Core 2 Duo processors.
This fixes the regression introduced in 5.1 that prevents 64 bit builds on Intel while still keeping the core2 hack operational so the cluster can build.
2009-09-01 16:39:13 +03:00
Mattias Jonsson
02585b608a post push fix for bug#20577 and bug#46362, disabling warnings 2009-09-01 14:53:27 +02:00
Davi Arnaut
004427a9bb Bug#45611: Minor code cleanup
Remove a self assignment.
Rework a few constructs to avoid a potential overflow.

Based upon patch contributed by Michal Hrusecky
2009-09-01 09:32:26 -03:00
Mattias Jonsson
35ba36d13d Post fix patch for bug#20577 and bug#46362.
On 64-bits machines the calculation gets the wrong types and results
in very large numbers. Fixed by explicitly cast month to (int)
2009-09-01 13:04:56 +02:00
Tatiana A. Nurnberg
cdea23eba4 auto-merge 2009-08-31 12:56:01 -07:00
Tatiana A. Nurnberg
a88c86f67f auto-merge 2009-08-31 12:54:22 -07:00
Tatiana A. Nurnberg
e8d45e1be7 manual merge 2009-08-31 12:40:33 -07:00