Commit graph

66442 commits

Author SHA1 Message Date
Jimmy Yang
e168621d61 Fix Bug #55395 INNODB_TRX duplicates columns
rb://408 approved by Sunny Bains
2010-07-26 03:07:36 -07:00
Sven Sandberg
93324cbf0e merged BUG#55322 to 5.1-bugteam 2010-07-26 11:56:30 +02:00
Dmitry Lenev
c67cf159e9 Test for bug #53820 "ALTER a MEDIUMINT column table causes full
table copy".

This patch only adds test case as the bug itself was addressed 
by Ramil's fix for bug 50946 "fast index creation still seems
to copy the table".
2010-07-26 13:22:38 +04:00
Alexander Nozdrin
c8fa4f33e0 Make lowercase_table2 experimental due to Bug 55509. 2010-07-26 12:47:30 +04:00
Alexander Barkov
4382ff0917 Merging from mysql-5.1-bugteam 2010-07-26 10:47:03 +04:00
Alexander Barkov
e497d6e6e1 Bug#45012 my_like_range_cp932 generates invalid string
Problem: The functions my_like_range_xxx() returned
badly formed maximum strings for Asian character sets,
which made problems for storage engines.

Fix: 
- Removed a number my_like_range_xxx() implementations,
  which were in fact dumplicate code pieces.
- Using generic my_like_range_mb() instead.
- Setting max_sort_char member properly for Asian character sets
- Adding unittest/strings/strings-t.c, 
  to test that my_like_range_xxx() return well-formed 
  min and max strings.

Notes:

- No additional tests in mysql/t/ available.
  Old tests cover the affected code well enough.
2010-07-26 09:06:18 +04:00
Vladislav Vaintroub
99a26e0f02 Cleanup after bild team push.
* Fixed obvious errors (HAVE_BROKEN_PREAD is not true for on any
of systems we use, definitely not on HPUX)

* Remove other junk flags for OSX and HPUX

* Avoid checking type sizes in universal builds on OSX, again 
(CMake2.8.0 fails is different architectures return different results)

* Do not compile template instantiation stuff unless 
EXPLICIT_TEMPLATE_INSTANTIATION is used.

* Some cleanup (make gen_lex_hash simpler, avoid dependencies)

* Exclude some unused files from compilation (strtol.c etc)
2010-07-25 19:30:18 +02:00
Vladislav Vaintroub
dd9ff1276d Bug#55169: Installer does not preserve user's settings in custom mode
Fix some issues with WiX packaging, particularly 
major upgrade and change scenarios.

* remember binary location and data location
(for major upgrade)

* use custom UI, which is WiX Mondo extended 
for major upgrade dialog (no feature selection
screen shown on major upgrade, only upgrade
confirmation). This is necessary to prevent
changing installation path during upgrade
(services are not reregistered, so they would 
have invalid binary path is it is changed)

* Hide datafiles that are installed into 
ProgramFiles, show ones that are installed
in ProgramData

* Make MSI buildable with nmake

* Fix autotools "make dist"
2010-07-24 17:26:45 +02:00
Davi Arnaut
2aa7463b70 Add a maintainer target to the warning-mode of the build scripts.
Fix assorted warnings in order for the warning-mode to be effective.
2010-07-24 10:31:48 -03:00
Davi Arnaut
fd2fc60112 Backport fixes for some of the more noise compiler warnings in ndb. 2010-07-24 09:54:27 -03:00
Davi Arnaut
c1545bec1e Bug#42733: Type-punning warnings when compiling MySQL
Post-merge fix: remove remaining casts which are now
unnecessary and are actually causing warnings.
2010-07-24 09:24:44 -03:00
Davi Arnaut
bba8d5ca9b Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-23 22:36:21 -03:00
Davi Arnaut
936217aac9 Null merge of Bug#51855 into mysql-trunk-merge. 2010-07-23 22:31:47 -03:00
Davi Arnaut
85ba960229 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-23 22:28:44 -03:00
Davi Arnaut
f860873c0d Bug#55501: Disable innodb plugin usage in the embedded server on certain OSes
Do not attempt to test the innodb plugin with the embedded server,
it's not supported for now.
2010-07-23 21:55:03 -03:00
Davi Arnaut
152df97da1 WL#5498: Remove dead and unused source code
Remove wrappers around inline -- static inline is used without
wrappers throughout the source code. We rely on the compiler or
linker to eliminate unused static functions.
2010-07-23 17:18:36 -03:00
Davi Arnaut
e81506971f WL#5498: Remove dead and unused source code
Remove workarounds for ancient systems.
2010-07-23 17:17:55 -03:00
Davi Arnaut
68cd3bce9c WL#5498: Remove dead and unused source code
Remove unused string functions.
2010-07-23 17:17:14 -03:00
Davi Arnaut
60ab2b9283 WL#5498: Remove dead and unused source code
Remove unused macros or macro which are always defined.
2010-07-23 17:16:29 -03:00
Davi Arnaut
72fbf95e5d WL#5498: Remove dead and unused source code
Remove the obsolete and buggy bmove512, use memcpy instead.
2010-07-23 17:15:41 -03:00
Davi Arnaut
85bbcfee02 WL#5498: Remove dead and unused source code
Remove the ancient and dead raid code. By now, even the server side
has been removed.
2010-07-23 17:15:07 -03:00
Davi Arnaut
e83f1d37c4 WL#5498: Remove dead and unused source code
Remove unused source code and associated paraphernalia.
2010-07-23 17:14:35 -03:00
Davi Arnaut
fb91a92330 WL#5498: Remove dead and unused source code
Remove Windows related files which aren't used anymore.
2010-07-23 17:14:04 -03:00
Davi Arnaut
dd14fa18af WL#5498: Remove dead and unused source code
Remove unused variables.
2010-07-23 17:13:36 -03:00
Davi Arnaut
9fd9857e0b WL#5498: Remove dead and unused source code
Remove code that has been disabled for a long time.
2010-07-23 17:09:27 -03:00
Vasil Dimov
6af3c0f947 Increment InnoDB Plugin version to 1.0.11.
InnoDB Plugin 1.0.10 has been released with MySQL 5.1.49.
2010-07-23 19:32:38 +03:00
Bjorn Munch
be55e8d59d merge from trunk 2010-07-23 15:12:58 +02:00
Alexander Nozdrin
d42d9378c4 Auto-merge from mysql-trunk. 2010-07-23 17:06:26 +04:00
Bjorn Munch
2994f8b7f1 Bug #55503 MTR fails to filter LEAK SUMMARY from valgrind report of restarted servers
Was not covered by "skip" pattern
Replace with a more generic pattern for SUMMARY
2010-07-23 14:53:09 +02:00
Alexander Nozdrin
76f80ae98d Auto-merge from mysql-trunk-bugfixing. 2010-07-23 16:18:20 +04:00
Dmitry Shulga
32372a756f Merge 5.1-bugteam -> 5.1-bug-42496 2010-07-23 18:15:56 +07:00
Vasil Dimov
10870186e5 Merge mysql-5.1 -> mysql-5.1-innodb 2010-07-23 12:51:14 +03:00
Jon Olav Hauglid
97bfd559f1 Bug #55498 SHOW CREATE TRIGGER takes wrong type of metadata lock
The first problem was that SHOW CREATE TRIGGER took a stronger metadata
lock than required. This caused the statement to be blocked when it was
not needed. For example, LOCK TABLE WRITE in one connection would block
SHOW CREATE TRIGGER in another connection.

Another problem was that a SHOW CREATE TRIGGER statement issued inside
a transaction did not release its metadata locks at the end of the
statement execution. This happened even if SHOW CREATE TRIGGER is an
information statement. The consequence was that SHOW CREATE TRIGGER
was able to block other connections from accessing the table
(e.g. using ALTER TABLE).

This patch fixes the problem by changing SHOW CREATE TRIGGER to take
a MDL_SHARED_HIGH_PRIO metadata lock similar to what is already done
for SHOW CREATE TABLE. The patch also changes SHOW CREATE TRIGGER to
explicitly release any metadata locks taken by the statement after
it completes.

Test case added to show_check.test.
2010-07-23 10:44:55 +02:00
Vasil Dimov
3074ff5233 Fix the failing innodb.innodb_bug54679 test
A change in the default values of some config parameters
caused this test to fail, adjust the test and make it more
robust so it does not fail for the same reason in the future.
2010-07-23 10:37:44 +03:00
kevin.lewis@oracle.com
11f6e69046 Merge 2010-07-22 11:17:26 -05:00
kevin.lewis@oracle.com
11b0caf1d6 Bug#49542 - Do as the comment suggests and downgrade directory errors from find_file() to a warning unless they happen during a SHOW command. 2010-07-22 11:15:15 -05:00
Luis Soares
2773385dd7 BUG#55387: binlog.binlog_tmp_table crashes the server
sporadically

There are two problems:

1. When closing temporary tables, during the THD clean up - and
   after the session connection was already closed, there is a
   chance we can push an error into the THD diagnostics area, if
   the writing of the implicit DROP event to the binary log fails
   for some reason. As a consequence an assertion can be
   triggered, because at that point the diagnostics area is
   already set.

2. Using push_warning with MYSQL_ERROR::WARN_LEVEL_ERROR is a 
   bug.

Given that close_temporary_tables is mostly called from
THD::cleanup - ie, with the session already closed, we fix
problem #1 by allowing the diagnostics area to be
overwritten. There is one other place in the code that calls
close_temporary_tables - while applying Start_log_event_v3. To
cover that case, we make close_temporary_tables to return the
error, thus, propagating upwards in the stack.

To fix problem #2, we replace push_warning with sql_print_error.
2010-07-22 16:56:50 +01:00
Davi Arnaut
92b9ca5422 Do not generate autotools configuration scripts when cmake is to be used. 2010-07-22 08:30:14 -03:00
Jon Olav Hauglid
e814e9ac1e Bug #54905 Connection with WRITE lock cannot ALTER table due to
concurrent SHOW CREATE

The problem was that a SHOW CREATE TABLE statement issued inside
a transaction did not release its metadata locks at the end of the
statement execution. This happened even if SHOW CREATE TABLE is an
information statement. 

The consequence was that SHOW CREATE TABLE was able to block other
connections from accessing the table (e.g. using ALTER TABLE).

This patch fixes the problem by explicitly releasing any metadata
locks taken by SHOW CREATE TABLE after the statement completes.

Test case added to show_check.test.
2010-07-22 11:10:35 +02:00
Vasil Dimov
0dd0f30ba5 Fix .bzr-mysql/default.conf after the merge from mysql-trunk-bugfixing 2010-07-22 11:10:36 +03:00
Jon Olav Hauglid
131095149f Bug #55223 assert in Protocol::end_statement during CREATE DATABASE
The problem was that a statement could cause an assert if it was aborted by
KILL QUERY while it waited on a metadata lock. This assert checks that a
statement either sends OK or an error to the client. If the bug was triggered
on release builds, it caused OK to be sent to the client instead of
ER_QUERY_INTERRUPTED.

The root cause of the problem was that there are two separate ways to tell if a
statement is killed: thd->killed and mysys_var->abort. KILL QUERY causes both
to be set, thd->killed before mysys_var->abort. Also, both values are reset
at the end of statement execution. This means that it is possible for
KILL QUERY to first set thd->killed, then have the killed statement reset
both thd->killed and mysys_var->abort and finally have KILL QUERY set
mysys_var->abort. This means that the connection with the killed statement
will start executing the next statement with the two values out of sync - i.e.
thd->killed not set but mysys_var->abort set.

Since mysys_var->abort is used to check if a wait for a metadata lock should
be aborted, the next statement would immediately abort any such waiting.
When waiting is aborted, no OK message is sent and thd->killed is checked to
see if ER_QUERY_INTERRUPTED should be sent to the client. But since
the->killed had been reset, neither OK nor an error message was sent to the
client. This then triggered the assert.

This patch fixes the problem by changing the metadata lock waiting code to
check thd->killed.

No test case added as reproducing the assert is dependent on very exact timing
of two (or more) threads. The patch has been checked using RQG and the grammar
posted on the bug report.
2010-07-22 10:00:32 +02:00
Sunny Bains
b00f156088 Remove code that was added during the flush list mutex refactoring. We cannot
release a dirty page in the middle of a mini-transaction. Replace the code
with an assertion that checks for this condition.

Original svn revision was: r6330.
2010-07-22 14:46:12 +10:00
Sunny Bains
7c6d9a94b7 Bug#54583 InnoDB: Assertion failure sync/sync0sync.c:1226
Silence the UNIV_SYNC_DEBUG assertion failure while upgrading old data files
to multiple rollback segments during server startup. Because the upgrade
takes place while InnoDB is running a single thread, we can safely ignore the
latching order checks without fearing deadlocks.
      
innobase_start_or_create_for_mysql(): Set srv_is_being_started = FALSE
only after trx_sys_create_rsegs() has completed.
      
sync_thread_add_level(): If srv_is_being_started, ignore latching order
violations for SYNC_TRX_SYS_HEADER and SYNC_IBUF_BITMAP.

Create all the non-IO threads after creating the extra rollback segments.

Patch originally from Marko with some additions by Sunny.
2010-07-22 09:16:19 +10:00
Sunny Bains
043e9e2491 Bug 54617 - During shutdown: Failing assertion: arr->n_reserved == 0
Get rid of at least on suspicious path. Ensure that the purge thread
doesn't acquire a mutex after it has signalled shutdown.
2010-07-22 07:41:51 +10:00
Vasil Dimov
6a8e6ac4c5 Increment InnoDB version to 1.1.2
InnoDB 1.1.1 was released with MySQL 5.5.5-m3
2010-07-21 20:19:59 +03:00
Georgi Kodinov
bb2a8df377 merge 2010-07-21 18:43:44 +03:00
Georgi Kodinov
142afb1fed merge 2010-07-21 18:36:10 +03:00
Georgi Kodinov
7a2293d192 merge 2010-07-21 18:34:20 +03:00
Georgi Kodinov
f07f225c75 merge 2010-07-21 18:31:28 +03:00
Georgi Kodinov
7330233b96 merge 2010-07-21 18:20:29 +03:00