Commit graph

68131 commits

Author SHA1 Message Date
Magne Mahre
8ede0759c3 Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Anitha Gopi
5511a9d7ba Bug#47792 : Moving test out of disabled state since the problem is not seen anymore 2011-01-11 13:31:51 +05:30
Mattias Jonsson
fde3111498 merge 2011-01-10 17:02:54 +01:00
Mattias Jonsson
0df98f62c3 merge 2011-01-10 16:13:12 +01:00
Matthias Leich
32d3cc2596 The fix for Bug#58414 affecting the test show_check is pushed.
Remove the test from defaults.experimental.
2011-01-10 15:53:06 +01:00
Magne Mahre
296d494e66 Bug#51631 general-log flag doesn't accept "on" as a value in
the my.cnf, works as command
      
Different parsing mechanisms are used for command line/my.cnf 
options  and the SQL commands.  The former only accepted
numeric arguments, and regarded all numbers different from 0 
as 'true'.  Any other argument was parsed as 'false' .
      
This patch adds the words 'true' and 'on' as valid truth
values for boolean option arguments.
      
A test case is not provided, as the fix is simple and
does not warrant a separate test file (no existing
suitable test file was found)

(backported from mysql-trunk)
2011-01-10 15:18:20 +01:00
Mattias Jonsson
b56308e63d Manual merge from 5.1 2011-01-10 15:08:31 +01:00
Jon Olav Hauglid
6bbfe7c62a Bug #58933 Assertion `thd- >is_error()' fails on shutdown with ongoing
OPTIMIZE TABLE

OPTIMIZE TABLE for InnoDB tables is handled as recreate + analyze.
The triggered assert checked that an error had been reported if either
recreate or analyze failed. However the assert failed to take into
account that they could have failed because OPTIMIZE TABLE had been
victim of KILL QUERY, KILL CONNECTION or server shutdown.

This patch adjusts the assert to take this possibility into account.
The problem was only noticeable on debug versions of the server.

Test case added to innodb_mysql_sync.test.
2011-01-10 14:12:23 +01:00
Magne Mahre
90650edf69 Bug#58970 Problem Subquery (without referencing a table)
and Order By
      
When having a UNION statement in a subquery, with no
referenced tables (or only a reference to the virtual
table 'dual'), the UNION did not allow an ORDER BY clause.
      
      i.e:
          SELECT(SELECT 1 AS a UNION 
                 SELECT 0 AS a 
                 ORDER BY a) AS b  or
          SELECT(SELECT 1 AS a FROM dual UNION 
                 SELECT 0 as a 
                 ORDER BY a) AS b
      
      
In addition, an ORDER BY / LIMIT clause was not accepted
in subqueries even for single SELECT statements with no 
referenced tables (or with 'dual' as table reference)
      
   i.e: 
      SELECT(SELECT 1 AS a ORDER BY a) AS b  or
      SELECT(SELECT 1 AS a FROM dual ORDER BY a) AS b
      
The fix was to allow an optional ORDER BY/LIMIT clause to
the grammar for these cases.
      
See also: Bug#57986
2011-01-10 13:43:12 +01:00
Magne Mahre
1b64516756 Bug#57986 ORDER BY clause is not used after a UNION,
if embedded in a SELECT
            
An ORDER BY clause was bound to the incorrect
(sub-)statement when used in a UNION context.
            
In a query like:
SELECT * FROM a UNION SELECT * FROM b ORDER BY c
the result of SELECT * FROM b is sorted, and then
combined with a.  The correct behaviour is that
the ORDER BY clause should be applied on the
final set.   Similar behaviour was seen on LIMIT
clauses as well.
            
In a UNION statement, there will be a select_lex
object for each of the two selects, and a 
select_lex_unit object that describes the UNION
itself.  Similarly, the same behaviour was also
seen on derived tables.
            
The bug was caused by using a grammar rule for
ORDER BY and LIMIT that bound these elements
to thd->lex->current_select, which points to the
last of the two selects, instead of to the 
fake_select_lex member of the master select_lex_unit
object.


sql/sql_yacc.yy:
  Need to use (opt_)union_order_or_limit to
  bind to the correct select_lex object.
2011-01-10 13:16:50 +01:00
Mattias Jonsson
2f47416678 merge 2011-01-10 12:56:27 +01:00
Mattias Jonsson
770c3f3a7a merge 2011-01-10 12:53:24 +01:00
Vasil Dimov
a5263d0afb Merge mysql-5.1 -> mysql-5.5 (empty) 2011-01-08 17:05:08 +02:00
Vasil Dimov
42982791dc Merge mysql-5.5-innodb -> mysql-5.5 2011-01-08 17:00:48 +02:00
Vasil Dimov
28df6d6e00 Merge mysql-5.1-innodb -> mysql-5.1 2011-01-08 16:59:23 +02:00
Vasil Dimov
48b37df38a Null merge mysql-5.1-innodb -> mysql-5.5-innodb
(irrelevant for 5.5 and up)
2011-01-08 16:52:36 +02:00
Vasil Dimov
2815ffeeb9 Increment InnoDB Plugin version from 1.0.14 to 1.0.15.
InnoDB Plugin 1.0.14 has been released with MySQL 5.1.54.
2011-01-08 16:51:19 +02:00
Davi Arnaut
d00b9f103a Bug#58765: Warning in item.h on Windows
Truncate the maximum result length (64-bit wide type) to fit into
the item maximum length (32-bit wide type). This is possible as
this specific branch is only used if the maximum result length
is less than 0x1000000 (MAX_BLOB_WIDTH), which fits comfortably
in a 32-bit wide type.
2011-01-07 17:32:41 -02:00
Davi Arnaut
d4ffbd3ee0 Merge of mysql-5.1 into mysql-5.5. 2011-01-07 17:30:52 -02:00
Davi Arnaut
844d6ed4b2 Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files
WIN32 compilation fixes: define ETIMEDOUT only if not available and
fix typos and add a missing parameter.
2011-01-07 17:28:06 -02:00
Davi Arnaut
998065c3a6 Bug#51023: Mysql server crashes on SIGHUP and destroys InnoDB files
From a user perspective, the problem is that a FLUSH LOGS or SIGHUP
signal could end up associating the stdout and stderr to random
files. In the case of this bug report, the streams would end up
associated to InnoDB ibd files.

The freopen(3) function is not thread-safe on FreeBSD. What this
means is that if another thread calls open(2) during freopen()
is executing that another thread's fd returned by open(2) may get
re-associated with the file being passed to freopen(3). See FreeBSD
PR number 79887 for reference:

  http://www.freebsd.org/cgi/query-pr.cgi?pr=79887

This problem is worked around by substituting a internal hook within
the FILE structure. This avoids the loss of atomicity by not having
the original fd closed before its duplicated.

Patch based on the original work by Vasil Dimov.

include/my_sys.h:
  Export my_freopen.
mysys/my_fopen.c:
  Add a my_freopen abstraction to workaround bugs in specific OSes.
  Add a prototype for getosreldate() as older FreeBSD versions did
  not define one.
sql/log.cc:
  Move freopen abstraction code over to mysys.
  The streams are now only reopened for writing.
2011-01-07 16:33:36 -02:00
Vasil Dimov
39668b4e89 Null merge mysql-5.1-innodb -> mysql-5.5-innodb
This change is relevant only for 5.1.
2011-01-07 16:56:32 +02:00
Vasil Dimov
8a49f0b138 Followup to vasil.dimov@oracle.com-20110107091222-q23qpb5skev0j9gc
Do not use nested AC_CHECK_FUNC() because they result in:

./configure: line 52688: syntax error: unexpected end of file

(which happens only on some platforms and does not happen on others,
I have no idea what is the reason for this)
2011-01-07 16:52:44 +02:00
Matthias Leich
b342d3e763 Fix for Bug#58414 Race condition in show_check.test
Basically take care that disconnects are finished.
2011-01-07 14:37:46 +01:00
Matthias Leich
bc37d5c211 Fix for Bug#47745 innodb.innodb-timeout fails sporadically
- Second scenario checked:
  Ensure via wait routines that the commit comes after the
  processing of the statement which should get finally
  the ER_LOCK_WAIT_TIMEOUT
  --> This should prevent the current bug.
- First scenario checked:
  Ensure via wait routines that the statement is already waiting
  for getting the lock before the commit is given.
  --> No effect on the current bug, but ensure that the right
      scenario is reached.
- Take care that disconnects are finished before the test ends.
  --> Reduce the potential to harm succeeding tests.
- "Mangle" the printout of the current default innodb_lock_wait_timeout value
  --> No need to adjust the test in case the default gets changed in future.
2011-01-07 14:16:28 +01:00
Matthias Leich
530a83a16d 1. Fix for Bug#58600 main.not_embedded_server test does not cleanup properly
- remove the superfluous file
   - add an preemptive removal of the outfile before the
     SELECT ... INTO OUTFILE ...
2. Remove an already disabled subtest
   It's functionality is covered by tests in the suite funcs_1.
3. Adjust the formatting within some sub testcase to the formatting used
   in all other sub testcases
2011-01-07 13:08:05 +01:00
Vasil Dimov
a403e0d0ab Merge mysql-5.1-innodb -> mysql-5.5-innodb (empty) 2011-01-07 13:56:50 +02:00
Vasil Dimov
211c56c022 Fix InnoDB style after mikael@dator8-20101217205840-i7ltx8m6z3uc42kh 2011-01-07 13:54:07 +02:00
Vasil Dimov
a44cf8a6dd Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-07 13:49:06 +02:00
Vasil Dimov
3d27658dae Merge mysql-5.1 -> mysql-5.1-innodb 2011-01-07 13:46:21 +02:00
Vasil Dimov
322cd4a6bd Merge mysql-5.1-innodb -> mysql-5.5-innodb
This is a null-merge because Bug#59327 is present only in 5.1
2011-01-07 11:40:38 +02:00
Vasil Dimov
7365ef123c Fix Bug#59327 Fix autoconf usage for innodb_plugin
AC_CHECK_FUNCS(f1 f2 f3, ACTION_IF_PRESENT)
ACTION_IF_PRESENT is executed if any of f1, f2 or f3 is present.
Fix this misusage, we want the action to be executed if all of the
functions are present.
2011-01-07 11:12:22 +02:00
Jimmy Yang
5f8139430a merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-06 19:50:49 -08:00
Jimmy Yang
5ef429fd3c Fix Bug #55397 cannot select from innodb_trx when trx_query contains blobs
that aren't strings

rb://560 approved by Sunny Bains
2011-01-06 19:36:20 -08:00
Saikumar V
da9cb6e1e2 Adding more mtr commands to runs engine suites. 2011-01-06 16:47:22 +05:30
Sunny Bains
ae6e2a23b2 Fix Bug #58653 - Sporadic crash due to assertion failure 0 == space->n_pending_flushes
Check whether the master and purge thread are active after creating them. Do
not proceed until both threads have started. We do this by checking whether a
slot has been reserved by both the respective threads.
      
Add srv_thread_has_reserved_slot() returns slot no or ULINT_UNDEFINED.
      
rb://536 Approved by Jimmy
2011-01-06 21:41:30 +11:00
Saikumar V
d2b0c83646 Adding more mtr commands to runs engine suites. 2011-01-06 16:09:45 +05:30
Vasil Dimov
a775ea08c8 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-01-06 09:19:02 +02:00
Vasil Dimov
eb771e1e8e Null merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-01-06 09:15:48 +02:00
Vasil Dimov
fd7de284d4 (InnoDB Plugin) Fix Bug#59303 Correct URL in crash message
old URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
new URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

Notice that there is a redirect from the old URL to the new URL, so visiting
the old URL does not give "page not found" error.
2011-01-06 09:12:53 +02:00
Vasil Dimov
15273e4310 (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message
old URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
new URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

Notice that there is a redirect from the old URL to the new URL, so visiting
the old URL does not give "page not found" error.
2011-01-06 09:05:45 +02:00
Jimmy Yang
000bdda32b merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-05 05:47:15 -08:00
Georgi Kodinov
1d9113eae4 merge 2011-01-05 15:02:48 +02:00
Georgi Kodinov
cfc1e33758 Bug #59178: disable the test case 2011-01-05 14:58:05 +02:00
Nirbhay Choubey
a3dc7d4db8 Updating the local repository. 2011-01-05 12:43:30 +05:30
Marc Alff
bd42a05460 Local merge 2011-01-05 08:02:14 +01:00
Nirbhay Choubey
7a8d3e00e9 Modifications in mysql-5.5 engines test suite. 2011-01-05 12:23:05 +05:30
Nirbhay Choubey
7ae713f263 Null-merge from mysql-5.1. 2011-01-05 12:20:55 +05:30
Nirbhay Choubey
c6ffb4b798 Modifications in mysql-5.1 engines test suite. 2011-01-05 12:16:07 +05:30
Jimmy Yang
fe8fbaaddb Fix Bug #59197 double quote in field comment prevents foreign key
constraint creation

rb://557 Approved by Sunny Bains
2011-01-04 22:44:12 -08:00