Commit graph

56312 commits

Author SHA1 Message Date
Davi Arnaut
faaa5febe4 Bug#42524: Function pthread_setschedprio() is defined but seems broken on i5/OS PASE
The problem is that MySQL use of pthread_setschedprio is not
supported by i5/OS and the default system behavior for unsupported
calls is to emit a SIGILL signal which causes the server to
abort.

The solution is to treat the pthread_setschedprio as inexistent
when compiling binaries for i5/OS. This also does not invalidate
the fix for bug 38477 as the only supported dispatch class is
SCHED_OTHER (which is passed to pthread_setschedparam).
2009-02-06 09:00:09 -02:00
Alexey Kopytov
c84fa38855 Merge from team tree. 2009-02-06 13:09:01 +03:00
Alexey Kopytov
a9004eb472 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-06 12:53:20 +03:00
Alexey Kopytov
0a6c553510 Temporarily reverted patch for bug #41868 as it was causing problems in PB. 2009-02-06 12:51:11 +03:00
Gleb Shchepa
a03d62fd01 after-after-push testcase update (bug #39265) 2009-02-05 21:47:24 +04:00
Matthias Leich
f62302dc00 Fix for Bug#42602 main.status: random failures
+ minor improvements
2009-02-05 17:48:47 +01:00
Gleb Shchepa
4c3d82c283 after-push test update (bug #39265) 2009-02-05 17:51:00 +04:00
Alexey Kopytov
ff93b1343d Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-05 15:49:59 +03:00
Alexey Kopytov
e266164832 Merge to team tree. 2009-02-05 15:48:30 +03:00
Alexey Kopytov
58f67beb92 Merge from team tree. 2009-02-05 15:07:11 +03:00
Gleb Shchepa
3d543dd16d Bug #39265: fix for the bug 33699 should be reverted
Documented behaviour was broken by the patch for bug 33699
that actually is not a bug.

This fix reverts patch for bug 33699 and reverts the
UPDATE of NOT NULL field with NULL query to old
behavior.
2009-02-05 13:49:32 +04:00
Gleb Shchepa
49a35c6678 automerge 5.0-bugteam --> 5.1-bugteam (bug 42037) 2009-02-05 13:37:06 +04:00
Gleb Shchepa
23fb47a3ad Bug #42037: Queries containing a subquery with DISTINCT and
ORDER BY could cause a server crash

Dependent subqueries like

  SELECT COUNT(*) FROM t1, t2 WHERE t2.b
   IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a)

caused a memory leak proportional to the
number of outer rows.


The make_simple_join() function has been modified to
JOIN class method to store join_tab_reexec and
table_reexec values in the parent join only
(make_simple_join of tmp_join may access these values
via 'this' pointer of the parent JOIN).

NOTE: this patch doesn't include standard test case (this is
"out of memory" bug). See bug #42037 page for test cases.
2009-02-05 13:30:39 +04:00
Ramil Kalimullin
909d29ee05 Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...)
lead to server crash due to failed type cast.

Fix: return the underlying item's type in case of
NAME_CONST(.. COLLATE ...) to avoid wrong casting.
2009-02-05 11:43:39 +04:00
Alexey Botchkov
9404e88dac merging 2009-02-05 10:33:06 +04:00
Ramil Kalimullin
fd5084f61d Auto-merge 2009-02-05 11:45:30 +04:00
Alexey Botchkov
cf0d0a5e96 Bug#37995 Error message truncation in test "innodb" in embedded mode.
code backported from 6.0


per-file messages:
  include/my_global.h
    Remove SC_MAXWIDTH. This is unused and irrelevant nowadays.
  include/my_sys.h
    Remove errbuf declaration and unused definitions.
  mysys/my_error.c
    Remove errbuf definition and move and adjust ERRMSGSIZE.
  mysys/my_init.c
    Declare buffer on the stack and use my_snprintf.
  mysys/safemalloc.c
    Use size explicitly. It's more than enough for the message at hand.
  sql/sql_error.cc
    Use size explicitly. It's more than enough for the message at hand.
  sql/sql_parse.cc
    Declare buffer on the stack. Use my_snprintf as it will result in
    less stack space being used than by a system provided sprintf --
    this allows us to put the buffer on the stack without causing much
    trouble. Also, the use of errbuff here was not thread-safe as the
    function can be entered concurrently from multiple threads.
  sql/sql_table.cc
    Use MYSQL_ERRMSG_SIZE. Extra space is not needed as my_snprintf will
    nul terminate strings.
  storage/myisam/ha_myisam.cc
Use MYSQL_ERRMSG_SIZE.
  sql/share/errmsg.txt
    Error message truncation in test "innodb" in embedded mode
    filename in the error message can safely take up to 210 symbols.
2009-02-05 10:16:00 +04:00
Chad MILLER
1c0b90c289 Merge from team tree. 2009-02-04 14:42:44 -05:00
Chad MILLER
fdd9ad2cb7 Merge from 5.0-bugteam. 2009-02-04 14:26:04 -05:00
Alfranio Correia
0924179398 auto-merge for BUG#42445. 2009-02-04 19:17:16 +00:00
Chad MILLER
69cd86934d Merge from bug tree. 2009-02-04 13:57:33 -05:00
Matthias Leich
9736298154 Merge 5.0 -> 5.1, null merge necause everything is already in place 2009-02-04 16:50:57 +01:00
Matthias Leich
f3e0950d86 Merge last changesets into tree, no conflicts 2009-02-04 16:34:28 +01:00
Sergey Vojtovich
1ab3b31ff6 Merge 5.0-bugteam -> 5.1-bugteam. 2009-02-04 17:00:40 +04:00
Matthias Leich
9da593de5e Automatic merge, no conflicts 2009-02-04 14:20:05 +01:00
Magnus Svensson
5d130827f6 Merge 2009-02-04 13:29:46 +01:00
Matthias Leich
aa930f78e5 Merge last changesets, no conflicts 2009-02-04 13:10:33 +01:00
Staale Smedseng
0c8c7bcb21 merge from upstream 5.1-bugteam 2009-02-04 13:09:51 +01:00
Sergey Vojtovich
8745e368b7 BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error
stating that the merge table is incorrectly defined. This
happens if MERGE child tables were accessed before and we
failed to open another incorrectly defined MERGE table in
this connection.

myrg_open() internally used my_errno as a variable for determining
failure, and thus could be tricked into a wrong decision by other
uses of my_errno.

With this fix we use function local boolean flag instead of my_errno
to determine failure.
2009-02-04 15:46:23 +04:00
Sergey Glukhov
9ab3654530 Bug#42495 updatexml: Assertion failed: xpath->context, file .\item_xmlfunc.cc, line 2507
Problem:
   RelativeLocationPath can appear only after a node-set expression
   in the third and the fourth branches of this rule:
     PathExpr :: =  LocationPath
                    | FilterExpr
                    | FilterExpr '/' RelativeLocationPath
                    | FilterExpr '//' RelativeLocationPath
   XPatch code didn't check the type of FilterExpr and crashed.
Fix:
   If FilterExpr is a scalar expression
   (variable reference, literal, number, scalar function call)
   return error.
2009-02-04 15:40:12 +04:00
Davi Arnaut
7aec6cceca Merge from upstream 5.1-bugteam 2009-02-04 09:16:43 -02:00
Andrei Elkin
be1b03fd89 Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
fixing build issue, caused by the previous push.
2009-02-04 13:08:27 +02:00
Matthias Leich
2e36bc3d72 Merge of latest changesets into GCA tree 2009-02-04 12:07:52 +01:00
Andrei Elkin
da01f3846b Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
The bug happened because filtering-out a STMT_END_F-flagged event so that
the transaction COMMIT finds traces of incomplete statement commit.
Such situation is only possible with ndb circular replication. The filtered-out
rows event is one that immediately preceeds the COMMIT query event.
      
Fixed with deploying an the rows-log-event statement commit at executing
of the transaction COMMIT event. 
Resources that were allocated by other than STMT_END_F-flagged event of
the last statement are clean up prior execution of the commit logics.
2009-02-04 12:13:54 +02:00
Magnus Svensson
15dc0c2a74 Bug#42588 system_mysql_db_fix30020 fails when run from bin dist with mtr2
- Properly set --bindir=$path_client_bindir and --basedir=$basedir by adding %s format specifier
2009-02-04 10:49:52 +01:00
Alexey Kopytov
887d1493fa Fix for bug #41868: crash or memory overrun with concat + upper, date_format
functions
      
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE).  This could lead to memory overruns in some cases.
2009-02-03 20:19:01 +03:00
Davi Arnaut
bc03c9ef19 Bug#40536: SELECT is blocked by INSERT DELAYED waiting on
upgrading lock, even with low_priority_updates

The problem is that there is no mechanism to control whether a
delayed insert takes a high or low priority lock on a table.

The solution is to modify the delayed insert thread ("handler")
to take into account the global value of low_priority_updates
when taking table locks. The value of low_priority_updates is
retrieved when the insert delayed thread is created and will
remain the same for the duration of the thread.
2009-02-03 15:16:24 -02:00
Matthias Leich
449bfbd7fa Merge 5.0 -> 5.1
+ fix wrong resultfile have_outfile.require
2009-02-03 14:45:17 +01:00
Staale Smedseng
d45e2f4515 Bug #41580 opt_threads option is not used anywhere at all
Option opt_threads is deprecated in 5.1, and a warning is
printed when used. Will remove in 6.0.
2009-02-03 13:46:25 +01:00
Alfranio Correia
70c94f3663 BUG#42445 Warning messages in innobase/handler/ha_innodb.cc
There was a type casting problem in the storage/innobase/handler/ha_innodb.cc,
(int ha_innobase::write_row(...)). Innobase uses has an internal error variable
of type 'ulint' while mysql uses an 'int'. 
      
To fix the problem the function manipulates an error variable of
type 'ulint' and only casts it into 'int' when needs to return the value.
2009-02-03 11:36:46 +00:00
Patrick Crews
6fb2ba1c3d merge 5.0 -> 5.1 2009-02-02 17:56:45 -05:00
Patrick Crews
ed5ee58bfc Bug#39369: execution of "variables.test" with "check-testcases" show differences.
The original symptoms of this bug have been fixed as a consequence of other bug fixes.
Taking this time to correct some formatting, such as replacing error numbers with names.
Beginning this with 5.0
2009-02-02 17:30:02 -05:00
Serge Kozlov
36b12d8843 Bug#38603:
The patch adds restart of mysql server and replacing of binlog file 
when mysql server is stopped.
2009-02-03 00:26:49 +03:00
Matthias Leich
7da691c9f8 1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements like
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Modifications according to the code review are included.
Fixed tests:
grant2
grant3
lock_tables_lost_commit
mysqldump
openssl_1
outfile
2009-02-02 22:20:25 +01:00
Andrei Elkin
176a788105 Bug #41732 rpl_ndb_circular_2ch needs an updated configuration file
There are two issues: 
      1. 6.0 uses the obsolate master-*** server options;
      2. the test is not deterministic in that although master vs slave consistency is
         fine, two runs of the test can have different results. The reason of the
         non-determinism is the combination of 
         a chosen way to demo results and the ndb_autoincrement_prefetch_sz feature.

The current patch fixes the 2nd issue by putting out results via diff_table macro
instead of the former run-sensitive method.
The 1st issue is going to be fixed by a separate patch to 6.0.
2009-02-02 22:31:01 +02:00
Tatiana A. Nurnberg
ba1b30ab66 auto-merge 2009-02-02 14:37:30 +01:00
Alexander Barkov
a491bcc4e5 Bug#41084 full-text index added to custom UCA collation not working
Problem:
Custom UCA collations didn't set the MY_CS_STRNXFRM flag,
which resulted in "prefix_search" method instead of
the required "seq_search".

Problem2: (not metioned in the bug report)
Custom UCA collations didn't also set the MY_CS_UNICODE flag,
so an attempt to compare a column with a custom UCA collation
to another column with a non-Unicode character set led to
the "illegal mix of collation" error.

Fix:
the two missing flags was added into collation initialization.

  Upgrade:

  - All fulltext indexes with custom UCA collations should be rebuilt.

  - Non-fulltext custom UCA indexes should likely be rebuild as well.
2009-02-02 17:25:42 +04:00
Tatiana A. Nurnberg
337bf31e9f auto-merge 2009-02-02 14:10:35 +01:00
Serge Kozlov
b6542a374b post-merge push with patch for rpl_ndb_log 2009-02-02 15:06:40 +03:00
Serge Kozlov
01e368d1f6 Post-merge patch for extra/rpl_test/rpl_log.test:
Remove size of binlog file from SHOW BINARY LOGS. 
Changing size of binlog file is an affect of adding or removing events to/from
binlog and it can be checked in next command of test: SHOW BINLOG EVENTS.
For SHOW BINARY LOGS statement enough to show the list of file names.
2009-02-02 14:44:18 +03:00