Commit graph

59043 commits

Author SHA1 Message Date
Mikael Ronstrom
8755de32ab Fixed a few bugs in hex string generation, in call to val_str for partition expressions, also made code reusable for DEFAULT handling to fix BUG#48464 by introducing function get_cs_converted_string_value, added partition_utf8 test case for UTF8 outputs 2009-11-02 14:49:26 +01:00
Mikael Ronstrom
1c91799c6a Merge to latest mysql-next-mr 2009-11-02 11:09:15 +01:00
Mikael Ronstrom
6ce3a06feb Added test case for UTF8 strings in partition constants 2009-11-02 11:03:40 +01:00
Mikael Ronstrom
1f94bbc78e Fixed a test error 2009-10-31 10:54:28 +01:00
Mikael Ronstrom
fb1f865c55 Fixed a test error 2009-10-31 10:48:18 +01:00
Alexander Nozdrin
46aa4c2672 Merge from mysql-trunk. 2009-10-31 11:11:58 +03:00
Alexander Nozdrin
7ed5c11c6a Fix default.conf. 2009-10-31 11:11:10 +03:00
Mikael Ronstrom
d931cd9235 Added more comments and a safer error check 2009-10-30 22:35:20 +01:00
Mikael Ronstrom
cf8fddb910 Fixed such that we fail if using integer constants for character set fields, now need to have correct constant types 2009-10-30 21:44:41 +01:00
Mikael Ronstrom
319e843509 Fixed so that character set constants are encoded as hex strings in frm file, but as utf8 strings in the same manner as default values in show create table and information schema tables 2009-10-30 21:08:34 +01:00
Mikael Ronstrom
76e2c7b9dc Ensuring character set constants are safe, first step fix 2009-10-30 17:34:11 +01:00
Mikael Ronstrom
caa4fffa00 Changed COLUMN_LIST to COLUMNS after arch review 2009-10-29 18:04:23 +01:00
Marc Alff
63e732fe61 Bug#33637 SHOW PROCEDURE CODE/SHOW FUNCTION CODE sp_name gives a syntax error.
Backport for 5.5

In non debug builds, the statements:
- SHOW PROCEDURE CODE
- SHOW FUNCTION CODE
used to fail with a "syntax error", which is misleading.

These statements have been changed to return the following error for non
debug builds:
ERROR HY000: The 'SHOW PROCEDURE|FUNCTION CODE' feature is disabled; you
need MySQL built with '--with-debug' to have it working

For debug builds (./configure --with-debug), nothing is changed.
2009-10-29 10:51:04 -06:00
Marc Alff
afc87e52ac Bug#38968 Unused mutex LOCK_bytes_sent, LOCK_bytes_received
Backport for 5.5
2009-10-29 09:21:16 -06:00
Marc Alff
48a4658df3 Local merge 2009-10-29 09:10:31 -06:00
Marc Alff
54b5ef84ca Bug#38967 Unused mutex LOCK_Acl
Backport to 5.5
2009-10-29 09:07:29 -06:00
Alexander Nozdrin
f236f9a9dc Automerge from mysql-next-mr. 2009-10-29 18:03:30 +03:00
Mikael Ronstrom
53dc58d841 BUG#48397, set key_part->length to key_part->store_length isn't correct, store_length is a bit longer 2009-10-29 13:08:35 +01:00
Alexey Botchkov
eff49de23e mysql_upgrade test fixed
per-file comments:
  mysql-test/r/mysql_upgrade.result
     result updated
  mysql-test/t/mysql_upgrade.test
     --skip-verbose option added to the call
2009-10-29 10:03:16 +04:00
Mikael Ronstrom
470a44c70d Fixed code review change to ensure that VALUES constants are of the same result type as the field they are constants for 2009-10-28 19:20:32 +01:00
Mikael Ronstrom
c94237e530 Merge 2009-10-28 18:32:48 +01:00
Mikael Ronstrom
072c13d939 Merged WL#3352 into mysql-next-mr 2009-10-28 18:22:36 +01:00
Mikael Ronstrom
315d13a6c8 Merge 2009-10-28 17:52:55 +01:00
Mattias Jonsson
4083216d73 merge 2009-10-28 17:30:58 +01:00
Tor Didriksen
667a72ad88 update .bzrignore to ignore libmysqld/rpl_handler.cc link 2009-10-28 15:46:11 +01:00
Tor Didriksen
b2baeed4a7 Bug#48060 Memory leak - Item::val_bool() (item.cc:184) from optimizer_subquery grammar
Item_sum::set_aggregator() may be called multiple times during query preparation.
On subsequent calls: verify that the aggregator type is the same,
and re-use the existing Aggregator.


sql/item_sum.cc:
  In Item_sum::set_aggregator(): re-use existing Aggregator if already set.
  
  Remove some friend declarations, add some accessor functions.
  Cleanup some DBUG_ENTER and DBUG_RETURN code.
sql/item_sum.h:
  Make some member fields private, add accessors instead.
  Remove some un-necessary friend declarations.
  Remove some default arguments from constructors.
sql/opt_sum.cc:
  Use accessor functions in Item_sum.
sql/sql_select.cc:
  Fix mis-spelled DBUG_ENTER text.
  Use accessor functions in Item_sum.
sql/sql_yacc.yy:
  Use explicit true/false rather than default arguments when constructing
  Item_sum_xxx objects.
2009-10-28 11:07:30 +01:00
Alexey Botchkov
36299d59ef WL#4991 mysql_upgrade --fix-privilege-tables
(backport)
   mysql_upgrade script accepts --upgrade-system-tables option,
   fixing only system tables in this case.

per-file comments:
  client/mysql_upgrade.c
WL#4991 mysql_upgrade --fix-privilege-tables
    --upgrade-system-tables option added.
   if it is set, the tool won't look for the mysqlcheck then
   run_mysqlcheck_fixnames() and run_mysqlcheck_upgrade won't be called.
  mysql-test/r/mysql_upgrade.result
WL#4991 mysql_upgrade --fix-privilege-tables
    test result added
  mysql-test/t/mysql_upgrade.test
WL#4991 mysql_upgrade --fix-privilege-tables
    test case added
2009-10-28 14:02:00 +04:00
Alexander Nozdrin
55b8f07a99 Automerge from mysql-next-mr. 2009-10-28 10:48:53 +03:00
Mikael Ronstrom
10fed1aca0 BUG#48165, needed to introduce length restrictions on partitioning fields to ensure that no stack overruns occur 2009-10-28 01:11:17 +01:00
Mikael Ronstrom
cc43a2089c Fixed sql_mode issue in BUG#48164, will ignore sql_mode when generating constants, also warnings will not be tolerated 2009-10-28 00:06:11 +01:00
Vladislav Vaintroub
afcb7b8597 merge 2009-10-27 13:51:59 +01:00
Alexander Nozdrin
455bcad07f Automerge from mysql-trunk-bugfixing. 2009-10-27 13:05:40 +03:00
Alexander Nozdrin
cd56f6ffe9 Make rpl_timezone experimental due to Bug#47017. 2009-10-27 13:05:06 +03:00
Alexander Nozdrin
47c9089ef5 Automerge from mysql-next-mr. 2009-10-27 12:59:09 +03:00
Alexander Nozdrin
cd6e159890 Automerge from mysql-next-mr. 2009-10-27 12:57:44 +03:00
Alexander Nozdrin
453eb014f7 Fix default.conf. 2009-10-27 12:44:23 +03:00
Dmitry Lenev
1e5804f2c5 Fixed lock_sync.test failure in mysql-next-mr tree in embedded mode.
Disabled execution of this test for embedded server until fix for
bug 41971 'Thread state on embedded server is always "Writing to net"'
is back-ported to this tree.
2009-10-27 12:43:40 +03:00
He Zhenxing
6c3c984fc4 disable rpl_spec_variables due to it fails constantly on HPUX 2009-10-27 16:42:50 +08:00
Alexander Barkov
381ad2ec6a A postfix for WL#1349
Fixing locale name: en_US.UTF-8 -> en_US.utf8
2009-10-27 08:38:32 +04:00
Dmitry Lenev
86c23fa708 Fix for bug #45143 "All connections hang on concurrent ALTER TABLE".
Concurrent execution of statements which require non-table-level
write locks on several instances of the same table (such as
SELECT ... FOR UPDATE which uses same InnoDB table twice or a DML
statement which invokes trigger which tries to update same InnoDB
table directly and through stored function) and statements which
required table-level locks on this table (e.g. LOCK TABLE ... WRITE,
ALTER TABLE, ...) might have resulted in a deadlock.

The problem occured when a thread tried to acquire write lock
(TL_WRITE_ALLOW_WRITE) on the table but had to wait since there was
a pending write lock (TL_WRITE, TL_WRITE_ALLOW_READ) on this table
and we failed to detect that this thread already had another instance
of write lock on it (so in fact we were trying to acquire recursive
lock) because there was also another thread holding write lock on the
table (also TL_WRITE_ALLOW_WRITE). When the latter thread released
its lock neither the first thread nor the thread trying to acquire
TL_WRITE/TL_WRITE_ALLOW_READ were woken up (as table was still write
locked by the first thread) so we ended up with a deadlock.

This patch solves this problem by ensuring that thread which
already has write lock on the table won't wait when it tries
to acquire second write lock on the same table.

mysql-test/r/lock_sync.result:
  Added test case for bug #45143 "All connections hang on concurrent
  ALTER TABLE".
mysql-test/t/lock_sync.test:
  Added test case for bug #45143 "All connections hang on concurrent
  ALTER TABLE".
mysys/thr_lock.c:
  Ensured that thread can acquire write lock on the table without
  waiting if it already has write lock on it even if there are other
  threads holding write locks on this table (this is normal situation
  for, e.g., TL_WRITE_ALLOW_WRITE type of lock).
  
  Adjusted comments to better explain why it is OK to do so and added
  asserts to prevent introduction of scenarios in which this can cause
  problems.
2009-10-26 22:38:03 +03:00
Vladislav Vaintroub
1dd88254be Bug #48317 cannot build innodb as static library.
The problem here is that the latest innodb push contains
both MYSQL_STORAGE_ENGINE(INNOBASE) and MYSQL_STORAGE_ENGINE(INNOBASE)
in the same CMakeLists.txt, to make the resulting library
ha_innodb.dll, instead of ha_innobase.dll.

Using multiple MYSQL_STORAGE_ENGINE within the same  CMakeLists.txt
conflicts with the fix for the bug Bug #47795 "CMake, storage engine
name different from directory name". Top-level CMakeLists.txt now 
parses storage engine's  CMakeLists.txt to extract engines name from 
MYSQL_STORAGE_ENGINE().

For innodb, it concludes that there is not storage engine named
INNOBASE, hence WITH_INNOBASE_STORAGE_ENGINE has no effect.

The fix is to use SET_TARGET_PROPERTIES(... PROPERTIES OUTPUT_NAME ...),
instead of renaming the engine to have plugins named ha_innodb.dll.
2009-10-26 17:16:18 +01:00
Alexander Barkov
4723ae6d0c A postfix for WL#1349: Fixing test failire problems on HP-UX 2009-10-26 16:29:41 +04:00
Sergey Glukhov
90e2ad9595 Bug#35427 INFORMATION_SCHEMA.TABLES.TABLE_CATALOG is NULL, should be "def"
additional fix(Betony)
2009-10-26 11:35:20 +04:00
Luis Soares
7d970f8285 automerge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge. 2009-10-25 22:58:52 +00:00
Luis Soares
ba0afceb9e post-push fixes
Disabled rpl_cross_version (instead of setting it experimental).
Fixed outstanding warning fix in main.debug_sync.
2009-10-23 17:07:45 +01:00
He Zhenxing
ce912c8ccf Auto merge 5.1-rep-semisync to 5.1-rep+2-delivery1 2009-10-23 21:34:07 +08:00
He Zhenxing
a02972d820 Skip semisync test if the plugin-dir is not set to semisync plugin dir 2009-10-23 21:26:17 +08:00
Sergey Glukhov
7052246f8b automerge 2009-10-23 16:07:07 +05:00
Sergey Glukhov
795102b786 Bug#35427 INFORMATION_SCHEMA.TABLES.TABLE_CATALOG is NULL, should be "def"
backport to betony
2009-10-23 16:02:20 +05:00
Horst.Hunger
c2552ec37f Fix for bug#47739: inserts of the review got lost. inserted them again. 2009-10-23 12:51:02 +02:00