Commit graph

1270 commits

Author SHA1 Message Date
unknown
6fd13aaa3c Implement MySQL framework to support consistent read views in
cursors for InnoDB. The idea of the patch is that if MySQL requests
a consistent read view, we open one when open a cursor, set is as the
active view to a transaction when fetch from the cursor, and close
together with cursor close. This patch is associated to bugs #11813, 
#11832, and #11833. Contains after review fixes.
2005-07-22 14:10:03 +03:00
unknown
98f8091dbe sync0sync.c, sync0sync.h:
Declare 'mutex_list' and 'mutex_list_mutex' extern,
  to avoid link error on OS X and gcc flag "-fno-common"


innobase/include/sync0sync.h:
  Use 'extern' variable declarations, to avoid
  "ld: multiple definitions of symbol" for 'mutex_list'
  and 'mutex_list_mutex' on OS X and gcc flag "-fno-common"
innobase/sync/sync0sync.c:
  Use 'extern' variable declarations, to avoid
  "ld: multiple definitions of symbol" for 'mutex_list'
  and 'mutex_list_mutex' on OS X and gcc flag "-fno-common"
2005-07-21 18:05:10 +02:00
unknown
ec6b1999a5 InnoDB: Make the srv_thread_concurrency checks more consistent.
innobase/include/srv0srv.h:
  Define SRV_CONCURRENCY_THRESHOLD
innobase/srv/srv0srv.c:
  Remove srv_thread_concurrency check from srv_conc_enter_innodb()
  and srv_conc_exit_innodb(), as the check is in the (only) caller
  of these functions, in ha_innodb.cc.
  srv_conc_force_enter_innodb(), srv_conc_force_exit_innodb():
  Check for srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD
sql/ha_innodb.cc:
  Make use of SRV_CONCURRENCY_THRESHOLD
2005-07-06 09:38:31 +03:00
unknown
48db5c8ffc InnoDB: Fix compile-pentium-debug-max compilation problem.
innobase/btr/btr0cur.c:
  Move #ifdef outside ut_ad() argument.
innobase/page/page0cur.c:
  Move #ifdef outside ut_ad() argument.
2005-07-05 12:10:20 +03:00
unknown
a1da992f4f Merge marko@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/marko/mysql-5.0-current


sql/ha_innodb.cc:
  Auto merged
2005-07-04 16:12:08 +03:00
unknown
c75eae3578 row0sel.c:
Optimize speed: no need to keep track of set new rec locks in a consistent read


innobase/row/row0sel.c:
  Optimize speed: no need to keep track of set new rec locks in a consistent read
2005-07-02 00:39:47 +03:00
unknown
c2323bae9a trx0trx.h, trx0trx.ic, row0mysql.c:
Fix another bug in the fix of Bug #3300


innobase/row/row0mysql.c:
  Fix another bug in the fix of Bug #3300
innobase/include/trx0trx.ic:
  Fix another bug in the fix of Bug #3300
innobase/include/trx0trx.h:
  Fix another bug in the fix of Bug #3300
2005-07-01 22:53:08 +03:00
unknown
5bcbe404c0 trx0trx.ic, trx0trx.h:
Fix bug in the Bug #3300 bug fix


innobase/include/trx0trx.h:
  Fix bug in the Bug #3300 bug fix
innobase/include/trx0trx.ic:
  Fix bug in the Bug #3300 bug fix
2005-07-01 21:06:23 +03:00
unknown
8561600a5a Many files:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE


sql/ha_innodb.cc:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0mysql.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0sel.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.ic:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/row0mysql.h:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.h:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/lock/lock0lock.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/trx/trx0trx.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
2005-07-01 20:44:35 +03:00
unknown
85036af7ed InnoDB: Fix a bug in BLOB handling; optimize null flag handling.
innobase/rem/rem0rec.c:
  rec_set_nth_field_extern_bit_new(): Fix a bug
  (read the "extern" flag from the correct position).
  
  rec_set_nth_field_extern_bit_new(),
  rec_convert_dtuple_to_rec_new(),
  rec_copy_prefix_to_buf(): Eliminate variables, reduce branching,
  optimize the handling of the null flags.
2005-06-30 13:20:38 +03:00
unknown
384a0c0a0f InnoDB: Optimize page_cur_search_with_match().
innobase/btr/btr0cur.c:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
innobase/include/page0cur.h:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
  Do not define PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
innobase/page/page0cur.c:
  Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
  Disable PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
  
  page_cur_try_search_shortcut(): Optimize the predicates
  (compare the result of page_cmp_dtuple_rec_with_match() against 0,
  use page_rec_is_supremum()).
  
  page_cur_search_with_match(): Compare the result of
  cmp_dtuple_rec_with_match() against zero, add UNIV_LIKELY hints,
  replace duplicated code with gotos.
2005-06-30 11:15:06 +03:00
unknown
26a52bbe94 Merge hundin.mysql.fi:/home/marko/mysql-4.1
into hundin.mysql.fi:/home/marko/mysql-5.0-current


innobase/fil/fil0fil.c:
  SCCS merged
innobase/include/os0file.h:
  SCCS merged
innobase/os/os0file.c:
  SCCS merged
2005-06-28 10:51:01 +03:00
unknown
49e38d31f7 Many files:
Remove compiler warnings on Windows - Bug #11580


innobase/btr/btr0btr.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/btr/btr0cur.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/fil/fil0fil.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/ibuf/ibuf0ibuf.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/log/log0recv.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/os/os0file.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/page/page0page.c:
  Remove compiler warnings on Windows - Bug #11580
innobase/row/row0upd.c:
  Remove compiler warnings on Windows - Bug #11580
2005-06-27 18:58:32 +03:00
unknown
b608f091db InnoDB: After review fixes
innobase/os/os0file.c:
  os_file_set_size(): After review fixes (prevent overflows)
2005-06-27 17:25:37 +03:00
unknown
1084e540ee InnoDB: Optimize the extension of files. This will greatly speed
up CREATE TABLE in innodb_file_per_table=1 mode.


innobase/fil/fil0fil.c:
  fil_extend_space_to_desired_size(): Do not allocate or initialize
  more memory than is necessary.  Write at most one megabyte at a time.
innobase/include/os0file.h:
  os_file_set_size(): Corrected the synopsis
innobase/os/os0file.c:
  os_file_set_size(): Corrected the synopsis and some comments.
  s/offset/current_size; s/low/desired_size/;
  Do not allocate or initialize more memory than is necessary.
  Write at most one megabyte at a time.
2005-06-27 17:04:57 +03:00
unknown
aa32b76a46 Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0
2005-06-27 11:01:03 +03:00
unknown
74307f39eb WL#2286 - Compile MySQL w/YASSL support
Fix for compilation failure with Forte Developer C++.


configure.in:
  Export ARFLAGS, so innobase could pick it up.
innobase/configure.in:
  Use ARFLAGS exported by parent configure script.
2005-06-23 21:29:44 +05:00
unknown
34ab0da7dd Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0
2005-06-22 20:07:31 +03:00
unknown
b4268440a4 InnoDB: Remove compilation warnings and errors on SGI IRIX.
innobase/row/row0ins.c:
  Remove compilation warnings and errors on SGI IRIX.
2005-06-22 12:51:00 +03:00
unknown
369da8f539 InnoDB: Replace for loops with memset() where possible.
innobase/btr/btr0cur.c:
  Replace for loop with memset()
innobase/buf/buf0buf.c:
  buf_print(): Remove for loop for initializing counts[].
  Similar to index_ids[], the elements of this array will
  be initialized when they are allocated, i.e., counts[n_found++] = 1.
innobase/os/os0file.c:
  Replace for loop with memset()
innobase/page/page0page.c:
  Replace for loop with memset()
innobase/trx/trx0rec.c:
  Replace for loop with memset()
2005-06-22 12:36:24 +03:00
unknown
4d7bca88e9 InnoDB: Correct a function comment.
innobase/include/rem0rec.h:
  rec_get_nth_field(): Correct the comment.
innobase/include/rem0rec.ic:
  rec_get_nth_field(): Correct the comment.
2005-06-22 12:02:31 +03:00
unknown
c0f189f83a Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0


innobase/trx/trx0undo.c:
  Auto merged
2005-06-21 20:15:22 +03:00
unknown
77514fbc50 log0log.c:
log_checkpoint_margin(): Correct a typo that was introduced
  when fixing gcc 4.0 warnings.


innobase/log/log0log.c:
  log_checkpoint_margin(): Correct a typo that was introduced
  when fixing gcc 4.0 warnings.
2005-06-21 14:55:20 +03:00
unknown
0bfbba1064 InnoDB: Remove some warnings reported by GCC 4.0.0.
innobase/log/log0recv.c:
  Remove GCC 4.0.0 warnings about possibly uninitialized variables.
innobase/row/row0umod.c:
  row_undo_mod_undo_also_prev_vers(): Remove unused parameter thr,
  always initialize *undo_no to remove GCC 4.0.0 warning
innobase/trx/trx0undo.c:
  trx_undo_write_xid(): Remove warning about signedness mismatch,
  add const qualifier to parameter xid.
sql/ha_innodb.cc:
  Add proper casts from ulonglong to ulong in fprintf statements.
2005-06-21 11:49:55 +03:00
unknown
2fb07495ed Merge hundin.mysql.fi:/home/marko/mysql-5.0
into hundin.mysql.fi:/home/marko/mysql-5.0-current


innobase/dict/dict0dict.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/include/lock0lock.h:
  Auto merged
innobase/lock/lock0lock.c:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/row/row0ins.c:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-06-21 07:36:18 +03:00
unknown
3236060592 InnoDB: Remove warnings detected by GCC 4.0.0
innobase/fsp/fsp0fsp.c:
  Declare "first" in the scope where it is used, and add dummy return
  statement after ut_error to silence compiler warning.
innobase/include/dyn0dyn.h:
  Add const qualifier to dyn_push_string().
innobase/include/dyn0dyn.ic:
  dyn_push_string(): Add const qualifier to str;
  remove intermediate assignment.
innobase/include/mtr0log.h:
  mlog_write_string(), mlog_catenate_string(): Add const to str
innobase/log/log0log.c:
  Eliminate variables new_oldest and do_preflush in order to avoid
  warnings about possibly uninitialized variables.
  (new_oldest will now be declared in the scope of usage,
  and do_preflush == (advance != 0).)
innobase/log/log0recv.c:
  Remove warnings about uninitialized variables.
  Add UNIV_UNLIKELY() hints.
innobase/mtr/mtr0log.c:
  mlog_write_string(), mlog_catenate_string(): Add const to str
  mlog_write_string(): Add UNIV_UNLIKELY hints to assertion-like tests
innobase/row/row0sel.c:
  Remove warning about possibly uninitialized variable.
  (Always initialize *out_rec.)
2005-06-20 11:06:20 +03:00
unknown
1eec421fec InnoDB: remove flag lock_print_waits from non-debug builds.
innobase/include/lock0lock.h:
  Remove flag lock_print_waits from non-debug builds.
innobase/lock/lock0lock.c:
  Remove flag lock_print_waits from non-debug builds.
  Add InnoDB lock compatibility matrix for easy reference.
innobase/trx/trx0roll.c:
  Remove flag lock_print_waits from non-debug builds.
2005-06-17 15:29:03 +03:00
unknown
54deb82659 trx0undo.c:
Apply manually Jan's patch to remove 64-Windows compiler warnings that were reported by Georg Richter


innobase/trx/trx0undo.c:
  Apply manually Jan's patch to remove 64-Windows compiler warnings that were reported by Georg Richter
2005-06-17 15:08:57 +03:00
unknown
04cc7cdef7 pars0lex.l:
Add one more step to the patching instructions.
lexyy.c:
  Fix a Win64 type conversion warning


innobase/pars/lexyy.c:
  Fix a Win64 type conversion warning
innobase/pars/pars0lex.l:
  Add one more step to the patching instructions.
2005-06-17 12:00:05 +03:00
unknown
ca25e99b16 InnoDB: After review fixes
innobase/include/page0page.ic:
  page_rec_set_next(): s/ut_a()/ut_ad()/
  page_rec_get_prev(): Eliminate a buf_frame_align() call
innobase/lock/lock0lock.c:
  lock_rec_get_first(): Determine heap_no before the loop
2005-06-16 16:59:49 +03:00
unknown
76a11195b8 InnoDB: Fix ut0dbg compilation errors on NetWare
innobase/dict/dict0boot.c:
  Remove dummy code to work around bug in the pgcc compiler.
innobase/include/ut0dbg.h:
  UT_DBG_PANIC: Avoid exit(), as lexyy.c re-#defines exit().
  Move the code to the function ut_dbg_panic() instead.
innobase/ut/ut0dbg.c:
  [__NETWARE__] Add function ut_dbg_panic()
2005-06-16 15:00:25 +03:00
unknown
5fed4f3a50 InnoDB: Remove unreachable debug code from non-debug builds.
innobase/buf/buf0buf.c:
  Remove buf_dbg_counter unless #ifdef UNIV_DEBUG
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/buf/buf0flu.c:
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/buf/buf0lru.c:
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/buf/buf0rea.c:
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/include/buf0buf.h:
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/include/buf0buf.ic:
  Remove buf_dbg_counter unless #ifdef UNIV_DEBUG
innobase/include/log0log.h:
  Remove log_do_write and log_debug_writes unless #ifdef UNIV_DEBUG
innobase/log/log0log.c:
  Remove log_do_write and log_debug_writes unless #ifdef UNIV_DEBUG
innobase/log/log0recv.c:
  Remove log_debug_writes unless #ifdef UNIV_DEBUG
innobase/srv/srv0start.c:
  Remove log_do_write and buf_debug_prints unless #ifdef UNIV_DEBUG
innobase/sync/sync0sync.c:
  Remove buf_debug_prints unless #ifdef UNIV_DEBUG
2005-06-15 12:50:27 +03:00
unknown
113c627851 InnoDB: Cleanup and after review fixes.
innobase/btr/btr0btr.c:
  Code formatting: add blank line before "goto", do not indent labels
innobase/btr/btr0cur.c:
  Code formatting: add blank line before "goto"
innobase/btr/btr0pcur.c:
  btr_pcur_restore_position(): Replace assertion on cursor->pos_state
  with if condition, to provide better diagnostics. Restore ut_a()
  assertions on cursor->old_rec and cursor->old_n_fields.
innobase/btr/btr0sea.c:
  btr_search_check_guess(): Declare prev_rec and next_rec closer
  to usage.  Add blank lines before goto statements.
2005-06-14 12:21:40 +03:00
unknown
59332c86c0 InnoDB: Remove unreferenced debug functions from non-debug builds.
innobase/buf/buf0buf.c:
  Remove buf_print() and buf_validate() unless #ifdef UNIV_DEBUG
innobase/buf/buf0lru.c:
  Remove buf_LRU_print() and buf_LRU_validate() unless #ifdef UNIV_DEBUG
innobase/include/buf0buf.h:
  Remove buf_print() and buf_validate() unless #ifdef UNIV_DEBUG
innobase/include/buf0lru.h:
  Remove buf_LRU_print() and buf_LRU_validate() unless #ifdef UNIV_DEBUG
innobase/include/rem0rec.h:
  rec_offs_comp(): Correct the comment about return value.
2005-06-13 11:39:31 +03:00
unknown
f6da55d8ce InnoDB: Remove compiler warning
innobase/fil/fil0fil.c:
  Move the declaration of fil_node_t to os0file.h.
  Remove type casting from address-of operation
  (which would break strict aliasing rules)
innobase/include/os0file.h:
  Declare fil_node_t as an opaque structure.
  Replace void* message1 with fil_node_t* message1.
innobase/os/os0file.c:
  Replace void* message1 with fil_node_t* message1.
2005-06-10 15:55:00 +03:00
unknown
25203acbb7 os0sync.c, os0file.c:
Apply Georg Richter's fixes to remove compilation errors on 64-bit Windows


innobase/os/os0file.c:
  Apply Georg Richter's fixes to remove compilation errors on 64-bit Windows
innobase/os/os0sync.c:
  Apply Georg Richter's fixes to remove compilation errors on 64-bit Windows
2005-06-10 14:18:36 +03:00
unknown
2ebdd2d90a InnoDB: minor clean-up in os0file
innobase/include/os0file.h:
  Remove unused function os_aio_all_slots_free() from non-debug builds.
innobase/os/os0file.c:
  Remove unused function os_aio_all_slots_free() from non-debug builds.
  Add static qualifiers to module-global variables.
2005-06-10 14:00:53 +03:00
unknown
5900f0cd5c innobase/include/univ.i: Added some comments.
innobase/include/univ.i:
  Replace PRULINT with ULINTPF in a comment.
  Document the macros based on __builtin_expect()
  and __builtin_prefetch().
2005-06-10 12:29:35 +03:00
unknown
7256cdaa56 InnoDB: Improved the handling of assertions.
innobase/include/ut0dbg.h:
  Write help macros to use in ut_a() and ut_error.
  Moved some ut_a() and ut_error code to non-inlined functions.
  Fixed ut_error on NetWare.
  Reintroduced ut_dbg_zero on non-GCC platforms.
innobase/ut/ut0dbg.c:
  Reintroduced ut_dbg_zero on non-GCC platforms.
  Removed ut_dbg_null_ptr on NetWare.
  Add helpers ut_dbg_assertion_failed() and ut_dbg_stop_thread().
2005-06-10 12:22:23 +03:00
unknown
9db57192c1 btr0cur.c:
Move the flag btr_cur_print_record_ops behind #ifdef UNIV_DEBUG.
  Remove unused variable btr_cur_rnd.


innobase/btr/btr0cur.c:
  Move the flag btr_cur_print_record_ops behind #ifdef UNIV_DEBUG.
  Remove unused variable btr_cur_rnd.
2005-06-10 11:40:20 +03:00
unknown
2e2a4e4f3e InnoDB: Do not distinguish explicitly requested table locks.
Since UNLOCK TABLES will commit the transaction (and thus release
all InnoDB locks held by it), it is unnecessary to release the
user-requested table locks separately.


innobase/include/lock0lock.h:
  Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL.
  Remove lock_release_tables_off_kernel().
innobase/include/row0mysql.h:
  Remove row_unlock_tables_for_mysql().
innobase/include/trx0trx.h:
  Remove n_lock_table_exp and n_lock_table_transactional.
innobase/lock/lock0lock.c:
  Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL.
  Remove lock_release_tables_off_kernel().
  Remove references to trx->n_lock_table_exp
  and trx->n_lock_table_transactional.
innobase/row/row0mysql.c:
  Remove row_unlock_tables_for_mysql().
  Remove references to LOCK_TABLE_TRANSACTIONAL and LOCK_TABLE_EXP.
innobase/trx/trx0trx.c:
  Remove n_lock_table_exp and n_lock_table_transactional.
sql/ha_innodb.cc:
  Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL
  and row_unlock_tables_for_mysql().
2005-06-08 15:45:56 +03:00
unknown
260bfacaa9 merged
innobase/row/row0mysql.c:
  Auto merged
sql/hash_filo.h:
  Auto merged
2005-05-28 01:28:18 +02:00
unknown
91427f2434 Merge hundin.mysql.fi:/home/marko/k/mysql-4.0
into hundin.mysql.fi:/home/marko/mysql-4.1


innobase/row/row0mysql.c:
  Auto merged
2005-05-26 15:57:24 +03:00
unknown
9181c17c14 InnoDB: Check all referencing tables in DROP DATABASE (Bug #10335).
innobase/row/row0mysql.c:
  row_drop_table_for_mysql(): Check all referencing tables
  when drop_db==TRUE (Bug #10335)
2005-05-26 15:42:24 +03:00
unknown
d9d47c6a6f srv0start.c:
innobase_shutdown_for_mysql(): Do very fast shutdown
  only if srv_fast_shutdown==2, not if srv_fast_shutdown!=0
  (Bug #9673)


innobase/srv/srv0start.c:
  innobase_shutdown_for_mysql(): Do very fast shutdown
  only if srv_fast_shutdown==2, not if srv_fast_shutdown!=0
  (Bug #9673)
2005-05-25 12:41:57 +03:00
unknown
8ddb0ddc5c Print information about XA recovery only if there are prepared XA transactions
after recovery.
2005-05-24 14:06:44 +03:00
unknown
7f5bf3dcdb Manual merge (again)
configure.in:
  Auto merged
include/mysql.h:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
BitKeeper/deleted/.del-ctype-cp932.c:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~ffe4a0c9e3206150:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ps_grant.test:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2005-05-14 12:38:12 +04:00
unknown
c4a1210fd4 row0mysql.c:
InnoDB wrongly complained in the .err log that MySQL is trying to drop a non-existent table, if tablespace ran out (Bug #10607)


innobase/row/row0mysql.c:
  InnoDB wrongly complained in the .err log that MySQL is trying to drop a non-existent table, if tablespace ran out (Bug #10607)
2005-05-13 18:37:22 +03:00
unknown
67d0502bcf InnoDB ON UPDATE CASCADE fixes:
Enforce maximum char_length of UTF-8 data (Bug #10409).
Pad UTF-8 variable-length CHAR columns with 0x20.
Pad UCS2 CHAR columns with 0x0020 (Bug #10511).


innobase/data/data0type.c:
  dtype_get_at_most_n_mbchars(): Avoid division by zero in assertion
  when this function is called with dtype->mbmaxlen==0
innobase/row/row0ins.c:
  row_ins_cascade_calc_update_vec(): Enforce maximum char_length of
  UTF-8 data (Bug #10409).
  Pad UTF-8 CHAR columns with 0x20.
  Pad UCS2 CHAR columns with 0x0020 (Bug #10511).
2005-05-13 12:55:59 +03:00
unknown
698502867e After merge fix
innobase/include/srv0srv.h:
  Restore accidentally deleted comment.
2005-05-06 12:43:10 +03:00
unknown
f09d789cb4 Merge 2005-05-06 11:45:59 +03:00
unknown
98eb8d7c16 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/mysql-4.1


sql/ha_innodb.cc:
  Auto merged
2005-05-06 10:15:58 +03:00
unknown
bcd031271f Remove unused function rec_offs_nth_null().
rec_offs_nth_extern(): Return zero/nonzero instead of FALSE/TRUE.


innobase/row/row0upd.c:
  Normalize the return value of rec_offs_nth_extern() to FALSE/TRUE.
  Avoid a repeated call to upd_ext_vec_contains().
2005-04-27 13:35:57 +03:00
unknown
949112c12a Fix bugs found in previous optimizations.
Make rec_get_deleted_flag() return zero/nonzero instead of FALSE/TRUE.


innobase/btr/btr0btr.c:
  btr_page_get_sure_split_rec(): Fix bug caused by optimization
  (dereferencing null pointer in page_rec_is_supremum())
  btr_page_insert_fits(): Correct a debug assertion.
innobase/btr/btr0cur.c:
  Add debug assertions about page_rec_is_comp().
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  Note that rec_get_deleted_flag() returns zero/nonzero ulint
  instead of FALSE/TRUE ibool.
innobase/include/page0page.ic:
  Move debug assertion to proper place.
innobase/include/rem0rec.h:
  rec_get_deleted_flag(), rec_set_deleted_flag(): Make the flag
  zero/nonzero in order to avoid FALSE/TRUE normalization in
  every rec_get_deleted_flag() call.
innobase/include/rem0rec.ic:
  rec_get_deleted_flag(), rec_set_deleted_flag(): Make the flag
  zero/nonzero in order to avoid FALSE/TRUE normalization in
  every rec_get_deleted_flag() call.
innobase/rem/rem0rec.c:
  rec_init_offsets(): Fix bugs introduced in optimization.
innobase/row/row0sel.c:
  Make debug assertion stricter.
innobase/row/row0vers.c:
  Note that rec_get_deleted_flag() returns zero/nonzero ulint
  instead of FALSE/TRUE ibool.
2005-04-27 12:28:44 +03:00
unknown
79d3149d3f Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0


innobase/dict/dict0dict.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
2005-04-27 03:02:25 +03:00
unknown
705d163124 dict0dict.c, dict0dict.h, fil0fil.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names


innobase/fil/fil0fil.c:
  Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/include/dict0dict.h:
  Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/dict/dict0dict.c:
  Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
2005-04-27 02:57:19 +03:00
unknown
4a3a46af13 InnoDB: Performance optimizations based on OProfile analysis
innobase/btr/btr0btr.c:
  Eliminate some buf_frame_align() calls.
  Make use of the page_rec_is_infimum(), page_rec_is_supremum()
  and page_rec_is_user_rec() functions.
  Replace some index->table->comp with page_is_comp().
  Eliminate some variables to reduce register spilling on x86.
  Note that page_is_comp() may return nonzero instead of TRUE.
  Note that rec_offs_comp() may return nonzero instead of TRUE.
innobase/btr/btr0cur.c:
  Eliminate some buf_frame_align() calls.
  Replace some index->table->comp with
  page_is_comp() or rec_offs_comp().
  Eliminate some variables to reduce register spilling on x86.
  Note that page_is_comp() may return nonzero instead of TRUE.
  Note that rec_offs_comp() may return nonzero instead of TRUE.
  Remove an extra mem_heap_create() call from btr_cur_update_in_place().
  Add "page" parameter to lock_rec_store_on_page_infimum().
  Add some UNIV_LIKELY() and UNIV_UNLIKELY() hints.
  
  btr_estimate_number_of_different_key_vals(): Rename the
  offsets_* variables to be more descriptive and eliminate one
  rec_get_offsets() and one page_rec_get_next() call in the loop.
innobase/btr/btr0pcur.c:
  Eliminate some buf_frame_align() calls.
  Make use of the page_rec_is_infimum(), page_rec_is_supremum()
  and page_rec_is_user_rec() functions.
  Replace some index->table->comp with page_is_comp().
  Eliminate some variables to reduce register spilling on x86.
  Note that page_is_comp() may return nonzero instead of TRUE.
  Make some ut_a() assertions ut_ad() ones to improve performance.
  Add some UNIV_LIKELY() and UNIV_UNLIKELY() hints.
innobase/btr/btr0sea.c:
  Make use of page_rec_is_infimum() and page_rec_is_supremum().
  Eliminate some buf_frame_align() calls.
  Add some UNIV_UNLIKELY and UNIV_LIKELY hints.
  Turn some assertions into debug assertions.
innobase/dict/dict0crea.c:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp
innobase/ibuf/ibuf0ibuf.c:
  Make use of page_rec_is_infimum() and page_rec_is_supremum().
  Add some UNIV_UNLIKELY and UNIV_LIKELY hints.
  ibuf_get_merge_page_nos(): Rename parameter "first_rec" to "rec"
  and eliminate local variable "rec".
innobase/include/btr0btr.h:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp
innobase/include/buf0buf.h:
  Rename buf_frame_get_modify_clock()
  to buf_block_get_modify_clock().
innobase/include/buf0buf.ic:
  Rename buf_frame_get_modify_clock()
  to buf_block_get_modify_clock() and
  remove the buf_block_align() call.
innobase/include/lock0lock.h:
  lock_rec_store_on_page_infimum(): Add parameter "page"
innobase/include/mach0data.h:
  Add mach_encode_2() and mach_decode_2().
innobase/include/mach0data.ic:
  Add mach_encode_2() and mach_decode_2().
innobase/include/page0cur.h:
  Add const qualifier to page_cur_is_before_first()
  and page_cur_is_after_last().
innobase/include/page0cur.ic:
  Make use of page_rec_is_infimum() and page_rec_is_supremum().
innobase/include/page0page.h:
  Remove page_rec_is_first_user_rec() and page_rec_is_last_user_rec().
  Add page_rec_is_infimum() and page_rec_is_supremum().
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
innobase/include/page0page.ic:
  Remove page_rec_is_first_user_rec() and page_rec_is_last_user_rec().
  Add page_rec_is_infimum() and page_rec_is_supremum().
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Add UNIV_UNLIKELY, UNIV_LIKELY and UNIV_EXPECT hints.
  Reduce the number of buf_frame_align() calls.
innobase/include/rem0rec.ic:
  rec_offs_comp(): Return zero or nonzero instead of FALSE or TRUE.
innobase/include/row0mysql.h:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
innobase/lock/lock0lock.c:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Remove parameter "comp" from lock_rec_get_next(),
  lock_rec_has_expl() and lock_rec_other_has_expl_req().
  Add parameter "page" to lock_rec_store_on_page_infimum().
  Add UNIV_UNLIKELY hints.
  Reduce the number of buf_frame_align() calls.
  Make use of page_rec_is_infimum(), page_rec_is_supremum() and
  page_rec_is_user_rec().
  Move the "comp" flag outside some loops.
innobase/mtr/mtr0log.c:
  Replace index->table->comp with page_rec_is_comp().
innobase/page/page0cur.c:
  Replace index->table->comp with page_is_comp() or page_rec_is_comp().
  Eliminate some buf_frame_align() calls.
  Add some debug assertions.
innobase/page/page0page.c:
  Optimize page_dir_find_owner_slot(). Compare the record offset
  16 bits at a time, because that seems to be the only way to avoid
  register spilling on x86.
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Remove parameter "page" of page_delete_rec_list_write_log().
  Make use of page_rec_is_infimum().
innobase/rem/rem0cmp.c:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
innobase/row/row0ins.c:
  Make use of page_rec_is_infimum() and page_rec_is_supremum().
  Reduce the amount of buf_frame_align() calls.
  row_ins_index_entry_low(): Disable assertion about column count
  unless #ifdef UNIV_DEBUG.
innobase/row/row0mysql.c:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
innobase/row/row0row.c:
  Eliminate some buf_frame_align() calls.
  Make use of page_rec_is_infimum().
innobase/row/row0sel.c:
  Make use of page_rec_is_supremum() and page_rec_is_infimum().
  Turn some assertions into debug assertions.
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  
  row_search_for_mysql(): Eliminate local variables "moved",
  "cons_read_requires_clust_rec", "was_lock_wait", "shortcut",
  "success" and "comp". Replace some of them with goto's.
  Disable variable "cnt" unless #ifdef UNIV_SEARCH_DEBUG.
innobase/row/row0vers.c:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Replace index->table->comp with page_rec_is_comp().
  Eliminate some buf_frame_align() calls.
2005-04-25 10:14:35 +03:00
unknown
f51eb30b5a rem0cmp.c:
Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  cmp_dtuple_rec_with_match(): Move condition outside loop.
  Reduce the number of comparisons per iteration.
mtr0mtr.c:
  mtr_memo_slot_release(): Add a UNIV_LIKELY hint.
  Simplify the preprocessor magic.
buf0buf.c:
  buf_page_optimistic_get_func(): Add UNIV_UNLIKELY hints.
  Introduce an exit_func label to remove duplicated error exits.


innobase/buf/buf0buf.c:
  buf_page_optimistic_get_func(): Add UNIV_UNLIKELY hints.
  Introduce an exit_func label to remove duplicated error exits.
innobase/mtr/mtr0mtr.c:
  mtr_memo_slot_release(): Add a UNIV_LIKELY hint.
  Simplify the preprocessor magic.
innobase/rem/rem0cmp.c:
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  cmp_dtuple_rec_with_match(): Move condition outside loop.
  Reduce the number of comparisons per iteration.
2005-04-22 15:47:46 +03:00
unknown
1c8f550096 InnoDB: Optimize rec_get_offsets(), rec_copy_prefix_to_buf() and
other rec_ functions based on OProfile measurements on GNU/Linux x86.


innobase/include/rem0rec.h:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Remove rec_set_node_ptr_flag().
innobase/include/rem0rec.ic:
  Replace FALSE/TRUE ibool comp with zero/nonzero ulint comp.
  Remove rec_set_node_ptr_flag().
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  Correct a spelling error in comment.
  Simplify rec_get_deleted_flag().
innobase/rem/rem0rec.c:
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  rec_init_offsets(), rec_get_offsets_func(): Optimize for x86.
  rec_set_field_extern_bits(): Move "comp" flag outside the loop.
  rec_copy_prefix_to_buf(): Add UNIV_PREFETCH hints.
2005-04-22 15:27:11 +03:00
unknown
33d5b13bbe row0upd.c:
Add UNIV_UNLIKELY hint.
lock0lock.c:
  Correct the prototypes of lock_deadlock_recursive() and
  lock_deadlock_occurs().
data0data.c:
  dtuple_convert_big_rec(): Add UNIV_UNLIKELY hint.
ha_innodb.cc:
  ha_innobase::write_row(): Correct the type of 'mode'.


sql/ha_innodb.cc:
  ha_innobase::write_row(): Correct the type of 'mode'.
innobase/data/data0data.c:
  dtuple_convert_big_rec(): Add UNIV_UNLIKELY hint.
innobase/lock/lock0lock.c:
  Correct the prototypes of lock_deadlock_recursive() and
  lock_deadlock_occurs().
innobase/row/row0upd.c:
  Add UNIV_UNLIKELY hint.
2005-04-22 15:15:18 +03:00
unknown
98dc4142b2 InnoDB: Some low-level optimizations made based on OProfile results.
innobase/dict/dict0mem.c:
  dict_mem_table_create(): Add a debug assertion.
innobase/include/btr0btr.ic:
  btr_node_ptr_get_child_page_no(): Add a UNIV_UNLIKELY hint.
  Remove a buf_frame_align() call.
innobase/include/btr0cur.ic:
  btr_cur_get_page(): Add a debug assertion.
innobase/include/buf0buf.ic:
  buf_block_peek_if_too_old(): Replace if() with return().
  buf_block_align(), buf_frame_align(): Add UNIV_UNLIKELY hints.
innobase/include/data0type.ic:
  dtype_get_fixed_size(): Add UNIV_UNLIKELY hints.
innobase/include/mem0mem.ic:
  Remove signedness warning in debug assertion.
innobase/include/read0read.ic:
  read_view_sees_trx_id(): Eliminate a comparison inside loop.
innobase/include/row0sel.ic:
  open_step(): Add UNIV_EXPECT hint.
innobase/include/row0upd.ic:
  upd_field_set_field_no(): Add a UNIV_UNLIKELY hint.
innobase/include/sync0rw.ic:
  Add UNIV_LIKELY and UNIV_UNLIKELY hints.
  rw_lock_x_lock_func_nowait(): Eliminate a function call.
  Replace ut_a() assertions with ut_ad().
innobase/include/trx0rseg.ic:
  Add UNIV_UNLIKELY hints.
innobase/include/ut0rnd.ic:
  ut_fold_binary(): Eliminate a loop variable
  to avoid register spilling on x86.
2005-04-22 14:04:18 +03:00
unknown
f2c13c3f4f dict0dict.c:
Add some UNIV_LIKELY and UNIV_UNLIKELY hints.
  dict_tree_copy_rec_order_prefix(): Add a UNIV_PREFETCH_R hint on rec.


innobase/dict/dict0dict.c:
  Add some UNIV_LIKELY and UNIV_UNLIKELY hints.
  dict_tree_copy_rec_order_prefix(): Add a UNIV_PREFETCH_R hint on rec.
2005-04-22 13:43:49 +03:00
unknown
c546b5f3b5 InnoDB: Make branch prediction assume that assertions do not fail.
innobase/include/ut0dbg.h:
  Remove ut_dbg_zero.
  Use the UNIV_UNLIKELY() macro in assertions in order to assist branch
  prediction.
innobase/ut/ut0dbg.c:
  Remove ut_dbg_zero.
2005-04-21 15:27:18 +03:00
unknown
fea290807c InnoDB: Speed up comparison functions by making
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL a constant.


innobase/data/data0type.c:
  Remove data_mysql_latin1_swedish_charset_coll.
innobase/include/data0type.h:
  Replace variable data_mysql_latin1_swedish_charset_coll
  with constant DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL.
innobase/rem/rem0cmp.c:
  Replace variable data_mysql_latin1_swedish_charset_coll
  with constant DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL.
sql/ha_innodb.cc:
  Eliminate variable data_mysql_latin1_swedish_charset_coll.
  Add an assertion about DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL.
2005-04-21 15:09:10 +03:00
unknown
7b07e3329a InnoDB: Reduce memcpy() load in row_sel_pop_cached_row_for_mysql()
by copying only a prefix of the row that covers the requested
columns.


innobase/include/row0mysql.h:
  row_prebuilt_struct: Add field mysql_prefix_len
  in order to reduce memcpy() time in
  row_sel_pop_cached_row_for_mysql().
innobase/row/row0sel.c:
  row_sel_pop_cached_row_for_mysql(): memcpy() only
  mysql_prefix_len bytes instead of mysql_row_len.
sql/ha_innodb.cc:
  build_template(): Initialize prebuilt->mysql_prefix_len.
2005-04-21 15:02:54 +03:00
unknown
4e0e9a3bae InnoDB: Define some macros around GCC's __builtin_expect()
and __builtin_prefetch().
Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.


innobase/btr/btr0btr.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/btr/btr0cur.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/btr/btr0sea.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/include/univ.i:
  Define UNIV_EXPECT(), UNIV_LIKELY(), UNIV_UNLIKELY(),
  UNIV_LIKELY_NULL(), UNIV_PREFETCH_R() and UNIV_PREFETCH_RW().
innobase/lock/lock0lock.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/page/page0cur.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/page/page0page.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/rem/rem0rec.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0ins.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0mysql.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0purge.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0row.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0sel.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0undo.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/row/row0upd.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
innobase/trx/trx0rec.c:
  Add UNIV_LIKELY_NULL to if (heap) mem_free_heap(heap) tests.
2005-04-21 14:23:26 +03:00
unknown
ea5c2a148a InnoDB: Make CHECK TABLE killable. (Bug #9730)
innobase/btr/btr0btr.c:
  Enclose btr_print_size() and btr_print_tree() in #ifdef UNIV_BTR_PRINT
  Add trx_t* parameter to btr_validate_tree() and btr_validate_level().
  btr_validate_level(): Call trx_is_interrupted() on each page.
innobase/ibuf/ibuf0ibuf.c:
  Add trx_t* parameter to btr_validate_tree().
innobase/include/btr0btr.h:
  Enclose btr_print_size() and btr_print_tree() in #ifdef UNIV_BTR_PRINT
  Add trx_t* parameter to btr_validate_tree().
innobase/include/trx0trx.h:
  Declare trx_is_interrupted().
innobase/row/row0mysql.c:
  row_scan_and_check_index(): Check trx_is_interrupted() every 1,000
  scanned rows.
  row_check_table_for_mysql(): Check trx_is_interrupted()
  for each index after btr_validate_tree().
sql/ha_innodb.cc:
  Define trx_is_interrupted().
2005-04-20 17:39:05 +03:00
unknown
eb72815b6f InnoDB: Truncate SHOW INNODB STATUS output at the start of the list
of active transactions, if necessary and possible.  (Bug #5436)


innobase/include/lock0lock.h:
  Split lock_print_info() into lock_print_info_summary()
  and lock_print_info_all_transactions().
innobase/lock/lock0lock.c:
  Split lock_print_info() into lock_print_info_summary()
  and lock_print_info_all_transactions().
innobase/include/srv0srv.h:
  srv_printf_innodb_monitor(): Add output parameters trx_start and trx_end.
innobase/srv/srv0srv.c:
  srv_printf_innodb_monitor(): Add output parameters trx_start and trx_end.
sql/ha_innodb.cc:
  innodb_show_status(): Truncate oversized output at the beginning
  of the list of active transactions, if possible.
2005-04-19 14:35:47 +03:00
unknown
dfa485b47d InnoDB: Replace the redo log entry type
MLOG_COMP_REC_SEC_DELETE_MARK with MLOG_REC_SEC_DELETE_MARK
in order to reduce the space occupied by the redo log.


innobase/btr/btr0cur.c:
  Replace MLOG_COMP_REC_SEC_DELETE_MARK with MLOG_REC_SEC_DELETE_MARK
  and eliminate redundant dict_index_t* parameters.
innobase/ibuf/ibuf0ibuf.c:
  Remove unnecessary parameter to btr_cur_del_unmark_for_ibuf()
innobase/include/btr0cur.h:
  Remove unnecessary dict_index_t* parameters
innobase/include/mtr0mtr.h:
  Note that MLOG_COMP_REC_SEC_DELETE_MARK is obsolete
innobase/log/log0recv.c:
  recv_parse_or_apply_log_rec_body():
  Ignore the index information in MLOG_COMP_REC_SEC_DELETE_MARK.
  Add assertions about page_is_comp().
2005-04-18 15:12:30 +03:00
unknown
56ea770272 Fixed a bug: deadlock without any locking, simple select and update (Bug #7975).
Backported from 5.0.3.


innobase/row/row0ins.c:
  If the SQL-query will update or replace duplicate records we take X-lock
  for duplicate records.
sql/ha_innodb.cc:
  INSERT ON DUPLICATE KEY UPDATE will also update duplicate records and we should
  take X-lock in this case for duplicate records.
2005-04-18 12:17:32 +03:00
unknown
43b1125cb9 Adding --innodb_fast_shutdown=2 which shuts down InnoDB faster than the default "1":
most InnoDB threads are not terminated properly and the buffer pool is not flushed
to disk. Still no committed transaction is lost as we flush the logs to disk.
InnoDB does crash recovery at startup after this shutdown.
Using this shutdown in testsuite (mysql-test-run --mysqld=--innodb_fast_shutdown=2) saved 3 minutes (13% of total time).


innobase/include/srv0srv.h:
  srv_fast_shutdown now int to allow 3 values, replacing the srv_fast_shutdown/srv_very_fast_shutdown combo
innobase/log/log0log.c:
  srv_very_fast_shutdown -> (srv_fast_shutdown == 2)
innobase/srv/srv0srv.c:
  srv_very_fast_shutdown -> (srv_fast_shutdown == 2)
innobase/srv/srv0start.c:
  moving message to the InnoDB internal code (like "InnoDB: Starting shutdown" is)
  instead of ha_innodb.cc. That's to have ut_print_timestamp().
sql/ha_innodb.cc:
  As innodb_fast_shutdown is now settable, srv_fast_shutdown must be
  set at shutdown, not at startup.
sql/ha_innodb.h:
  innobase_fast_shutdown now ulong to accept 3 values
sql/mysqld.cc:
  Making the "very fast" InnoDB shutdown accessible to users, by passing
  --innodb-fast-shutdown=2 (disabled on Netware)
sql/set_var.cc:
  innodb_fast_shutdown now settable on the fly (global variable).
  So that user can decide to do a normal/fast/fastest shutdown
  just before doing it.
2005-04-15 18:00:38 +02:00
unknown
88e8c2a03b Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0


innobase/fil/fil0fil.c:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
ndb/src/ndbapi/ndberror.c:
  Auto merged
2005-04-14 22:33:17 +03:00
unknown
ce22ebd02d fil0fil.c:
Add fault tolerance in the scan of .ibd files at a crash recovery; formerly a single failure of readdir_get_next caused the rest of the directory to be skipped


innobase/fil/fil0fil.c:
  Add fault tolerance in the scan of .ibd files at a crash recovery; formerly a single failure of readdir_get_next caused the rest of the directory to be skipped
2005-04-14 22:27:15 +03:00
unknown
9c2446f339 Merge from 4.1
innobase/fil/fil0fil.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/t/ctype_ucs_binlog.test:
  Auto merged
2005-04-13 10:38:11 -07:00
unknown
9983cb598f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-04-13 18:00:14 +02:00
unknown
f0438d5487 Merge
innobase/dict/dict0dict.c:
  Auto merged
innobase/dict/dict0load.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_dynrec.c:
  Auto merged
myisam/myisamdef.h:
  Auto merged
mysql-test/r/kill.result:
  Auto merged
mysql-test/t/kill.test:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/main.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-04-13 16:24:17 +02:00
unknown
3fbb9c39a7 fil0fil.c:
At the shutdown, write the latest lsn only to the first pages of the ibdata files of the system tablespace, NOT to the .ibd files; writing to tens of thousands .ibd files can take minutes


innobase/fil/fil0fil.c:
  At the shutdown, write the latest lsn only to the first pages of the ibdata files of the system tablespace, NOT to the .ibd files; writing to tens of thousands .ibd files can take minutes
2005-04-13 17:22:04 +03:00
unknown
67d88e8151 row0sel.c:
Fix the patch of Jan to optimize next-key locking in searches of type 'primary key >= some value'


innobase/row/row0sel.c:
  Fix the patch of Jan to optimize next-key locking in searches of type 'primary key >= some value'
2005-04-13 16:49:28 +03:00
unknown
880d0295d6 row0sel.c:
Do not test the value of err if the lock operation was skipped because innodb_logs_unsafe_for_binlog was TRUE; though this did not cause any bugs visible to the user, because err is inited to DB_SUCCESS at the start of the function row_search_for_mysql()


innobase/row/row0sel.c:
  Do not test the value of err if the lock operation was skipped because innodb_logs_unsafe_for_binlog was TRUE; though this did not cause any bugs visible to the user, because err is inited to DB_SUCCESS at the start of the function row_search_for_mysql()
2005-04-13 15:49:28 +03:00
unknown
a7de27958c Fixed a bug where next-key locking doesn't allow the insert which does
not produce phantom (bug #9354).
2005-04-13 12:07:16 +03:00
unknown
dec90f5b36 InnoDB: Ignore character set mismatch in ALTER TABLE and RENAME TABLE
if foreign_key_checks=0. (Bug #9802)


innobase/dict/dict0dict.c:
  dict_foreign_add_to_cache(): Add flag check_types.
  If the flag is FALSE, ignore character set mismatch.
innobase/dict/dict0load.c:
  dict_load_foreign(), dict_load_foreigns(): Add flag check_types.
  If the flag is FALSE, differences in character sets will be ignored.
innobase/include/dict0dict.h:
  dict_foreign_add_to_cache(): Add flag check_types.
  If the flag is FALSE, differences in character sets will be ignored.
innobase/include/dict0load.h:
  dict_load_foreigns(): Add flag check_types.
  If the flag is FALSE, differences in character sets will be ignored.
innobase/row/row0mysql.c:
  row_table_add_foreign_constraints(), row_rename_table_for_mysql():
  Pass trx->check_foreigns to dict_load_foreigns()
sql/ha_innodb.cc:
  ha_innobase::rename_table(): Clear trx->check_foreign if necessary.
2005-04-12 16:12:34 +03:00
unknown
3960c84f12 manually merged
Gluh's SESSION/GLOBAL for @variables fix in sql_yacc.yy and
Bar's well_formed_len() changes in ndb code
did not make it and should be re-applied manually


BitKeeper/etc/logging_ok:
  auto-union
include/m_ctype.h:
  Auto merged
innobase/btr/btr0pcur.c:
  Auto merged
innobase/include/btr0pcur.h:
  Auto merged
innobase/include/os0file.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
mysql-test/r/user_var.result:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
ndb/tools/desc.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-mb.c:
  Auto merged
strings/ctype-simple.c:
  Auto merged
strings/ctype-sjis.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
strings/ctype-ujis.c:
  Auto merged
BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d:
  ul
ndb/include/ndbapi/NdbScanOperation.hpp:
  ul
ndb/src/ndbapi/NdbIndexOperation.cpp:
  ul
ndb/src/ndbapi/NdbOperationDefine.cpp:
  ul
ndb/src/ndbapi/NdbOperationSearch.cpp:
  ul
ndb/src/ndbapi/NdbScanOperation.cpp:
  ul
sql/field.cc:
  manually merged, because bk messed it up
sql/sql_yacc.yy:
  merged
2005-04-06 21:19:20 +02:00
unknown
bf67f4c7da Merge mysql.com:/M41/upward-4.1 into mysql.com:/M50/merge-5.0
BitKeeper/deleted/.del-create.c~96cecc433c0c2242:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
  Auto merged
configure.in:
  Auto merged
BitKeeper/deleted/.del-mrg_create.c~b747c8ec2b801f6:
  Auto merged
include/my_global.h:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
myisam/mi_create.c:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/table.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
2005-04-06 14:15:45 +02:00
unknown
cde615c9cb InnoDB: Avoid test suite failures caused by a locking conflict
between two server instances at server shutdown/startup.
This conflict on advisory locks appears to be the result of a bug
in the operating system; these locks should be released when the
files are closed, but somehow that does not always happen
immediately in Linux.  (Bug #9381)


innobase/include/os0file.h:
  Add OS_FILE_OPEN_RETRY for os_file_create()ing ibdata1
innobase/os/os0file.c:
  os_file_lock(): Do not close the file on failure, but let the
  callers do that.
  os_file_create(): If create_mode==OS_FILE_OPEN_RETRY and
  os_file_lock() fails, keep retrying for 100 seconds.
innobase/srv/srv0start.c:
  open_or_create_data_files(): Open the first data file with
  OS_FILE_OPEN_RETRY, to resolve a conflict with a shutting-down
  instance of the MySQL server.
2005-04-06 15:09:15 +03:00
unknown
97b26d3b93 row0sel.c, btr0pcur.c, btr0pcur.ic, btr0pcur.h:
Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context


innobase/include/btr0pcur.h:
  Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context
innobase/include/btr0pcur.ic:
  Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context
innobase/btr/btr0pcur.c:
  Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context
innobase/row/row0sel.c:
  Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context
2005-04-06 10:27:40 +03:00
unknown
e2e40c7688 InnoDB: Disable an assertion that fails on old data due to Bug #9526
innobase/row/row0sel.c:
  Disable an assertion that fails for old UTF-8 ENUM columns (Bug #9526)
2005-04-05 15:13:14 +03:00
unknown
fee508a430 dict0dict.c:
Add a note that ENUM in new tables cannot reference ENUM in old tables, in FOREIGN KEY constraints


innobase/dict/dict0dict.c:
  Add a note that ENUM in new tables cannot reference ENUM in old tables, in FOREIGN KEY constraints
2005-04-05 11:35:03 +03:00
unknown
1b93271393 ha_innodb.cc, row0sel.c:
Fix Bug #9526 in 5.0: MySQL ENUM and SET columns are internally actually unsigned integer types; we must take care that old tables still treat ENUM and SET (incorrectly) as a character string, while new created tables treat it correctly as an unsigned integer


innobase/row/row0sel.c:
  Fix Bug #9526 in 5.0: MySQL ENUM and SET columns are internally actually unsigned integer types; we must take care that old tables still treat ENUM and SET (incorrectly) as a character string, while new created tables treat it correctly as an unsigned integer
sql/ha_innodb.cc:
  Fix Bug #9526 in 5.0: MySQL ENUM and SET columns are internally actually unsigned integer types; we must take care that old tables still treat ENUM and SET (incorrectly) as a character string, while new created tables treat it correctly as an unsigned integer
2005-04-04 20:31:04 +03:00
unknown
e31642727b Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


innobase/include/trx0trx.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2005-03-22 16:11:43 +01:00
unknown
87110734d3 Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
include/config-netware.h:
  Auto merged
innobase/include/trx0trx.h:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
2005-03-21 22:29:02 +02:00
unknown
6d0d2c7e1d trx0trx.c:
If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)


innobase/trx/trx0trx.c:
  If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)
2005-03-21 22:21:55 +02:00
unknown
421907e932 Merge
BitKeeper/etc/logging_ok:
  auto-union
innobase/include/trx0trx.h:
  Auto merged
innobase/trx/trx0trx.c:
  SCCS merged
2005-03-21 22:14:00 +02:00
unknown
7656b6da71 trx0trx.c, trx0trx.h:
If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)


innobase/include/trx0trx.h:
  If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)
innobase/trx/trx0trx.c:
  If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql() (Bug #9277)
2005-03-21 22:10:42 +02:00
unknown
4fd832bf91 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


libmysql/libmysql.c:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-03-18 20:12:31 +01:00
unknown
cfec2e4ada data0type.h:
The missing DATA_BINARY_TYPE in BLOBs created with < 4.0.14 does not cause any harm, because there were no indexes on such BLOBs


innobase/include/data0type.h:
  The missing DATA_BINARY_TYPE in BLOBs created with < 4.0.14 does not cause any harm, because there were no indexes on such BLOBs
2005-03-18 19:16:11 +02:00
unknown
809291fb92 data0type.ic:
Change the sorting order of TEXT columns in InnoDB: pad with spaces at the end in comparisons; we MUST UPDATE the MySQL MANUAL to warn about the need to rebuild tables (also MyISAM) in certain cases in an upgrade to 5.0.3; TODO: study what complications the missing DATA_BINARY_TYPE flag in InnoDB < 4.0.14 causes: we would compare then also BLOBs with space padding, not just TEXT


innobase/include/data0type.ic:
  Change the sorting order of TEXT columns in InnoDB: pad with spaces at the end in comparisons; we MUST UPDATE the MySQL MANUAL to warn about the need to rebuild tables (also MyISAM) in certain cases in an upgrade to 5.0.3; TODO: study what complications the missing DATA_BINARY_TYPE flag in InnoDB < 4.0.14 causes: we would compare then also BLOBs with space padding, not just TEXT
2005-03-18 19:09:22 +02:00
unknown
83bd17bbf3 data0type.ic:
Revert the change to the space padding of BLOB and TEXT in comparisons; we cannot change the sorting order, because that would make old tables to appear corrupt; better to change LIKE 'a%' processing in MySQL, so that the lower end of the search interval would be 'a', not 'a       '


innobase/include/data0type.ic:
  Revert the change to the space padding of BLOB and TEXT in comparisons; we cannot change the sorting order, because that would make old tables to appear corrupt; better to change LIKE 'a%' processing in MySQL, so that the lower end of the search interval would be 'a', not 'a       '
2005-03-17 18:17:38 +02:00
unknown
31ab90c805 data0type.ic:
Fix that 'a' LIKE 'a%' was not true for an InnoDB BLOB or TEXT type column prefix index search: InnoDB assumed that the BLOB and TEXT should not be padded with space in comparisons; this bug is also in 4.1; it may have worked in 4.1 because MySQL may have asked there for strings >= 'a', while in 5.0 it asks for strings >= 'a        '


innobase/include/data0type.ic:
  Fix that 'a' LIKE 'a%' was not true for an InnoDB BLOB or TEXT type column prefix index search: InnoDB assumed that the BLOB and TEXT should not be padded with space in comparisons; this bug is also in 4.1; it may have worked in 4.1 because MySQL may have asked there for strings >= 'a', while in 5.0 it asks for strings >= 'a        '
2005-03-17 17:44:27 +02:00
unknown
2b466294e3 Automerge
sql/sql_parse.cc:
  Auto merged
sql/handler.cc:
  SCCS merged
sql/mysql_priv.h:
  SCCS merged
2005-03-17 10:06:49 +01:00
unknown
1f91905231 merged
sql/ha_innodb.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-03-16 17:13:43 +01:00