Commit graph

812 commits

Author SHA1 Message Date
vasil
83737a3444 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.
2010-03-10 08:53:21 +00:00
vasil
5eceb6f4ab 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
2010-03-10 07:04:38 +00:00
jyang
f37afcbe89 branches/5.1: Fix bug "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.
2010-03-09 15:54:14 +00:00
vasil
4c4f92334e branches/5.1:
Whitespace fixup.
2010-03-08 17:13:20 +00:00
calvin
1c85618eb5 branches/5.1: fix bug#51653: outdated reference to set-variable
Non functional change.
2010-03-03 21:56:10 +00:00
jyang
978e647f5d branches/5.1: Fix bug , AIX implementation of readdir_r
causes InnoDB errors. readdir_r() returns an non-NULL value
in the case of reaching the end of a directory. It should
not be treated as an error return.

rb://238 approved by Marko
2010-02-11 10:24:19 +00:00
inaam
2674094476 branches/5.1: Fix Bug
InnoDB logs error repeatedly when trying to load page into buffer pool

In buf_page_get_gen() if we are unable to read a page (because of
corruption or some other reason) we keep on retrying. This fills up
error log with millions of entries in no time and we'd eventually run
out of disk space. This patch limits the number of attempts that we
make (currently set to 100) and after that we abort with a message.

rb://241 Approved by: Heikki
2010-02-09 18:23:09 +00:00
jyang
7201c8019f branches/5.1: Fix bug , "SHOW INNODB STATUS deadlock info
incorrect when deadlock detection aborts". Print the correct
lock owner when recursive function lock_deadlock_recursive()
exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK.

rb://217, approved by Marko.
2010-02-03 01:57:32 +00:00
sunny
1a866c2c3a branches/5.1: Check *first_value every time against the column max
value and  set *first_value to next autoinc if it's > col max value.
ie.  not rely on what is passed in from MySQL.

[49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
rb://236
2010-01-29 22:43:06 +00:00
sunny
80fd468771 branches/5.1: Undo r6536. 2010-01-29 22:35:00 +00:00
sunny
6ca11690f1 branches/5.1: Check *first_value everytime against the column max
value and  set *first_value to next autoinc if it's > col max value.
ie.  not rely on what is passed in from MySQL.

[49497] Error 1467 (ER_AUTOINC_READ_FAILED) on inserting a negative value
rb://236
2010-01-29 22:13:42 +00:00
sunny
ce82592e11 branches/5.1: Undo the change from r6424. We need to return DB_SUCCESS even
if we were unable to initialize the tabe autoinc value. This is required for
the open to succeed. The only condition we currently treat as a hard error
is if the autoinc field instance passed in by MySQL is NULL.

Previously if the table autoinc value was 0 and the next value was requested
we had an assertion that would fail. Change that assertion and treat a value
of 0 to mean that the autoinc system is unavailable. Generation of next
value will now return failure.

rb://237
2010-01-29 22:08:40 +00:00
sunny
3e04d74cac branches/5.1: Add reference to bug#47621 in the comment. 2010-01-21 07:38:35 +00:00
sunny
39305ef5f2 branches/5.1: Factor out test for bug#44030 from innodb-autoinc.test
into a separate test/result files.
2010-01-21 00:57:50 +00:00
sunny
3a4a945cb9 branches/5.1: Factor out test for bug#44030 from innodb-autoinc.test
into a separate test/result files.
2010-01-21 00:55:08 +00:00
calvin
7acd931df6 branches/5.1: fix bug#49396: main.innodb test fails in embedded mode
Change replace_result by using $MYSQLD_DATADIR. Tested in both embedded
mode and normal server mode.
2010-01-15 23:43:27 +00:00
marko
04e0ee05d1 branches/5.1: In innobase_initialize_autoinc(), do not attempt to read
the maximum auto-increment value from the table if
innodb_force_recovery is set to at least 4, so that writes are
disabled. (Bug )

innobase_get_int_col_max_value(): Move the function definition before
ha_innobase::innobase_initialize_autoinc(), because that function now
calls this function.

ha_innobase::innobase_initialize_autoinc(): Change the return type to
void.  Do not attempt to read the maximum auto-increment value from
the table if innodb_force_recovery is set to at least 4.  Issue
ER_AUTOINC_READ_FAILED to the client when the auto-increment value
cannot be read.

rb://144 by Sunny, revised by Marko
2010-01-12 10:22:19 +00:00
marko
cf1356b7aa branches/5.1: Non-functional change:
Make innobase_get_int_col_max_value() a static function.
It does not access any fields of class ha_innobase.
2010-01-12 09:34:27 +00:00
jyang
e3e3bdcc9d branches/5.1: Fix bug : Creating/Dropping a temporary table
while at 1023 transactions will cause assert. Handle possible
DB_TOO_MANY_CONCURRENT_TRXS when deleting metadata in
row_drop_table_for_mysql().

rb://220, approved by Marko
2010-01-12 05:59:16 +00:00
marko
6c88ea8c20 branches/5.1: Remove an obsolete declaration of LOCK_thread_count. 2009-12-22 09:11:09 +00:00
marko
5b0b143ec8 branches/5.1: lock_print_info_summary(): Remove a reference to
innobase_mysql_end_print_arbitrary_thd() that should have been
removed in r6347 when removing the function.
2009-12-22 09:09:54 +00:00
marko
ee656d0b49 branches/5.1: Merge a change from MySQL:
------------------------------------------------------------
revno: 3236
committer: Satya B <satya.bn@sun.com>
branch nick: mysql-5.1-bugteam
timestamp: Tue 2009-12-01 17:48:57 +0530
message:
  merge to mysql-5.1-bugteam
    ------------------------------------------------------------
    revno: 3234.1.1
    committer: Gleb Shchepa <gshchepa@mysql.com>
    branch nick: mysql-5.1-bugteam
    timestamp: Tue 2009-12-01 14:38:40 +0400
    message:
      Bug  (reopened): thd_security_context is not thread safe, crashes?

      manual merge 5.0-->5.1, updating InnoDB plugin.
    ------------------------------------------------------------
    revno: 1810.3968.13
    committer: Gleb Shchepa <gshchepa@mysql.com>
    branch nick: mysql-5.0-bugteam
    timestamp: Tue 2009-12-01 14:24:44 +0400
    message:
      Bug  (reopened): thd_security_context is not thread safe, crashes?

      The bug 38816 changed the lock that protects THD::query from
      LOCK_thread_count to LOCK_thd_data, but didn't update the associated
      InnoDB functions.

      1. The innobase_mysql_prepare_print_arbitrary_thd and the
      innobase_mysql_end_print_arbitrary_thd InnoDB functions have been
      removed, since now we have a per-thread mutex: now we don't need to wrap
      several inter-thread access tries to THD::query with a single global
      LOCK_thread_count lock, so we can simplify the code.

      2. The innobase_mysql_print_thd function has been modified to lock
      LOCK_thd_data in direct way.
2009-12-22 08:54:55 +00:00
jyang
3f2db67f03 branches/5.1: Fix bug - Diagnostics are frequently not
printed after a long lock wait in InnoDB. Separate out the 
lock wait timeout check thread from monitor information
printing thread.

rb://200 Approved by Marko.
2009-12-17 04:54:24 +00:00
marko
c4cdbe88c9 branches/5.1: Merge r4922 from branches/zip.
This the fix for the first part of Bug  from InnoDB Plugin to
the built-in InnoDB in MySQL 5.1. This allows InnoDB Hot Backup to
back up a database while the built-in InnoDB in MySQL 5.1 is creating
temporary tables. (This fix does not address the printouts about
missing .ibd files for temporary tables at InnoDB startup, which was
committed to branches/zip in r6252.)

rb://219 approved by Sunny Bains.

branches/zip: Distinguish temporary tables in MLOG_FILE_CREATE.
This addresses Mantis Issue  in InnoDB Hot Backup and some
of MySQL Bug .

In MLOG_FILE_CREATE, we need to distinguish temporary tables, so that
InnoDB Hot Backup can work correctly.  It turns out that we can do this
easily, by using a bit of the previously unused parameter for page number.
(The page number parameter of MLOG_FILE_CREATE has been written as 0 
ever since MySQL 4.1, which introduced MLOG_FILE_CREATE.)

MLOG_FILE_FLAG_TEMP: A flag for indicating a temporary table in
the page number parameter of MLOG_FILE_ operations.

fil_op_write_log(): Add the parameter log_flags.

fil_op_log_parse_or_replay(): Add the parameter log_flags.
Do not replay MLOG_FILE_CREATE when MLOG_FILE_FLAG_TEMP is set in log_flags.
This only affects ibbackup --apply-log.  InnoDB itself never replays file
operations.
2009-12-15 13:23:54 +00:00
calvin
7f394ab030 branches/5.1: fix bug#49267: innodb-autoinc.test fails on windows
because of different case mode

There is no change to the InnoDB code, only to fix test case by
changing "T1" to "t1".
2009-12-14 13:12:46 +00:00
vasil
3474b4a534 branches/5.1:
Minor changes to support plugin snapshots.
2009-11-27 20:07:12 +00:00
sunny
8401ded572 branches/5.1: Fix Bug#47720 - REPLACE INTO Autoincrement column with negative values.
This bug is similiar to the negative autoinc filter patch from earlier,
with the additional handling of filtering out the negative column values
set explicitly by the user.

rb://184
Approved by Heikki.
2009-11-25 23:14:42 +00:00
sunny
07ce318c4e branches/5.1: This is an interim fix, fix whitepsace issues. 2009-11-25 08:29:03 +00:00
sunny
c8597d1f5a branches/5.1: This is an interim fix, fix tests and make read float/double arg const. 2009-11-25 08:28:35 +00:00
sunny
c6412767e6 branches/5.1: This is an interim fix, fix white space errors. 2009-11-25 08:27:39 +00:00
sunny
ae439e4b0c branches/5.1: Fix BUG#49032 - auto_increment field does not initialize to last value in InnoDB Storage Engine.
We use the appropriate function to read the column value for non-integer
autoinc column types, namely float and double.

rb://208. Approved by Marko.
2009-11-25 08:26:27 +00:00
sunny
2dc8cfb842 branches/5.1: Fix autoinc failing test results.
(this should be skipped when merging 5.1 into zip)
2009-11-24 21:52:43 +00:00
jyang
1e403c082b branches/5.1: Non-functional change, fix formatting. 2009-11-20 07:38:43 +00:00
jyang
564dd263c2 branches/5.1: Add a special case to handle the Duplicated Key error
and return DB_ERROR instead. This is to avoid a possible SIGSEGV
by mysql error handling re-entering the storage layer for dup key
info without proper table handle.
This is to prevent a server crash when error situation in bug
 "DDL on partitioned innodb tables leaves data dictionary
in an inconsistent state" happens.

rb://157 approved by Sunny Bains.
2009-11-20 05:55:48 +00:00
jyang
acec0b0305 branches/5.1: Use btr_free_root() instead of fseg_free() for
the fix of bug , because fseg_free() is not defined
in the zip branch. And we could save one mini-trasaction started
by fseg_free().

Approved by Marko.
2009-11-19 13:12:22 +00:00
vasil
f235127984 branches/5.1:
White space fixup - indent under the opening (
2009-11-19 10:14:23 +00:00
jyang
8ba7981699 branches/5.1: Fix bug "Data type for float and
double is incorrectly reported in InnoDB table monitor".
Certain datatypes are not printed correctly in
dtype_print().

rb://204 Approved by Marko.
2009-11-18 05:14:23 +00:00
jyang
409112e408 branches/5.1: Fix bug "when innodb tablespace is
configured too small, crash and corruption!". Function
btr_create() did not check the return status of fseg_create(),
and continue the index creation even there is no sufficient
space.

rb://205 Approved by Marko
2009-11-18 03:27:30 +00:00
vasil
5652676929 branches/5.1:
Merge a change from MySQL:
(this has been reviewed by Calvin and Marko, and Calvin says Luis has
incorporated Marko's suggestions)

  ------------------------------------------------------------
  revno: 3092.5.1
  committer: Luis Soares <luis.soares@sun.com>
  branch nick: mysql-5.1-bugteam
  timestamp: Thu 2009-09-24 15:52:52 +0100
  message:
    BUG#42829: binlogging enabled for all schemas regardless of
    binlog-db-db / binlog-ignore-db
          
    InnoDB will return an error if statement based replication is used
    along with transaction isolation level READ-COMMITTED (or weaker),
    even if the statement in question is filtered out according to the
    binlog-do-db rules set. In this case, an error should not be printed.
          
    This patch addresses this issue by extending the existing check in
    external_lock to take into account the filter rules before deciding to
    print an error. Furthermore, it also changes decide_logging_format to
    take into consideration whether the statement is filtered out from 
    binlog before decision is made.
  added:
    mysql-test/suite/binlog/r/binlog_stm_do_db.result
    mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt
    mysql-test/suite/binlog/t/binlog_stm_do_db.test
  modified:
    sql/sql_base.cc
    sql/sql_class.cc
    storage/innobase/handler/ha_innodb.cc
    storage/innobase/handler/ha_innodb.h
    storage/innodb_plugin/handler/ha_innodb.cc
    storage/innodb_plugin/handler/ha_innodb.h
2009-11-11 12:52:14 +00:00
calvin
9ca18bed5b branches/5.1: fix bug#3139: Mysql crashes: 'windows error 995'
after several selects on a large DB

During stress environment, Windows AIO may fail with error code
ERROR_OPERATION_ABORTED. InnoDB does not handle the error, rather
crashes. The cause of the error is unknown, but likely due to
faulty hardware or driver.

This patch introduces a new error code OS_FILE_OPERATION_ABORTED,
which maps to Windows ERROR_OPERATION_ABORTED (995). When the error
is detected during AIO, the InnoDB will issue a synchronous retry
(read/write).

This patch has been extensively tested by MySQL support.

Approved by: Marko
rb://196
2009-11-11 00:51:18 +00:00
vasil
b5f373dd0c branches/5.1:
White space fixup.
2009-11-10 13:30:20 +00:00
vasil
2c140ed3ed branches/5.1:
Merge a part of r2911.5.5 from MySQL:
(the other part of this was merged in c5700)

  ------------------------------------------------------------
  revno: 2911.5.5
  committer: Vladislav Vaintroub <vvaintroub@mysql.com>
  branch nick: 5.1-innodb_plugin
  timestamp: Wed 2009-06-10 10:59:49 +0200
  message:
    Backport WL#3653 to 5.1 to enable bundled innodb plugin.
    Remove custom DLL loader code from innodb plugin code, use 
    symbols exported from mysqld.
  removed:
    storage/innodb_plugin/handler/handler0vars.h
    storage/innodb_plugin/handler/win_delay_loader.cc
  added:
    storage/mysql_storage_engine.cmake
    win/create_def_file.js
  modified:
    CMakeLists.txt
    include/m_ctype.h
    include/my_global.h
    include/my_sys.h
    include/mysql/plugin.h
    libmysqld/CMakeLists.txt
    mysql-test/mysql-test-run.pl
    mysql-test/t/plugin.test
    mysql-test/t/plugin_load-master.opt
    mysys/charset.c
    sql/CMakeLists.txt
    sql/handler.h
    sql/mysql_priv.h
    sql/mysqld.cc
    sql/sql_class.cc
    sql/sql_class.h
    sql/sql_list.h
    sql/sql_profile.h
    storage/Makefile.am
    storage/archive/CMakeLists.txt
    storage/blackhole/CMakeLists.txt
    storage/csv/CMakeLists.txt
    storage/example/CMakeLists.txt
    storage/federated/CMakeLists.txt
    storage/heap/CMakeLists.txt
    storage/innobase/CMakeLists.txt
    storage/innobase/handler/ha_innodb.cc
    storage/innodb_plugin/CMakeLists.txt
    storage/innodb_plugin/handler/ha_innodb.cc
    storage/innodb_plugin/handler/handler0alter.cc
    storage/innodb_plugin/handler/i_s.cc
    storage/innodb_plugin/plug.in
    storage/myisam/CMakeLists.txt
    storage/myisammrg/CMakeLists.txt
    win/Makefile.am
    win/configure.js
2009-11-09 09:43:31 +00:00
vasil
b8a2d8f247 branches/5.1:
Followup to r5700: Adjust the changes so they are the same as in the BZR
repository.
2009-11-09 09:15:01 +00:00
marko
8b63796596 branches/5.1: Port r6134 from branches/zip:
------------------------------------------------------------------------
  r6134 | marko | 2009-11-04 07:57:29 +0000 (Wed, 04 Nov 2009) | 5 lines

  branches/zip: innobase_convert_identifier(): Convert table names with
  explain_filename() to address Bug : 'show innodb status'
  causes errors Invalid (old?) table or database name in logs.

  rb://134 approved by Sunny Bains
  ------------------------------------------------------------------------

innobase_print_identifier(): Replace with innobase_convert_name().

innobase_convert_identifier(): New function, called by innobase_convert_name().
2009-11-04 10:28:10 +00:00
vasil
69ac160be9 branches/5.1:
Revert a change to Makefile.am that sneaked unnoticed in c6127.
2009-10-30 15:14:22 +00:00
vasil
b3bfd1d12a branches/5.1:
Backport c6121 from branches/zip:

  ------------------------------------------------------------------------
  r6121 | sunny | 2009-10-30 01:42:11 +0200 (Fri, 30 Oct 2009) | 7 lines
  Changed paths:
     M /branches/zip/mysql-test/innodb-autoinc.result
  
  branches/zip: This test has been problematic for sometime now. The underlying
  bug is that the data dictionaries get out of sync. In the AUTOINC code we
  try and apply salve to the symptoms. In the past MySQL made some unrelated
  change and the dictionaries stopped getting out of sync and this test started
  to fail. Now, it seems they have reverted that changed and the test is
  passing again. I suspect this is not he last time that this test will change.
  
  ------------------------------------------------------------------------
2009-10-30 09:18:25 +00:00
vasil
4184240bca branches/5.1:
White-space fixup.
2009-10-30 08:31:23 +00:00
jyang
693296b5f0 branches/5.1: In os_mem_alloc_large(), if we fail to attach
the shared memory, reset memory pointer ptr to NULL, and
allocate memory from conventional pool. This is a port
from branches/zip.
Bug  Error handling in os_mem_alloc_large appears to be incorrect
rb://198  Approved by: Marko
2009-10-30 03:43:06 +00:00
jyang
a0369766ca branches/5.1: Chnage WARN_LEVEL_ERROR to WARN_LEVEL_WARN
for push_warning_printf() call in innodb.
Fix Bug#47233: Innodb calls push_warning(MYSQL_ERROR::WARN_LEVEL_ERROR)

rb://170 approved by Marko.
2009-10-30 03:18:38 +00:00
vasil
b64e197481 branches/5.1:
Fix typo.
2009-10-14 15:30:12 +00:00