Commit graph

59197 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
b4faea2aa0 manual merge 2010-03-02 18:13:43 +00:00
Tatiana A. Nurnberg
87b4d36e5c Bug#48295: explain extended crash with subquery and ONLY_FULL_GROUP_BY sql
If an outer query is broken, a subquery might not even get set up.
EXPLAIN EXTENDED did not expect this and merrily tried to de-ref all
of the half-setup info.

We now catch this case and print as much as we have, as it doesn't cost us
anything (doesn't make regular execution slower).

backport from 5.1
2010-03-02 18:00:53 +00:00
Sergey Vojtovich
3fcb25d806 Merge innodb-5.1-ss6765 to 5.1-bugteam. 2010-02-26 16:34:13 +04:00
Sergey Glukhov
1bb6ea1727 automerge 2010-02-26 16:19:05 +04:00
Sergey Glukhov
fe94dec679 Bug#50995 Having clause on subquery result produces incorrect results.
The problem is that cond->fix_fields(thd, 0) breaks
condition(cuts off 'having'). The reason of that is
that NULL valued Item pointer is present in the
middle of Item list and it breaks the Item processing
loop.
2010-02-26 15:39:25 +04:00
Evgeny Potemkin
a0723c0665 Auto-merged fox for the bug#50843. 2010-02-26 14:19:44 +03:00
Evgeny Potemkin
cc01fc3f5f Bug#50843: Filesort used instead of clustered index led to
performance degradation.

Filesort + join cache combination is preferred to full index scan because it
is usually faster. But it's not the case when the index is clustered one.

Now test_if_skip_sort_order function prefers filesort only if index isn't
clustered.
2010-02-26 14:17:00 +03:00
Sergey Vojtovich
42d5617950 Applying InnoDB snapshot, fixes BUG#50691
Detailed revision comments:

r6669 | jyang | 2010-02-11 12:24:19 +0200 (Thu, 11 Feb 2010) | 7 lines
branches/5.1: Fix bug #50691, AIX implementation of readdir_r
causes InnoDB errors. readdir_r() returns an non-NULL value
in the case of reaching the end of a directory. It should
not be treated as an error return.

rb://238 approved by Marko
2010-02-26 13:04:24 +04:00
Sergey Vojtovich
757a1ff33a Applying InnoDB snapshot, fixes BUG#38901
Detailed revision comments:

r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines
branches/5.1: Fix Bug #38901
InnoDB logs error repeatedly when trying to load page into buffer pool

In buf_page_get_gen() if we are unable to read a page (because of
corruption or some other reason) we keep on retrying. This fills up
error log with millions of entries in no time and we'd eventually run
out of disk space. This patch limits the number of attempts that we
make (currently set to 100) and after that we abort with a message.

rb://241 Approved by: Heikki
2010-02-26 13:03:58 +04:00
Sergey Vojtovich
167888c6c3 Applying InnoDB snapshot, fixes BUG#49001
Detailed revision comments:

r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines
branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info
incorrect when deadlock detection aborts". Print the correct
lock owner when recursive function lock_deadlock_recursive()
exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK.

rb://217, approved by Marko.
2010-02-26 13:03:23 +04:00
Sergey Vojtovich
6d4e34cabb Applying InnoDB snapshot
Detailed revision comments:

r6538 | sunny | 2010-01-30 00:43:06 +0200 (Sat, 30 Jan 2010) | 6 lines
branches/5.1: Check *first_value every time against the column max
value and  set *first_value to next autoinc if it's > col max value.
ie.  not rely on what is passed in from MySQL.

[49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
rb://236
2010-02-26 13:02:57 +04:00
Sergey Vojtovich
ac68d90faa Applying InnoDB snapshot
Detailed revision comments:

r6537 | sunny | 2010-01-30 00:35:00 +0200 (Sat, 30 Jan 2010) | 2 lines
branches/5.1: Undo r6536.
2010-02-26 13:02:26 +04:00
Sergey Vojtovich
91c42548c8 Applying InnoDB snapshot
Detailed revision comments:

r6536 | sunny | 2010-01-30 00:13:42 +0200 (Sat, 30 Jan 2010) | 6 lines
branches/5.1: Check *first_value everytime against the column max
value and  set *first_value to next autoinc if it's > col max value.
ie.  not rely on what is passed in from MySQL.

[49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
rb://236
2010-02-26 13:02:05 +04:00
Sergey Vojtovich
ffad156254 Applying InnoDB snapshot
Detailed revision comments:

r6535 | sunny | 2010-01-30 00:08:40 +0200 (Sat, 30 Jan 2010) | 11 lines
branches/5.1: Undo the change from r6424. We need to return DB_SUCCESS even
if we were unable to initialize the tabe autoinc value. This is required for
the open to succeed. The only condition we currently treat as a hard error
is if the autoinc field instance passed in by MySQL is NULL.

Previously if the table autoinc value was 0 and the next value was requested
we had an assertion that would fail. Change that assertion and treat a value
of 0 to mean that the autoinc system is unavailable. Generation of next
value will now return failure.

rb://237
2010-02-26 13:01:31 +04:00
Gleb Shchepa
79d8de67a9 Bug #45360: wrong results
Propagation of a large unsigned numeric constant
in the WHERE expression led to wrong result.

For example,
"WHERE a = CAST(0xFFFFFFFFFFFFFFFF AS USIGNED) AND FOO(a)",
where a is an UNSIGNED BIGINT, and FOO() accepts strings,
was transformed to "... AND FOO('-1')".

That has been fixed.

Also EXPLAIN EXTENDED printed incorrect numeric constants in
transformed WHERE expressions like above. That has been
fixed too.
2010-02-25 23:13:11 +04:00
Alexey Kopytov
3dc164664a Automerge. 2010-02-25 19:26:30 +03:00
Alexey Kopytov
735de9ea7e Bug #50335: Assertion `!(order->used & map)' in eq_ref_table
The problem was in an incorrect debug assertion. The expression 
used in the failing assertion states that when finding 
references matching ORDER BY expressions, there can be only one 
reference to a single table. But that does not make any sense, 
all test cases for this bug are valid examples with multiple 
identical WHERE expressions referencing the same table which
are also present in the ORDER BY list. 
 
Fixed by removing the failing assertion. We also have to take 
care of the 'found' counter so that we count multiple 
references only once. We rely on this fact later in 
eq_ref_table().
2010-02-25 18:48:53 +03:00
Georgi Kodinov
6f3770ca3e merge 2010-02-25 17:12:15 +02:00
Georgi Kodinov
b5ae1327f7 Backport of the fix for bug #49552 to 5.0-bugteam 2010-02-25 16:57:15 +02:00
Magne Mahre
a341ec7400 Clean-up in the sys_vars test suite after
WL#5154 and WL5182

Two result files in the sys_vars suite wasn't 
properly updated after the change in
deprecation text
2010-02-23 12:33:20 +01:00
Magne Mahre
0d41207c59 Revert of a change introduced by Bug#47974
"TYPE=storage_engine" is deprecated, and will be removed
in the Celosia release of MySQL.  Since the option is
present in the Betony release and the version number of
Celosia is still not decided, we need to bump the
deprecation version number back up to "6.0".
2010-02-23 12:17:20 +01:00
Timothy Smith
302f50c3e3 auto-merge 2010-02-22 16:34:47 -07:00
Timothy Smith
581423d83b auto-merge 2010-02-22 16:34:04 -07:00
Timothy Smith
dfac5af2b3 auto-merge 2010-02-22 16:31:51 -07:00
Tatiana A. Nurnberg
f91a5fe5c6 auto-merge 2010-02-22 17:57:19 +00:00
Tatiana A. Nurnberg
51e47e1317 revert 48525 2010-02-22 16:58:56 +00:00
Bjorn Munch
38e811b839 merge from 5.1-mtr 2010-02-22 14:52:11 +01:00
Staale Smedseng
5181551dee Bug #43414 Parenthesis (and other) warnings compiling
MySQL with gcc 4.3.2
      
This is the final patch in the context of this bug.
2010-02-22 14:23:47 +01:00
Tatiana A. Nurnberg
0a992ff561 auto-merge 2010-02-22 12:31:50 +00:00
Tatiana A. Nurnberg
ab6feabb6f auto-merge 2010-02-20 16:30:10 +00:00
Alexander Nozdrin
c4de42d6f9 Auto-merge from mysql-5.1. 2010-02-20 12:08:40 +03:00
Tatiana A. Nurnberg
ecf4ba96ff manual merge 2010-02-19 19:06:47 +00:00
Tatiana A. Nurnberg
3678457d3c Bug#49487: crash with explain extended and group_concat in a derived table
When EXPLAIN EXTENDED tries to print column names, it checks whether the
referenced table is CONST (in which case, the column's value rather than
its name will be printed). If no proper table is reference (i.e. because
a derived table was used that has since gone out of scope), this will fail
spectacularly.

This ports an equivalent of the fix for Bug 43354.
2010-02-19 15:16:43 +00:00
Bjorn Munch
13d7179a19 Fixed incomplete merge of 48878, embedded tests fail on Windows 2010-02-19 13:45:25 +01:00
Tatiana A. Nurnberg
c55ba71ec1 Bug#48525: trigger changes "Column 'id' cannot be null" behaviour
CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL;
UPDATE...SET...NULL on NOT NULL fields behaved differently after
a trigger.

Now distinguishes between IGNORE and ERROR_FOR_NULL and save/restores
check-field options.
2010-02-18 17:02:17 +00:00
Georgi Kodinov
ae12a72360 Bug #51049: main.bug39022 fails in mysql-trunk-merge
Fixed the test to behave correctly with ps-protocol
and binlog format row.
2010-02-18 10:48:15 +02:00
Timothy Smith
a5ff234b0d merge 2010-02-17 12:36:16 -07:00
Timothy Smith
6a27e29f40 Request that internals mailing list be notified if the MySQL version formatting changes 2010-02-17 12:00:18 -07:00
hery.ramilison@sun.com
ab1b9cecd9 Merge from mysql-5.1.44-release 2010-02-17 18:48:40 +01:00
hery.ramilison@sun.com
df555c117c configure.in
- Changes to the banner text
 - Use older AC_PROG_LIBTOOL (Bug#51009)

scripts/mysql_install_db.sh
 - Changes to banner text
2010-02-17 18:39:28 +01:00
Bjorn Munch
4d5c86fb27 Bug #51135 Please increase the maximum number of connections allowed in mysqltest
Added --max-connections= argument to mysqltest and mtr
Small fix to first patch: forgot to check before free'ing connections array
2010-02-17 16:28:02 +01:00
Sergey Glukhov
b38ac49cf6 automerge 2010-02-17 16:14:57 +04:00
Sergey Glukhov
c8f278485b Bug#33717 INSERT...(default) fails for enum. Crashes CSV tables, loads spaces for MyISAM
Table corruption happens during table reading in ha_tina::find_current_row() func.
Field::store() method returns error(true) if stored value is 0.
The fix:
added special case for enum type which correctly processes 0 value.
Additional fix:
INSERT...(default) and INSERT...() have the same behaviour now for enum type.
2010-02-17 16:13:42 +04:00
Bjorn Munch
db1f4e0bf9 Bug #44054 MTR2: --no-reorder does not prevent reordering
Some logic would group by suite always
Disable this if using --noreorder
Also fix getting array from collect_one_suite() in this case
Amended according to previous comment
2010-02-17 12:37:37 +01:00
Joerg Bruehe
1c2e33b1fc Fix a bug in the RPM spec file:
A "%define" is no shell command, so it must not be the
only line in the "then" or "else" branch of an "if".

Add a ':' line to make the branch non-empty.
2010-02-17 11:13:15 +01:00
Mattias Jonsson
1e7700b8b8 post push fix for bug#42438, did not compile on non debug,
due to ifdef of include file
2010-02-16 11:42:22 +01:00
Sergey Glukhov
089f4bbd68 automerge 2010-02-16 13:44:36 +04:00
Sergey Glukhov
d2bdeb8cc4 Bug#50591 bit(31) causes Duplicate entry '1-NULL' for key 'group_key'
The problem is that during temporary table creation uneven bits
are not taken into account for hidden fields. It leads to incorrect
calculation&allocation of null bytes size for table record. And
if grouped value is null we set wrong bit for this value(see end_update()).
Fixed by adding separate calculation of uneven bit for hidden fields.
2010-02-16 13:13:49 +04:00
Mattias Jonsson
3596a44430 merge 2010-02-16 09:54:16 +01:00
Georgi Kodinov
780566d4c5 Addendum 2 for bug #46175: NULL read_view and consistent read assertion
Fixed a compilation warning.
2010-02-15 10:54:27 +02:00