Commit graph

60865 commits

Author SHA1 Message Date
Alexey Kopytov
aef97cadfa Bug #8433: Overflow must be an error
All numeric operators and functions on integer, floating point 
and DECIMAL values now throw an 'out of range' error rather 
than returning an incorrect value or NULL,  when the result is 
out of supported range for the corresponding data type. 
 
Some test cases in the test suite had to be updated 
accordingly either because the test case itself relied on a 
value returned in case of a numeric overflow, or because a 
numeric overflow was the root cause of the corresponding bugs. 
The latter tests are no longer relevant, since the expressions 
used to trigger the corresponding bugs are not valid anymore. 
However, such test cases have been adjusted and kept "for the 
record".
2010-03-18 13:38:29 +03:00
Alexander Nozdrin
7c10a8981c Patch for WL#3736: Extended Table, Column and Index Comments.
The task is to 
  (a) add a comment on indexes and 
  (b) increase the maximum length of column, table and the new index comments.

The patch committed on behalf of Yoshinori Matsunobu (Yoshinori.Matsunobu@Sun.COM).
2010-02-20 13:07:32 +03:00
Alexander Nozdrin
7ba0546620 Fix default.conf. 2010-02-20 12:27:30 +03:00
Alexander Nozdrin
7b7dd8dc0a Fix default.conf. 2010-02-20 12:26:22 +03:00
Alexander Nozdrin
2b1fe9c3e1 Auto-merge from mysql-trunk-mtr. 2010-02-20 12:14:09 +03:00
Alexander Nozdrin
70c136ad3a Auto-merge from mysql-5.1-mtr. 2010-02-20 12:09:17 +03:00
Alexander Nozdrin
c4de42d6f9 Auto-merge from mysql-5.1. 2010-02-20 12:08:40 +03:00
Bjorn Munch
f1f68c5982 merge from next-mr 2010-02-18 09:26:21 +01:00
Bjorn Munch
3687803e11 upmerge 51135 2010-02-18 09:09:08 +01:00
Bjorn Munch
a9af3b51a9 upmerge 51135 2010-02-18 09:02:38 +01: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
Bjorn Munch
3796d78eb5 merge 44054 2010-02-17 13:12:30 +01:00
Bjorn Munch
584a6e7425 merge 44054 2010-02-17 13:09:48 +01:00
Alexander Nozdrin
b5936f7340 Re-adding 'include/probes_mysql_nodtrace.h' removed by accident
in 'kostja@sun.com-20091210084103-l4f8u62u4evoy3dc'.

This file is necessary for Windows builds.
2010-02-17 14:37:55 +03: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
Alexander Barkov
ae57a478f8 Merging from mysql-next-mr 2010-02-17 12:24:47 +04:00
Bjorn Munch
53411abce6 fixed wrong merge conflict in mysql-test/include/mtr_warnings.sql 2010-02-16 20:49:21 +01:00
Bjorn Munch
663ffc57c5 Added a needed reap to mysql-test/include/handler.inc 2010-02-16 20:26:44 +01:00
Bjorn Munch
e2a5e14c78 new merge from next-mr 2010-02-16 18:23:21 +01:00
Alexander Nozdrin
cbb02487f6 Prohibit running semi-sync rpl tests in the embedded mode. 2010-02-16 13:12:08 +03:00
Alexander Barkov
f1bae16d7e Post-fix for WL#3090.
Compilation failure problems on non-i386 platforms.
Adding missing parenthesis.
2010-02-16 13:16:12 +04:00
Konstantin Osipov
dd510064f1 A fix and a test case for Bug#47648 "main.merge fails sporadically".
If a prepared statement used both a MyISAMMRG table and a stored 
function or trigger, execution could fail with "No such table"
error or crash. 
The error would come from a failure of the MyISAMMRG engine
to meet the expectations of the prelocking algorithm, 
in particular maintain lex->query_tables_own_last pointer
in sync with lex->query_tables_last pointer/the contents
of lex->query_tables. When adding merge children, the merge
engine would extend the table list. Then, when adding 
prelocked tables, the prelocking algorithm would use a pointer
to the last merge child to assign to lex->query_tables_own_last.
Then, when merge children were removed at the end of
open_tables(), lex->query_tables_own_last
was not updated, and kept pointing
to a removed merge child.

The fix ensures that query_tables_own_last is always in
sync with lex->query_tables_last.

This is a regression introduced by WL#4144 and present only
in next-4284 tree and 6.0.
2010-02-15 19:35:53 +03:00
Alexander Nozdrin
7547912586 Auto-merge from mysql-next-4284. 2010-02-15 17:08:38 +03:00
Dmitry Lenev
aab777ca1e Fix for bug #51093 "Crash (possibly stack overflow) in
MDL_lock::find_deadlock".

On some platforms deadlock detector in metadata locking 
subsystem under certain conditions might have exhausted
stack space causing server crashes.

Particularly this caused failures of rqg_mdl_stability
test on Solaris in PushBuild.

During search for deadlock MDL deadlock detector could 
sometimes encounter loop in the waiters graph in which 
MDL_context which has started search for a deadlock 
does not participate. In such case our algorithm will 
continue looping assuming that either this deadlock will 
be resolved by MDL_context which has created it (i.e.
by one of loop participants) or maximum search depth
will be reached. 
Since max search depth was set to 1000 in the latter case 
on platforms where each iteration of deadlock search 
algorithm needs more than DEFAULT_STACK_SIZE/1000 bytes 
of stack (around 192 bytes for 32-bit and around 256 bytes 
for 64-bit platforms) we might have exhausted stack space.

This patch solves this problem by reducing maximum search
depth for MDL deadlock detector to 32. This should be safe
at the moment as it is unlikely that each iteration of the 
current deadlock detector algorithm will consume more than 
1K of stack (thus total amount of stack required can't be
more than 32K) and we require at least 80K of stack in order
to open any table. Also this value should be (hopefully) big
enough to not cause too much false deadlock errors (there
is an anecdotal evidence that real-life deadlocks are
typically shorter than that).

Additional reasearch should be conducted in future in order
to determine the more optimal value of maximum search depth.

This patch does not include test case as existing
rqg_mdl_stability test can serve as one.
2010-02-15 15:37:48 +03:00
Jon Olav Hauglid
9656026658 Followup to Bug#45225 Locking: hang if drop table with no timeout
This patch removes the unused server variable
"table_lock_wait_timeout".
2010-02-15 13:11:20 +01:00
Alexander Nozdrin
e8d19b9618 Auto-merge from mysql-next-4284. 2010-02-15 15:04:05 +03:00
Alexander Nozdrin
04d77e8f43 After-merge fix. 2010-02-15 15:00:45 +03:00
Dmitry Lenev
68710e2b36 Fix for bug #51136 "Crash in pthread_rwlock_rdlock on
TEMPORARY + HANDLER + LOCK + SP".

Server crashed when one: 
1) Opened HANDLER or acquired global read lock
2) Then locked one or several temporary tables with
   LOCK TABLES statement (but no base tables).
3) Then issued any statement causing commit (explicit 
   or implicit).
4) Issued statement which should have closed HANDLER
   or released global read lock.
   
The problem was that when entering LOCK TABLES mode in the
scenario described above we incorrectly set transactional
MDL sentinel to zero. As result during commit all metadata 
locks were released (including lock for open HANDLER or
global metadata shared lock). Indeed, attempt to release
metadata lock for the second time which happened during
HANLDER CLOSE or during release of GLR caused crash.

This patch fixes problem by changing MDL_context's
set_trans_sentinel() method to set sentinel to correct 
value (it should point to the most recent ticket).
2010-02-15 14:23:36 +03:00
Alexander Nozdrin
6c32fa7357 Manual merge from mysql-next-mr.
Conflicts:
  - sql/log_event.cc
  - sql/sql_class.h
2010-02-15 14:16:49 +03:00
Dmitry Lenev
22bc48b280 Fix for bug #51134 "Crash in MDL_lock::destroy on a concurrent
DDL workload".

When a RENAME TABLE or LOCK TABLE ... WRITE statement which
mentioned the same table several times were aborted during 
the process of acquring metadata locks (due to deadlock 
which was discovered or because of KILL statement) server 
might have crashed.

When attempt to acquire all locks requested had failed we
went through the list of requests and released locks which
we have managed to acquire by that moment one by one. Since 
in the scenario described above list of requests contained 
duplicates this led to releasing the same ticket twice and 
a crash as result.

This patch solves the problem by employing different approach
to releasing locks in case of failure to acquire all locks
requested. 
Now we take a MDL savepoint before starting acquiring locks 
and simply rollback to it if things go bad.
2010-02-15 13:23:34 +03:00
Alexander Barkov
0c61e7ab18 WL#3090 Japanese Character Set adjustments
added:
  @ mysql-test/include/ctype_utf8_table.inc
    Adding a share file to populate all utf8 values [U+0000..U+FFFF]
modified:
  @ include/m_ctype.h
    Introducing MB2 and MY_PUT_MB2 macros

  @ mysql-test/r/ctype_cp932_binlog_stm.result
  @ mysql-test/r/ctype_eucjpms.result
  @ mysql-test/r/ctype_sjis.result
  @ mysql-test/r/ctype_ujis.result
  @ mysql-test/t/ctype_cp932_binlog_stm.test
  @ mysql-test/t/ctype_eucjpms.test
  @ mysql-test/t/ctype_sjis.test
  @ mysql-test/t/ctype_ujis.test
    Adding test

  @ strings/ctype-cp932.c
  @ strings/ctype-eucjpms.c
  @ strings/ctype-sjis.c
  @ strings/ctype-ujis.c
    Adding new functions using Big-Table approach.
2010-02-15 09:57:24 +04:00
Bjorn Munch
af0b944a09 null upmerge 2010-02-14 12:28:33 +01:00
Bjorn Munch
5a8ec4a081 merge from next-mr 2010-02-14 12:26:36 +01:00
Bjorn Munch
a1d0a3e968 null upmerge 2010-02-14 12:25:42 +01:00
Bjorn Munch
052629faf2 merge from trunk 2010-02-14 12:24:16 +01:00
Bjorn Munch
4cc54ef0c3 merge from 5.1 main 2010-02-14 12:22:10 +01:00
Alexander Nozdrin
2fa7509bf0 Empty merge from mysql-trunk. 2010-02-14 13:23:09 +03:00
Alexander Nozdrin
43727b5b1c Fix tree name. 2010-02-14 13:22:03 +03:00
Alexander Nozdrin
9f6a63497f Null-merge (configure.in) from mysql-trunk. 2010-02-13 11:33:27 +03:00
joerg.bruehe@sun.com
f68fbf2c24 Raise version number after cloning 5.5.2-m2 2010-02-12 20:17:53 +01:00
Joerg Bruehe
33f40fe452 Upmerge a merge changeset, whose contents was already here,
so this one doesn't have any contents change.
2010-02-12 17:51:26 +01:00
Joerg Bruehe
22008fb5e5 Automerge from central "trunk-bugfixing". 2010-02-12 17:41:00 +01:00
Joerg Bruehe
c6e6531bf6 Null-upmerge a fix to the RPM spec file, this one was already correct. 2010-02-12 17:30:52 +01:00
Joerg Bruehe
4ecf25d39e Upmerge the RPM spec file correction: "release" was missing. 2010-02-12 17:26:22 +01:00
Joerg Bruehe
a02157aea2 Correction: The "release" setting had got lost in the RPM spec file. 2010-02-12 17:23:22 +01:00
Joerg Bruehe
deee631885 Upmerge the spec file alignment from current 5.5 to the next milestone. 2010-02-12 16:31:18 +01:00
Joerg Bruehe
61ae95ed6b Upmerge the spec file alignment from 5.1 to 5.5,
no other functional changes.
2010-02-12 13:20:42 +01:00
Guilhem Bichot
8e6a72b934 merge with latest next-mr-bugfixing 2010-02-12 13:08:45 +01:00