Commit graph

61079 commits

Author SHA1 Message Date
Alexander Barkov
c803a7c460 Merging WL#1213 into mysql-next-mr-bar2 2010-02-24 13:52:59 +04:00
Alexander Barkov
8994fad85d Backporting WL#1213
config/ac-macros/character_sets.m4:
  - Adding configure definitions for utf8mb4, utf16, utf32
include/config-win.h:
  - Enabling utf8mb4, utf16, utf32 in Windows build
include/m_ctype.h:
  - Adding new flags
  - Adding new shared functions prototypes
mysql-test/include/ctype_datetime.inc:
  - Adding test to check that datetime functions
    work with "real" multibyte character sets.
mysql-test/include/ctype_like.inc:
  - Adding LIKE tests
mysql-test/include/have_utf16.inc:
  New file
mysql-test/include/have_utf32.inc:
  New file
mysql-test/include/have_utf8mb4.inc:
  New file
mysql-test/r/ctype_ldml.result:
  - Adding tests for utf8mb4, utf16, utf32
mysql-test/r/ctype_many.result:
  - Adding tests to check superset/subset relations
    between all Unicode character sets.
mysql-test/r/ctype_utf16.result:
  New file
mysql-test/r/ctype_utf16_uca.result:
  New file
mysql-test/r/ctype_utf32.result:
  New file
mysql-test/r/ctype_utf32_uca.result:
  New file
mysql-test/r/ctype_utf8.result:
  - Adding tests for utf8mn3 alias
mysql-test/r/ctype_utf8mb4.result:
  - Adding tests for utf8mb4
mysql-test/r/have_utf16.require:
  New file
mysql-test/r/have_utf32.require:
  New file
mysql-test/r/have_utf8mb4.require:
  New file
mysql-test/std_data/Index.xml:
  - Adding tests for loadable utf8m4, utf16, utf32 collations
mysql-test/suite/sys_vars/r/character_set_client_basic.result:
  - Adding tests for utf16, utf32.
  - Fixing new number of character sets
mysql-test/suite/sys_vars/r/character_set_connection_basic.result:
  - Fixing new number of character sets
mysql-test/suite/sys_vars/r/character_set_database_basic.result:
  - Fixing new number of character sets
mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result:
  - Fixing new number of character sets
mysql-test/suite/sys_vars/r/character_set_results_basic.result:
  - Fixing new number of character sets
mysql-test/suite/sys_vars/t/character_set_client_basic.test:
  - Adding tests for new character sets
mysql-test/suite/sys_vars/t/character_set_connection_basic.test:
  - Adding dependency on utf8mb4, utf16, utf32
mysql-test/suite/sys_vars/t/character_set_database_basic.test:
  - Adding dependency on utf8mb4, utf16, utf32
mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test:
  - Adding dependency on utf8mb4, utf16, utf32
mysql-test/suite/sys_vars/t/character_set_results_basic.test:
  - Adding dependency on utf8mb4, utf16, utf32
mysql-test/t/ctype_ldml.test:
  - Adding tests for dynamic utf8mb4, utf16, utf32 collations
mysql-test/t/ctype_many.test:
  - Adding tests to check superset/subset relations
    between all Unicode character sets
mysql-test/t/ctype_utf16.test:
  New file
mysql-test/t/ctype_utf16_uca.test:
  New file
mysql-test/t/ctype_utf32.test:
  New file
mysql-test/t/ctype_utf32_uca.test:
  New file
mysql-test/t/ctype_utf8.test:
  - Adding tests for utf8mb4 alias
mysql-test/t/ctype_utf8mb4.test:
  New file
mysys/charset-def.c:
  - Adding initialization of utf8mb4, utf16, utf32 built-int collations
mysys/charset.c:
  - Adding initialization of utf8mb4, utf16, utf32 dynamic collations
sql/field.cc:
  - Fixing "truncated" error with datetime functions:
    Force conversion in case of non-ascii character sets.
sql/item.cc:
  - Adding superset/subset relation check for utf8mb4/utf8
sql/item_strfunc.cc:
  - Fixing a problem with CHAR(x USING utf32)
sql/sql_string.cc:
  - Fixing problems with zero padding for UTF32
sql/sql_table.cc:
  - Fixing buffer size, to make utf32 comma fit.
strings/ctype-mb.c:
  - Making handlers for multi-byte binary collations public
strings/ctype-uca.c:
  - Adding definitions for utf8mb4, utf16, utf32 UCA collations
strings/ctype-ucs2.c:
  - Adding functions which are shared between ucs2, utf16, utf32
  - Ading utf16 implementation
  - Adding utf32 implementation
strings/ctype-utf8.c:
  - Adding functions shared between utf8 and utf8mb4
  - Adding implementation of utf8mb4
2010-02-24 13:15:34 +04:00
Alexander Nozdrin
4836199d70 Fix default.conf. 2010-02-22 14:48:38 +03:00
Alexander Nozdrin
9d626aa5ff Make sp-error.test experimental on Windows due to Bug 43201.
The patch is ready and will be pushed via -bugfixing.
2010-02-22 14:40:41 +03:00
Alexander Nozdrin
310c949e3d Auto-merge from mysql-next-mr. 2010-02-21 21:34:09 +03:00
Vladislav Vaintroub
3dffd5398c Do not run shared memory sys_vars tests in embedded 2010-02-21 15:10:52 +01:00
Vladislav Vaintroub
740c7cf4fa Install static client and embedded debug libraries 2010-02-20 20:40:03 +01:00
Vladislav Vaintroub
5f833a39ed extend configure-like perl wrapper for INSTALL_FOODIR variables 2010-02-20 14:17:55 +01:00
Vladislav Vaintroub
0fd18913d9 merge 2010-02-20 11:23:12 +01:00
Alexander Nozdrin
d1ad316a59 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
f027e4e00f Fix default.conf. 2010-02-20 12:27:30 +03:00
Alexander Nozdrin
9f6662a0b4 Fix default.conf. 2010-02-20 12:26:22 +03:00
Alexander Nozdrin
7e8611f82b Auto-merge from mysql-trunk-mtr. 2010-02-20 12:14:09 +03:00
Alexander Nozdrin
ce74e8ccd0 Auto-merge from mysql-5.1-mtr. 2010-02-20 12:09:17 +03:00
Alexander Nozdrin
aa457a4aef Auto-merge from mysql-5.1. 2010-02-20 12:08:40 +03:00
Vladislav Vaintroub
3b20b5fa34 add_executable => mysql_add_executable (just for uniformity) 2010-02-20 08:58:18 +01:00
Vladislav Vaintroub
c94a5cd5c8 Fix configure.js : set the variabes in cache, so they can overwrite cache variables in CMakeLists.txt 2010-02-20 08:17:44 +01:00
Vladislav Vaintroub
e4cb186c6b SET FN_NO_CASE_SENSE to 1 on Windows 2010-02-20 02:12:01 +01:00
Vladislav Vaintroub
fc08964e80 Install extremely useful program "replace" 2010-02-19 18:04:35 +01:00
Vladislav Vaintroub
df64a94118 When installing, exclude some documents in Docs 2010-02-19 17:51:53 +01:00
Vladislav Vaintroub
ea839618c4 Fix some glitches with INSTALL_LAYOUT=STANDALONE
- mysql_install_db is in scripts dir now
- sql-bench is installed
-some extra support-files (e.g ini) are in support-files
2010-02-19 18:30:08 +01:00
Vladislav Vaintroub
78c9b11c36 merge 2010-02-18 14:43:56 +01:00
Vladislav Vaintroub
d4d3d1ef4e merge 2010-02-18 14:09:35 +01:00
Bjorn Munch
c3757afec4 merge from next-mr 2010-02-18 09:26:21 +01:00
Bjorn Munch
b64d50ae83 upmerge 51135 2010-02-18 09:09:08 +01:00
Bjorn Munch
65d6444999 upmerge 51135 2010-02-18 09:02:38 +01:00
unknown
0a7b5fb045 Merge from mysql-5.1.44-release 2010-02-17 18:48:40 +01:00
unknown
62db6839b8 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
90c3ace052 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
b471134bfe merge 44054 2010-02-17 13:12:30 +01:00
Bjorn Munch
dedad8ae44 merge 44054 2010-02-17 13:09:48 +01:00
Alexander Nozdrin
d2af6c43c0 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
5b7306e259 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
8780277b83 Merging from mysql-next-mr 2010-02-17 12:24:47 +04:00
Vladislav Vaintroub
6230c2e296 Fix test that did not work in out-of-source build .
There are 2 different share directories, one if builddir/share (with compiled errmsg.sys) 
and another one is $sourcedir/share and contains some /charsets/*.xml files.
second one should be refered to  as MYSQL_CHARSETSDIR and  MYSQL_SHAREDIR  $builddir/share
2010-02-17 04:14:09 +01:00
Vladislav Vaintroub
1e533aef35 fix typo 2010-02-17 00:27:45 +01:00
Vladislav Vaintroub
0e2ee37a8d postmerge fix 2010-02-16 23:58:15 +01:00
Vladislav Vaintroub
5b77604cc2 merge 2010-02-16 23:19:47 +01:00
Bjorn Munch
459024e01f fixed wrong merge conflict in mysql-test/include/mtr_warnings.sql 2010-02-16 20:49:21 +01:00
Bjorn Munch
cec8a9380b Added a needed reap to mysql-test/include/handler.inc 2010-02-16 20:26:44 +01:00
Bjorn Munch
5f3e490174 new merge from next-mr 2010-02-16 18:23:21 +01:00
Alexander Nozdrin
ab293e26c3 Prohibit running semi-sync rpl tests in the embedded mode. 2010-02-16 13:12:08 +03:00
Alexander Barkov
cf718fe9b7 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
3a856d4425 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.

mysql-test/r/merge.result:
  Update results (Bug#47648).
mysql-test/t/merge.test:
  Add a test case for Bug#47648.
  Update the result file to reflect a fix of another bug
  in MyISAMMRG code: not maintaining lex->query_tables_own_last
  allowed a stored function or trigger to modify a merge table
  which was already updated by the main statement.
  It is not allowed for other storage engines, and should
  not be allowed for MyISAMMRG.
storage/myisammrg/ha_myisammrg.cc:
  When adding children to the list of tables to open,
  make sure that we properly set lex->query_tables_own_last.
  When removing the children, update lex->query_tables_own_last
  if necessary.
2010-02-15 19:35:53 +03:00
Alexander Nozdrin
c15886a111 Auto-merge from mysql-next-4284. 2010-02-15 17:08:38 +03:00
Dmitry Lenev
03672b9696 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
37fd0bcf63 Followup to Bug#45225 Locking: hang if drop table with no timeout
This patch removes the unused server variable
"table_lock_wait_timeout".


mysql-test/r/variables.result:
  Updated the test for Bug#28580 to reflect that 
  "table_lock_wait_timeout" no longer exists.
mysql-test/t/variables.test:
  Updated the test for Bug#28580 to reflect that 
  "table_lock_wait_timeout" no longer exists.
2010-02-15 13:11:20 +01:00
Alexander Nozdrin
cb7078f57a Auto-merge from mysql-next-4284. 2010-02-15 15:04:05 +03:00
Alexander Nozdrin
fe8d83a1d9 After-merge fix. 2010-02-15 15:00:45 +03:00
Dmitry Lenev
be3e256d25 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).

mysql-test/include/handler.inc:
  Added test for bug #51136 "Crash in pthread_rwlock_rdlock on 
  TEMPORARY + HANDLER + LOCK + SP".
mysql-test/r/flush.result:
  Updated test results (see flush.test).
mysql-test/r/handler_innodb.result:
  Updated test results (see include/handler.inc).
mysql-test/r/handler_myisam.result:
  Updated test results (see include/handler.inc).
mysql-test/t/flush.test:
  Added additional coverage for bug #51136 "Crash in
  pthread_rwlock_rdlock on TEMPORARY + HANDLER + LOCK +
  SP".
sql/mdl.h:
  When setting new value of transactional sentinel use 
  pointer to the most recent ticket instead of value 
  returned by MDL_context::mdl_savepoint(). 
  This allows to handle correctly situation when the new 
  value of sentinel should be the same as its current value 
  (MDL_context::mdl_savepoint() returns NULL in this case).
2010-02-15 14:23:36 +03:00