Commit graph

62907 commits

Author SHA1 Message Date
Alexander Nozdrin
8347e1ea20 Skip perfschema.misc if "var" is a symlink (due to Bug 51447).
mysql-test/include/not_var_link.inc:
  Committed on behalf of Bjorn.
2010-03-16 17:19:45 +03:00
Mats Kindahl
03768a2fc5 Merging with mysql-trunk-bugfixing 2010-03-15 22:50:22 +01:00
Mats Kindahl
c4276d3ff6 Merging with mysql-trunk-bugfixing 2010-03-15 22:40:28 +01:00
Konstantin Osipov
09b7a0d115 A post-review fix for type-aware metadata locks.
DDL no longer aborts mysql_lock_tables(), and hence
we no longer need to support need_reopen flag of this
call. 
Remove the flag, and all the code in the server
that was responsible for handling the case when
it was set. This allowed to simplify: 
open_and_lock_tables_derived(), the delayed thread,
multi-update.

Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
since we now only support this flag in open_table().

Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE,
to avoid confusion.

Move the wait for the global read lock for cases
when we do updates in SELECT f1() or DO (UPDATE) to 
open_table() from mysql_lock_tables(). When waiting
for the read lock, we could raise need_reopen flag,
which is no longer present in mysql_lock_tables().
Since the block responsible for waiting for GRL
was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK
was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK.


mysql-test/r/mdl_sync.result:
  Update test results (see comments for mdl_sync.test).
mysql-test/t/mdl_sync.test:
  Update tests: an abort mysql_lock_tables() called for an
  INSERT no longer auto-closes SQL HANDLERS, since it
  no longer leads to back-off and retry.
sql/ha_ndbcluster_binlog.cc:
  Remove unused variables.
sql/lock.cc:
  Remove support for need_reopen parameter of mysql_lock_tables().
  Update comments.
sql/log_event_old.cc:
  Remove the loop responsible for handling need_reopen
  out parameter of mysql_lock_tables().
sql/mysql_priv.h:
  Update open and lock tables flag names.
sql/share/errmsg-utf8.txt:
  Add a new error message to report when
  thr_multi_lock() is aborted.
sql/sql_base.cc:
  Update comments. Rename MYSQL_LOCK_IGNORE_FLUSH
  to MYSQL_OPEN_IGNORE_FLUSH.
sql/sql_class.h:
  Remove unused code.
sql/sql_db.cc:
  Remove an unused bit of code.
sql/sql_handler.cc:
  For backward compatibility, we still want to back off and
  retry when a call to mysql_lock_tables() is aborted
  from within an SQL HANDLER. Write an internal error
  handler to support the case.
sql/sql_insert.cc:
  Call mysql_lock_tables() no longer has need_reopen
  out parameter. Simplify the code by removing 
  the crud that took care of it.
  MYSQL_LOCK_IGNORE_FLUSH is now only supported by
  open_tables().
sql/sql_show.cc:
  Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH
sql/sql_table.cc:
  Remove an unused parameter.
sql/sql_update.cc:
  Remove the need_reopen loop from multi-update.
  We no also longer need to cleanup the parse tree in case
  when mysql_lock_tables() is aborted and thus an infinite
  source of multi-update bugs is gone.
sql/tztime.cc:
  Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
  since from now on this flag is only supported by open_table().
2010-03-16 00:20:20 +03:00
Vladislav Vaintroub
a45162d4e3 merge 2010-03-15 20:04:19 +01:00
Alexander Nozdrin
8825ea3f2a Auto-merge from mysql-trunk. 2010-03-15 20:10:17 +03:00
Alexander Nozdrin
c161a4876b A patch for Bug#52071 (rpl_ndb.rpl_ndb_ctype_ucs2_def fails).
Use new command line options instead of deprecated and removed ones.
2010-03-15 20:00:20 +03:00
Alexander Nozdrin
6be830e14b Enable ndb and rpl_ndb test suites in daily builds. 2010-03-15 19:43:26 +03:00
Magnus Blåudd
cdb480d6dd Merge 2010-03-15 15:04:12 +01:00
Magnus Blåudd
df1ed40b30 Merge in fix for bug#42589 2010-03-15 14:57:20 +01:00
Jon Olav Hauglid
c7c1f2198f Bug #51160 Deadlock around SET GLOBAL EVENT_SCHEDULER = ON|OFF
This deadlock could occour betweeen one connection executing
SET GLOBAL EVENT_SCHEDULER= ON and another executing SET GLOBAL
EVENT_SCHEDULER= OFF. The bug was introduced by WL#4738.

The first connection would hold LOCK_event_metadata (protecting
the global variable) while trying to lock LOCK_global_system_variables
starting the event scheduler thread (in THD:init()).

The second connection would hold LOCK_global_system_variables
while trying to get LOCK_event_scheduler after stopping the event
scheduler inside event_scheduler_update().

This patch fixes the problem by not using LOCK_event_metadata to
protect the event_scheduler variable. It is still protected using
LOCK_global_system_variables. This fixes the deadlock as it removes 
one of the two mutexes used to produce it.

However, this patch opens up the possibility that the event_scheduler
variable and the real event_scheduler state can become out of sync
(e.g. variable = OFF, but scheduler running). But this can only
happen under very unlikely conditions - two concurrent SET GLOBAL
statments, with one thread interrupted at the exact wrong moment.
This is preferable to having the possibility of a deadlock.

This patch also fixes a bug where it was possible to exit create_event()
without releasing LOCK_event_metadata if running out of memory during
its exection.

No test case added since a repeatable test case would have required
excessive use of new sync points. Instead we rely on the fact that
this bug was easily reproduceable using RGQ tests.
2010-03-15 14:52:25 +01:00
Alexander Nozdrin
f007796bf4 Auto-merge from mysql-trunk. 2010-03-15 13:22:26 +03:00
Mats Kindahl
cba4c8d1dd Bug #51938 plugin_dir gets bad default value
When building the script directory using a CMake-based build, both the
variables in config.h.cmake (including PLUGINDIR) and the variables in
CMakeList.txt (which includes pkgplugindir).

However, for autotools-based builds, only pkgplugindir is substituted,
which means that the plugin-path is not substituted.

This patch solves the problem by using pkgplugindir, which works on both
CMake-based and autotools-based builds, instead of PLUGINDIR.
2010-03-14 21:11:19 +01:00
Staale Smedseng
c7fad393fd Bug #49829 Many "hides virtual function" warnings with
SunStudio
      
SunStudio compilers of late warn about methods that might hide
methods in base classes due to the use of overloading combined
with overriding. SunStudio also warns about variables defined
in local socpe or method arguments that have the same name as
a member attribute of the class.
      
This patch renames methods that might hide base class methods,
to make it easier both for humans and compilers to see what is
actually called. It also renames variables in local scope.


sql/field.cc:
  Local scope variable or method argument same as class 
  attribute.
sql/item_cmpfunc.cc:
  Local scope variable or method argument same as class 
  attribute.
sql/item_create.cc:
  Renaming base class create() to create_func().
sql/item_create.h:
  Renaming base class create() to create_func().
sql/protocol.cc:
  Local scope variable or method argument same as class 
  attribute.
sql/sql_profile.cc:
  Local scope variable or method argument same as class 
  attribute.
sql/sql_select.cc:
  Local scope variable or method argument same as class 
  attribute.
sql/sql_yacc.yy:
  Renaming base class create() to create_func().
storage/federated/ha_federated.cc:
  Local scope variable or method argument same as class 
  attribute.
storage/myisammrg/ha_myisammrg.cc:
  Local scope variable or method argument same as class 
  attribute.
2010-03-14 17:01:45 +01:00
Davi Arnaut
57a96c77db Post-merge fix: replace plugin extension output. 2010-03-14 08:16:59 -03:00
Davi Arnaut
4c205a65fb Post-merge fix: remove unnecessary flush privileges. 2010-03-13 18:32:42 -03:00
Konstantin Osipov
7116431a8a A review comment for the fix for Bug#46672.
Remove unnecessary need_reopen loops.
2010-03-13 13:58:27 +03:00
vasil
95567a7534 branches/innodb+:
Say "InnoDB" instead of "InnoDB+" at startup, this is going to be the
builtin InnoDB in MySQL 5.5.
2010-03-13 10:31:17 +00:00
inaam
a85f3fcec1 branches/innodb+
Fix compiler warning
2010-03-13 03:53:16 +00:00
calvin
cd9fddd8e1 branches/innodb+: Merge revisions 6238:6293 from branches/plugin-1.1
which was cloned from branches/zip revision 6237 as branches/plugin-2.0,
in order to work with MySQL 5.5.

Skip revision 6240: update the version number to 2.0.0

  ------------------------------------------------------------------------
  r6290 | calvin | 2009-12-10 02:26:45 -0600 (Thu, 10 Dec 2009) | 26 lines

  branches/plugin-2.0: merge of r2877 from MySQL

  This is r2877 in mysql-next-mr tree, backported from 6.0.
  -------------------------------------------------------------
  Bug#24509 - 2048 file descriptor limit on windows needs increasing, also
  WL#3049 - improved Windows I/O

  The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with
  the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open
  file is stored in the my_file_info struct, along with a flag for append mode
  because the Windows API does not support opening files in append mode in all cases)
  The default max open files has been increased to 16384 and can be increased further
  by setting --max-open-files=<value> during the server start.

  Another major change in this patch that almost all Windows specific file IO code
  has been moved to a new file my_winfile.c, greatly reducing the amount of code
  in #ifdef blocks within mysys, thus improving readability.

  Minor enhancements:
  - my_(f)stat() is changed to use __stati64 structure with 64 file size
  and timestamps. It will return correct file size now (C runtime implementation
  used to report outdated information)
  - my_lock on Windows is prepared to handle additional timeout parameter
  - after review : changed __WIN__ to _WIN32 in the new and changed code.
  ------------------------------------------------------------------------
  r6291 | calvin | 2009-12-10 02:31:27 -0600 (Thu, 10 Dec 2009) | 14 lines

  branches/plugin-2.0: merge of r2887.3.31 from MySQL

  This is r2887.3.31 in mysql-next-mr tree, backported from 6.0.

  Backport of:
  ----------------------------------------------------------
  revno: 2630.22.8
  committer: Konstantin Osipov <konstantin@mysql.com>
  branch nick: mysql-6.0-runtime
  timestamp: Sun 2008-08-10 18:49:52 +0400
  message:
  Get rid of typedef struct for the most commonly used types:
  TABLE, TABLE_SHARE, LEX. This simplifies use of tags
  and forward declarations.
  ------------------------------------------------------------------------
  r6292 | calvin | 2009-12-10 02:40:55 -0600 (Thu, 10 Dec 2009) | 41 lines

  branches/plugin-2.0: merge of r2936 from MySQL

  This is r2936 in mysql-next-mr tree, backported from 6.0.

  Backport of:
  -------------------------------------------------------------
  revno: 2877
  committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
  branch nick: 35164-6.0
  timestamp: Wed 2008-10-15 19:53:18 -0300
  message:
  Bug#35164: Large number of invalid pthread_attr_setschedparam calls
  Bug#37536: Thread scheduling causes performance degradation at low thread count
  Bug#12702: Long queries take 100% of CPU and freeze other applications under Windows

  The problem is that although having threads with different priorities
  yields marginal improvements [1] in some platforms [2], relying on some
  statically defined priorities (QUERY_PRIOR and WAIT_PRIOR) to play well
  (or to work at all) with different scheduling practices and disciplines
  is, at best, a shot in the dark as the meaning of priority values may
  change depending on the scheduling policy set for the process.

  Another problem is that increasing priorities can hurt other concurrent
  (running on the same hardware) applications (such as AMP) by causing
  starvation problems as MySQL threads will successively preempt lower
  priority processes. This can be evidenced by Bug#12702.

  The solution is to not change the threads priorities and rely on the
  system scheduler to perform its job. This also enables a system admin
  to increase or decrease the scheduling priority of the MySQL process,
  if intended.

  Furthermore, the internal wrappers and code for changing the priority
  of threads is being removed as they are now unused and ancient.

  1. Due to unintentional side effects. On Solaris this could artificially
  help benchmarks as calling the priority changing syscall millions of
  times is more beneficial than the actual setting of the priority.

  2. Where it actually works. It has never worked on Linux as the default
  scheduling policy SCHED_OTHER only accepts the static priority 0.
  ------------------------------------------------------------------------
  r6293 | calvin | 2009-12-10 02:45:27 -0600 (Thu, 10 Dec 2009) | 13 lines

  branches/plugin-2.0: merge of r2938 from MySQL

  This is r2938 in mysql-next-mr tree, backported from 6.0.

  Backport of:
  ----------------------------------------------------------------------
  ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0
  Bug#32082 : definition of VOID in my_global.h conflicts with Windows
  SDK headers

  VOID macro is now removed. Its usage is replaced with void cast.
  In some cases, where cast does not make much sense (pthread_*, printf,
  hash_delete, my_seek), cast is ommited.
  ------------------------------------------------------------------------
2010-03-12 22:06:55 +00:00
calvin
4a8e2c1496 branches/innodb+: change the version number to 1.1.0. 2010-03-12 21:49:09 +00:00
calvin
5c8d7e1948 branches/innodb+: merge the CMake file changes from MySQL.
The CMake files are significantly changed in MySQL 5.5
to have cross-platform support.
2010-03-12 21:47:46 +00:00
unknown
a3bc225ecf Raise version number after cloning 5.5.3-m3 2010-03-12 21:18:20 +01:00
Alexander Nozdrin
f6d13ea3e3 Auto-merge from mysql-trunk. 2010-03-12 21:13:35 +03:00
Alexander Nozdrin
233cdaedd2 Auto-merge from mysql-next-mr. 2010-03-12 21:11:31 +03:00
Alexander Nozdrin
cc27bf7c01 Auto-merge (empty) from mysql-trunk. 2010-03-12 21:08:38 +03:00
Alexander Nozdrin
7582f3ddff Auto-merge from mysql-next-mr-bugfixing. 2010-03-12 21:04:35 +03:00
Alexander Nozdrin
b03480e9ad Auto-merge from mysql-trunk-bugfixing. 2010-03-12 21:03:40 +03:00
Luis Soares
b7b9b45366 BUG#51716 post push fix.
There are two issues fixed here:

  1. We needed to update the result file, for some of 
     mysqlbinlog_* tests, because now the some padding chars
     are not output anymore.

  2. We needed to change the Field_string::pack so that
     for BINARY types the padding chars are not packed 
     (lengthsp will return full length for these types).
2010-03-12 12:42:30 +00:00
Alexey Kopytov
daf7f211cd Post-merge fix for main.xa failures. 2010-03-12 13:13:02 +03:00
Joerg Bruehe
1d7f8578d3 Automerge the bug#49022 fix correction into next-mr-bugfixing. 2010-03-12 10:56:56 +01:00
Alexey Kopytov
dbbdc4b196 Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:

Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/subselect.result
Text conflict in mysql-test/r/subselect3.result
Text conflict in mysql-test/r/type_datetime.result
Text conflict in sql/share/Makefile.am
2010-03-12 12:51:53 +03:00
Joerg Bruehe
f59c7267f2 Fix for the bug#49022 patch, detected by further testing. 2010-03-11 16:37:51 +01:00
Vladislav Vaintroub
c8141ce4c0 Bug#51949 - make_binary_distribution fails on Mac.
Unquoted ${CMAKE_CPACK_COMMAND} is used in this script.
This variable resolves to cpack's real path with spaces, e.g
 /Applications/CMake 2.6.4-app/Contents/bin/cpack. 
Script fails due to lack of quotes.

Fix is to use quotes around ${CMAKE_CPACK_COMMAND}.
2010-03-11 15:41:45 +01:00
Konstantin Osipov
ea70b6a20a A fix for Bug#49972 "Crash in prepared statements":
The problem is introduced by WL#4435 "Support OUT-parameters in 
prepared statements".
When a statement that has out parameters was reprepared,
the reprepare request error was ignored, and an
attempt to send out parameters to the client was made.

Since the out parameter list was not initialized in case
of an error, this attempt led to a crash.

Don't try to send out parameters to the client
if an error occurred in statement execution.

sql/sql_prepare.cc:
  Don't try to send out parameters if error.
tests/mysql_client_test.c:
  Re-enable the test case for Bug#49972.
2010-03-11 16:47:34 +03:00
Georgi Kodinov
b182c9bd20 Bug #44178: mysql cli does not comply with GPLv2 clause 2c
Applied a path from Jim Winstead : Added a GPL notice.
Added the missing '(c)' and 'v2'.
2010-03-11 15:16:54 +02:00
Sergey Vojtovich
4f34e8bbd1 Merge fix for BUG48265 to mysql-5.1-bugteam. 2010-03-11 18:28:39 +04:00
marko
83d2cd7a62 branches/innodb+: Merge revisions 6773:6801 from branches/zip:
------------------------------------------------------------------------
  r6777 | marko | 2010-03-04 13:01:25 +0200 (Thu, 04 Mar 2010) | 2 lines
  Changed paths:
     M /branches/zip/trx/trx0rec.c

  branches/zip: trx_undo_update_rec_get_update(): Silence a bogus GCC warning
  about a possibly uninitialized variable.
  ------------------------------------------------------------------------
  r6779 | marko | 2010-03-08 14:35:42 +0200 (Mon, 08 Mar 2010) | 6 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/fil/fil0fil.c

  branches/zip: Fix IMPORT TABLESPACE of compressed tables.  Previously,
  a wrong parameter was passed to buf_flush_init_for_writing().

  fil_reset_too_high_lsns(): Set up page_zip and use it if needed.

  rb://264, Issue #352
  ------------------------------------------------------------------------
  r6781 | marko | 2010-03-09 09:41:08 +0200 (Tue, 09 Mar 2010) | 4 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/handler/ha_innodb.cc

  branches/zip: Make SHOW ENGINE INNODB MUTEX display SUM(os_waits)
  for block mutexes and blocks.

  Designed by Michael and Marko. rb://188, Issue #358
  ------------------------------------------------------------------------
  r6782 | marko | 2010-03-09 14:09:26 +0200 (Tue, 09 Mar 2010) | 1 line
  Changed paths:
     M /branches/zip/fil/fil0fil.c

  branches/zip: fil0fil.c: Update comments on table->flags as of r6252.
  ------------------------------------------------------------------------
  r6786 | vasil | 2010-03-10 09:16:50 +0200 (Wed, 10 Mar 2010) | 4 lines
  Changed paths:
     M /branches/zip/mysql-test/innodb-consistent.test

  branches/zip:

  Fix typo in comment
  ------------------------------------------------------------------------
  r6787 | marko | 2010-03-10 10:35:06 +0200 (Wed, 10 Mar 2010) | 10 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/log/log0recv.c

  branches/zip: recv_parse_log_rec(): Remove a bogus assertion about page_no.
  TODO: We might also consider removing recv_max_parsed_page_no, because
  it does not make much sense with *.ibd files.

  recv_report_corrupt_log(), recv_scan_log_recs(): Abort when a
  corrupted log record has been found, unless innodb_force_recovery has
  been set.

  This fixes Issue #464.
  rb://265 approved by Heikki Tuuri
  ------------------------------------------------------------------------
  r6789 | jyang | 2010-03-10 11:18:18 +0200 (Wed, 10 Mar 2010) | 10 lines
  Changed paths:
     M /branches/zip/handler/ha_innodb.cc
     M /branches/zip/handler/handler0alter.cc
     A /branches/zip/mysql-test/innodb_bug51378.result
     A /branches/zip/mysql-test/innodb_bug51378.test

  branches/zip: If a unique index is on a column prefix, such
  unique index cannot be upgrade to primary index even if there
  is no primary index already defined. Also fix possible corruption
  when initialize "ref_length" value in case there is a mismatch
  between MySQL and InnoDB primary key. Fix bug #51378: "Init
  'ref_length'  to correct value, in case an out of bound MySQL
  primary_key".
  rb://262 approved by Marko.
  ------------------------------------------------------------------------
  r6790 | jyang | 2010-03-10 13:09:41 +0200 (Wed, 10 Mar 2010) | 7 lines
  Changed paths:
     M /branches/zip/handler/ha_innodb.cc

  branches/zip: Fix bug #51356: "many valgrind errors in error messages
  with concurrent ddl". Null terminate the name string returned
  from innobase_convert_identifier() call when reporting DB_DUPLICATE_KEY
  error in create_table_def().
  rb://266 approved by Marko
  ------------------------------------------------------------------------
  r6791 | marko | 2010-03-10 13:39:06 +0200 (Wed, 10 Mar 2010) | 1 line
  Changed paths:
     M /branches/zip/ChangeLog

  branches/zip: Add ChangeLog entries for r6789, r6790.
  ------------------------------------------------------------------------
  r6792 | marko | 2010-03-10 13:56:41 +0200 (Wed, 10 Mar 2010) | 1 line
  Changed paths:
     A /branches/zip/mysql-test/innodb_bug38231.result (from /branches/5.1/mysql-test/innodb_bug38231.result:6791)
     A /branches/zip/mysql-test/innodb_bug38231.test (from /branches/5.1/mysql-test/innodb_bug38231.test:6791)
     A /branches/zip/mysql-test/innodb_bug39438-master.opt (from /branches/5.1/mysql-test/innodb_bug39438-master.opt:6791)
     A /branches/zip/mysql-test/innodb_bug39438.result (from /branches/5.1/mysql-test/innodb_bug39438.result:6791)
     A /branches/zip/mysql-test/innodb_bug39438.test (from /branches/5.1/mysql-test/innodb_bug39438.test:6791)

  branches/zip: Copy tests from branches/5.1 that were lost in some merge.
  ------------------------------------------------------------------------
  r6793 | marko | 2010-03-10 14:02:19 +0200 (Wed, 10 Mar 2010) | 60 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/handler/ha_innodb.cc
     M /branches/zip/mysql-test/innodb_bug21704.result
     A /branches/zip/mysql-test/innodb_bug47621.result (from /branches/5.1/mysql-test/innodb_bug47621.result:6788)
     A /branches/zip/mysql-test/innodb_bug47621.test (from /branches/5.1/mysql-test/innodb_bug47621.test:6788)
     M /branches/zip/plug.in
     M /branches/zip/trx/trx0sys.c

  branches/zip: Merge revisions 6669:6788 from branches/5.1:

    ------------------------------------------------------------------------
    r6774 | calvin | 2010-03-03 23:56:10 +0200 (Wed, 03 Mar 2010) | 2 lines
    Changed paths:
       M /branches/5.1/trx/trx0sys.c

    branches/5.1: fix bug#51653: outdated reference to set-variable
    Non functional change.
    ------------------------------------------------------------------------
    r6780 | vasil | 2010-03-08 19:13:20 +0200 (Mon, 08 Mar 2010) | 4 lines
    Changed paths:
       M /branches/5.1/plug.in

    branches/5.1:

    Whitespace fixup.
    ------------------------------------------------------------------------
    r6783 | jyang | 2010-03-09 17:54:14 +0200 (Tue, 09 Mar 2010) | 9 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/mysql-test/innodb_bug21704.result
       A /branches/5.1/mysql-test/innodb_bug47621.result
       A /branches/5.1/mysql-test/innodb_bug47621.test

    branches/5.1: Fix bug #47621 "MySQL and InnoDB data dictionaries
    will become out of sync when renaming columns". MySQL does not
    provide new column name information to storage engine to
    update the system table. To avoid column name mismatch, we shall
    just request a table copy for now.

    rb://246 approved by Marko.
    ------------------------------------------------------------------------
    r6785 | vasil | 2010-03-10 09:04:38 +0200 (Wed, 10 Mar 2010) | 11 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb_bug38231.test

    branches/5.1:

    Add the missing --reap statements in innodb_bug38231.test. Probably MySQL
    enforced the presence of those recently and the test started failing like:

      main.innodb_bug38231                     [ fail ]
              Test ended at 2010-03-10 08:48:32

      CURRENT_TEST: main.innodb_bug38231
      mysqltest: At line 49: Cannot run query on connection between send and reap
    ------------------------------------------------------------------------
    r6788 | vasil | 2010-03-10 10:53:21 +0200 (Wed, 10 Mar 2010) | 8 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb_bug38231.test

    branches/5.1:

    In innodb_bug38231.test: replace the fragile sleep 0.2 that depends on timing
    with a more robust condition which waits for the TRUNCATE and LOCK commands
    to appear in information_schema.processlist. This could also break if there
    are other sessions executing the same SQL commands, but there are none during
    the execution of the mysql test.
    ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r6798 | marko | 2010-03-11 09:53:01 +0200 (Thu, 11 Mar 2010) | 14 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/include/buf0buf.h
     M /branches/zip/include/buf0buf.ic

  branches/zip: Fix and clarify the latching of some buf_block_t members.

  buf_block_t::check_index_page_at_flush: Note that this field is not
  protected by any mutex. Make it a separate field, not a bitfield that
  could share the machine word with other fields.

  buf_block_t::lock_hash_val: Note that this field is protected by
  buf_block_t::lock (or during block creation, by buf_pool_mutex and
  buf_block_t::mutex).

  buf_block_get_lock_hash_val(): Assert that block->lock is held by the
  current thread.

  Issue #465, rb://267 approved by Inaam Rana
  ------------------------------------------------------------------------
  r6799 | jyang | 2010-03-11 09:59:42 +0200 (Thu, 11 Mar 2010) | 5 lines
  Changed paths:
     M /branches/zip/mysql-test/innodb_bug44571.result
     M /branches/zip/mysql-test/innodb_bug44571.test

  branches/zip: Once change in bug #47621 merges into zip branch,
  zip only test innodb_bug44571 needs to be updated to reflect the
  column name change would be successful be done in InnoDB as well.
  ------------------------------------------------------------------------
  r6800 | marko | 2010-03-11 12:02:57 +0200 (Thu, 11 Mar 2010) | 1 line
  Changed paths:
     M /branches/zip/btr/btr0pcur.c
     M /branches/zip/buf/buf0buf.c
     M /branches/zip/include/mtr0mtr.ic

  branches/zip: Add ut_ad(mtr->state == MTR_ACTIVE) to various places.
  ------------------------------------------------------------------------
  r6801 | marko | 2010-03-11 13:34:28 +0200 (Thu, 11 Mar 2010) | 2 lines
  Changed paths:
     M /branches/zip/include/mtr0mtr.ic

  branches/zip: mtr_memo_contains(): Relax the assertion of r6800,
  allowing mtr->state == MTR_COMMITTING.
  ------------------------------------------------------------------------
2010-03-11 11:57:05 +00:00
marko
6429bcd555 ibuf_merge_or_delete_for_page(): Fix inappropriate latching of pages
when merging a purge (IBUF_OP_DELETE).
This bug was introduced in r6772.
2010-03-11 11:38:47 +00:00
marko
b1143bcda9 branches/innodb+: buf_page_init(): Fix a bug in r6794
that caused a SIGSEGV on compressed pages (block==NULL dereferenced).
2010-03-11 11:36:53 +00:00
Luis Soares
baab8dd83c Automerge: mysql-next-mr-bugfixing bug branch --> mysql-next-mr-bugfixing latest. 2010-03-11 11:28:35 +00:00
Sergey Vojtovich
30bf0b73ec Merge mysql-5.1 to mysql-5.1-bugteam. 2010-03-11 15:19:01 +04:00
Alexander Barkov
b0ed7a5499 An additional fix for WL#1213 4-byte UTF8
- Fixing crash on attempt to create a fulltext index with an utf8mb4 column
- fixing wrong border width  for supplementary characters in mysql client:

  mysql --default-character-set=utf8mb4 -e "select concat(_utf32 0x20000,'a')"
2010-03-11 14:34:11 +04:00
He Zhenxing
9c2961ab63 Auto merge 2010-03-11 10:58:20 +08:00
He Zhenxing
7f76b4d36c Enable rpl_semi_sync test on Windows 2010-03-11 10:56:46 +08:00
He Zhenxing
71e8549eb1 Auto merge from 5.1-rep-semisync 2010-03-11 10:22:18 +08:00
Luis Soares
092d50389e Fix for BUG#51716 and BUG#51787: test case improvements.
Split rpl_row_charset into:

  - rpl_row_utf16.
  - rpl_row_utf32.

This way these tests can run independently if server supports
either one of the charsets but not both.

Cleaned up rpl_row_utf32 which had a spurious instruction:
-- let $reset_slave_type_conversions= 0
2010-03-10 22:20:39 +00:00
marko
3d9f3eed61 branches/innodb+: Implement the buf_pool_watch for DeleteBuffering in
the page hash table. This serves two purposes. It allows multiple
watches to be set at the same time (by multiple purge threads) and it
removes a race condition when the read of a block completes about the
time the buffer pool watch is being set.

buf_pool_watch_clear(): Rename to buf_pool_watch_unset(). Add
parameters space, offset.

buf_pool_watch_remove(): A helper function for removing the watch.

buf_pool_watch_is(): A predicate for testing if a block descriptor is
a sentinel for the buffer pool watch.

buf_pool_watch[BUF_POOL_WATCH_SIZE]: An array of sentinel block descriptors.

buf_pool_watch_set(): Add a parameter for the fold value, and return
the block if the block is in the buffer pool. Allocate the sentinel
from buf_pool_watch[] if needed. Use buf_fix_count for
reference-counting.

enum buf_block_state: Add BUF_BLOCK_POOL_WATCH as a state alias that
is shared with BUF_BLOCK_ZIP_FREE.

buf_page_hash_get_low(): A low-level variant of buf_page_hash_get()
that takes the fold value as a parameter and may return a watch
sentinel block. In callers, test the return value for
buf_pool_watch_is() [impossible cases with ut_ad(), possible ones with if].
When needed, invoke buf_pool_watch_remove() but preserve the buf_fix_count.

buf_page_hash_get(), buf_block_hash_get(): Return NULL for watch
sentinel blocks, to keep existing behaviour.

buf_page_init(): Add a parameter for the fold value.

ibuf_insert(): If a buffer pool watch exists for the block, refuse to
buffer subsequent operations, so that the purge that is being buffered
will not "overtake" later requests. Previously, we would notify the
watch in this case. Either way, the block would be read to the buffer
pool. In the current design, we can only notify the watch by actually
setting up a real block in buf_pool->page_hash.

rb://263 approved by Inaam Rana
2010-03-10 21:39:40 +00:00
Davi Arnaut
f147aa35a6 Automatic merge. 2010-03-10 15:44:58 -03:00
Luis Soares
ade4977c1e Fix for BUG#51716 and BUG#51787.
In BUG#51787 we were using the wrong charset to print out the
data. We were using the field charset for the string that would
hold the information. This caused the assertion, because the
string length was not aligned with UTF32 bytes requirements for
storage.

We fix this by using &my_charset_latin1 in the string object
instead of the field->charset(). As a side-effect, we needed to
extend the show_sql_type interface so that it took the field
charset is now passed as a parameter, so that one is able to
calculate the correct field size.

In BUG#51716 we had issues with Field_string::pack and
Field_string::unpack. When packing, the length was incorrectly
calculated. When unpacking, the padding the string would be
padded with the wrong bytes (a few bytes less than it should).

We fix this by resorting to charset abstractions (functions) that
calculate the correct length when packing and pad correctly the
string when unpacking.
2010-03-10 17:33:51 +00:00