Commit graph

1645 commits

Author SHA1 Message Date
marko
b04cffec7d branches/zip: Add missing function comments. 2009-05-20 04:42:12 +00:00
marko
62718d0e0c branches/zip: ib_wqueue_wait(): Add decorative comment. 2009-05-19 19:13:12 +00:00
marko
9649c3e3b3 branches/zip: Write PAGE_MAX_TRX_ID to the redo log. Otherwise,
transactions that are started before the rollback of incomplete
transactions has finished may have an inconsistent view of the
secondary indexes.

dict_index_is_sec_or_ibuf(): Auxiliary function for controlling
updates and checks of PAGE_MAX_TRX_ID: check whether an index is a
secondary index or the insert buffer tree.

page_set_max_trx_id(), page_update_max_trx_id(),
lock_rec_insert_check_and_lock(),
lock_sec_rec_modify_check_and_lock(), btr_cur_ins_lock_and_undo(),
btr_cur_upd_lock_and_undo(): Add the parameter mtr.

page_set_max_trx_id(): Allow mtr to be NULL.  When mtr==NULL, do not
attempt to write to the redo log.  This only occurs when creating a
page or reorganizing a compressed page.  In these cases, the
PAGE_MAX_TRX_ID will be set correctly during the application of redo
log records, even though there is no explicit log record about it.

btr_discard_only_page_on_level(): Preserve PAGE_MAX_TRX_ID.  This
function should be unreachable, though.

btr_cur_pessimistic_update(): Update PAGE_MAX_TRX_ID.

Add some assertions for checking that PAGE_MAX_TRX_ID is set on all
secondary index leaf pages.

rb://115 tested by Michael, fixes Issue #211
2009-05-19 18:59:07 +00:00
marko
5c5817cccb branches/zip: Fix a typo that was introduced in r5036. 2009-05-19 09:08:16 +00:00
marko
c0d9e7b96a branches/zip: Add proper comments to some file page accessors. 2009-05-19 09:05:50 +00:00
marko
70f15d3fd9 branches/zip: ut0auxconf_have_solaris_atomics.c: Get the
function declarations from <atomic.h>.
Call the functions with proper arguments.
2009-05-19 09:04:58 +00:00
marko
1c0cf56c45 branches/zip: row_update_prebuilt_trx(): Correct bogus comment. 2009-05-19 08:41:32 +00:00
marko
79362a389d branches/zip: Remove bogus out: comments of functions returning void. 2009-05-19 07:00:51 +00:00
marko
db9dc3bb20 branches/zip: Add missing out: comments to nullary functions. 2009-05-19 06:30:02 +00:00
marko
a7942035c2 branches/zip: os_thread_get_curr_id(), os_thread_get_curr():
Add missing out: comments.
2009-05-19 06:04:04 +00:00
marko
a15f8bec88 branches/zip: When executing an optimistic update by delete-and-insert,
correctly estimate the free space on the compressed page by
page_zip_available(..., create=TRUE). This was reported as Issue #231.

btr_cur_update_alloc_zip(): Add the parameter ibool create and pass it
to page_zip_available(). The parameter was previously passed as 0.

btr_cur_optimistic_update(): Pass create=TRUE to btr_cur_update_alloc_zip().

rb://120 approved by Heikki Tuuri
2009-05-18 12:40:07 +00:00
marko
b10bc48d35 branches/zip: Add some missing out: comments to buf0buf.h, buf0buf.c. 2009-05-18 12:36:10 +00:00
marko
a512de6783 branches/zip: buf_validate(): Add missing out: comment. 2009-05-18 12:29:51 +00:00
vasil
5c2c89e38a branches/zip:
Add ChangeLog entry for r4994.
2009-05-14 16:13:41 +00:00
marko
bc48ebd870 branches/zip: Merge revisions 4976:4994 from branches/5.1:
------------------------------------------------------------------------
  r4994 | marko | 2009-05-14 15:04:55 +0300 (Thu, 14 May 2009) | 18 lines

  branches/5.1: Prevent a race condition in innobase_commit() by ensuring
  that innodb_commit_concurrency>0 remains constant at run time. (Bug #42101)

  srv_commit_concurrency: Make this a static variable in ha_innodb.cc.

  innobase_commit_concurrency_validate(): Check that innodb_commit_concurrency
  is not changed from or to 0 at run time.  This is needed, because
  innobase_commit() assumes that innodb_commit_concurrency>0 remains constant.
  Without this limitation, the checks for innodb_commit_concurrency>0
  in innobase_commit() should be removed and that function would have to
  acquire and release commit_cond_m at least twice per invocation.
  Normally, innodb_commit_concurrency=0, and introducing the mutex operations
  would mean significant overhead.

  innodb_bug42101.test, innodb_bug42101-nonzero.test: Test cases.

  rb://123 approved by Heikki Tuuri
  ------------------------------------------------------------------------
2009-05-14 11:31:43 +00:00
vasil
f42bc56e41 branches/zip:
Add ChangeLog entry for r4977.
2009-05-13 12:21:55 +00:00
marko
6ec131d6f7 branches/zip: Merge revisions 4746:4976 from branches/5.1:
------------------------------------------------------------------------
  r4976 | marko | 2009-05-13 15:44:54 +0300 (Wed, 13 May 2009) | 6 lines

  branches/5.1: Display DB_ROLL_PTR in the COLUMNS section of the
  innodb_table_monitor output.  It was accidentally omitted due to an
  off-by-one loop condition.  (Bug #44320)

  rb://116 approved by Heikki Tuuri
  ------------------------------------------------------------------------
2009-05-13 11:49:38 +00:00
marko
bd237c4b63 branches/zip: Distinguish temporary tables in MLOG_FILE_CREATE.
This addresses Mantis Issue #23 in InnoDB Hot Backup and some
of MySQL Bug #41609.

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.

rb://117 approved by Heikki Tuuri
2009-04-29 19:23:27 +00:00
marko
04dd96aea9 branches/zip: btr_cur_optimistic_insert(): Remove a redundant condition.
The insert buffer tree is a clustered index.
2009-04-29 07:51:25 +00:00
marko
efcbc63a2f branches/zip: row_scan_and_check_index(): Add some comments on
prebuilt->index_usable, as suggested by Michael.
2009-04-27 09:40:20 +00:00
marko
ab7803b005 branches/zip: Correct a misleading comment. PAGE_MAX_TRX_ID
will be updated in ibuf_insert_low() and updated from the
insert buffer tree page to the secondary index tree page
during the insert buffer merge.
2009-04-23 11:15:07 +00:00
marko
82910214a6 branches/zip: row_scan_and_check_index(): Check
row_merge_is_index_usable() earlier, to make the logic clearer.
2009-04-23 06:40:34 +00:00
marko
db0e3d7bbb branches/zip: row_scan_and_check_index(): Improve the diagnostics, by reporting
errors from row_search_for_mysql() in the error log.
The errors will still be ignored by CHECK TABLE.
This is somewhat related to Issue #211.
2009-04-23 06:37:40 +00:00
marko
e81b47e985 branches/zip: ChangeLog: Add the missing include/ to two files. 2009-04-23 06:22:06 +00:00
marko
dc33fdaac8 branches/zip: ChangeLog: Document r4893. 2009-04-23 06:21:07 +00:00
marko
e9a3aa18c8 branches/zip: Introduce the logical type names trx_id_t, roll_ptr_t,
and undo_no_t. Each type is still defined as dulint.

This is an initial step towards replacing dulint with a 64-bit data type.
Because modern compilers have no trouble supporting 64-bit arithmetics
even on 32-bit targets, the dulint struct is a relic that should go.

The last remaining major use of dulint is dictionary IDs
(table, index, and row ids).

rb://114 approved by Sunny Bains
2009-04-23 05:32:36 +00:00
marko
4718ddd52b branches/zip: Cosmetic fixes.
row_unlock_for_mysql(): Add a const qualifier to read-only rec_t*.
Use dict_index_is_clust().

CMakeLists.txt: svn propset svn:eol-style native.
2009-04-20 12:11:38 +00:00
vasil
e6081cf140 branches/zip:
Add aux config programs to emulate the newly added checks in plug.in
(from r4678).
2009-04-17 22:40:47 +00:00
vasil
25aea25a45 branches/zip:
Add comment and copyright notice to the aux config program.
2009-04-17 22:22:33 +00:00
vasil
5550172262 branches/zip:
Rename the aux config program and give it a more specific name because
more are coming.
2009-04-17 22:19:03 +00:00
vasil
3b5ac76b19 branches/zip:
Silence a compiler warning.
2009-04-17 21:31:34 +00:00
vasil
dd554ccf72 branches/zip:
Include the needed header for memset().
2009-04-17 21:30:37 +00:00
vasil
1cf2c95850 branches/zip:
Silence warning about unused variables.
2009-04-17 21:29:16 +00:00
vasil
177ccaca71 branches/zip:
Add ChangeLog entry for t4748.
2009-04-17 20:58:08 +00:00
vasil
06e8e00ed9 branches/zip: Merge revisions 4710:4746 from branches/5.1:
------------------------------------------------------------------------
  r4746 | vasil | 2009-04-18 00:32:08 +0300 (Sat, 18 Apr 2009) | 110 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/include/pars0pars.h
  
  branches/5.1:
  
  Merge a change from MySQL:
  
    ------------------------------------------------------------
    revno: 2728.10.2
    committer: Ignacio Galarza <iggy@mysql.com>
    branch nick: mysql-5.1-bugteam-bug29125
    timestamp: Fri 2009-02-13 11:41:47 -0500
    message:
      Bug#29125 Windows Server X64: so many compiler warnings
      - Remove bothersome warning messages.  This change focuses on the warnings 
      that are covered by the ignore file: support-files/compiler_warnings.supp.
      - Strings are guaranteed to be max uint in length
    modified:
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlslap.c
      client/mysqltest.cc
      client/sql_string.cc
      extra/comp_err.c
      extra/yassl/src/buffer.cpp
      extra/yassl/taocrypt/include/block.hpp
      extra/yassl/taocrypt/src/algebra.cpp
      extra/yassl/taocrypt/src/asn.cpp
      include/config-win.h
      libmysql/libmysql.c
      mysys/array.c
      mysys/base64.c
      mysys/charset.c
      mysys/checksum.c
      mysys/default.c
      mysys/default_modify.c
      mysys/hash.c
      mysys/mf_keycache.c
      mysys/mf_tempdir.c
      mysys/my_append.c
      mysys/my_compress.c
      mysys/my_conio.c
      mysys/my_copy.c
      mysys/my_getwd.c
      mysys/my_pread.c
      mysys/my_quick.c
      mysys/my_read.c
      mysys/safemalloc.c
      mysys/string.c
      server-tools/instance-manager/buffer.cc
      server-tools/instance-manager/instance.cc
      server-tools/instance-manager/options.cc
      server-tools/instance-manager/parse.h
      sql-common/client.c
      sql-common/my_user.c
      sql/event_data_objects.cc
      sql/event_parse_data.cc
      sql/events.cc
      sql/gen_lex_hash.cc
      sql/item.h
      sql/item_func.cc
      sql/item_strfunc.cc
      sql/item_timefunc.cc
      sql/lock.cc
      sql/log_event.cc
      sql/log_event.h
      sql/log_event_old.cc
      sql/net_serv.cc
      sql/sp_head.h
      sql/spatial.h
      sql/sql_class.h
      sql/sql_connect.cc
      sql/sql_crypt.cc
      sql/sql_error.cc
      sql/sql_insert.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_load.cc
      sql/sql_prepare.cc
      sql/sql_profile.cc
      sql/sql_repl.cc
      sql/sql_servers.cc
      sql/sql_string.cc
      sql/sql_table.cc
      sql/sql_trigger.cc
      sql/sql_udf.cc
      sql/sql_view.cc
      sql/udf_example.c
      sql/uniques.cc
      storage/archive/azio.c
      storage/archive/azlib.h
      storage/csv/ha_tina.cc
      storage/csv/ha_tina.h
      storage/csv/transparent_file.h
      storage/federated/ha_federated.cc
      storage/federated/ha_federated.h
      storage/heap/hp_write.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/pars0pars.h
      storage/myisam/ha_myisam.cc
      storage/myisam/mi_check.c
      storage/myisam/mi_packrec.c
      storage/myisam/mi_search.c
      storage/myisam/rt_index.c
      storage/myisammrg/ha_myisammrg.cc
      strings/ctype.c
      strings/my_vsnprintf.c
      tests/bug25714.c
      tests/mysql_client_test.c
2009-04-17 20:50:09 +00:00
calvin
b9c56a17cd branches/zip: minor changes to CMakeLists.txt
All are non-functional changes:
- should check for long (not int), spotted by Sunny
- comment out the project definition, avoiding to generate another
  .sln file.
2009-04-17 04:13:20 +00:00
marko
a0714b182c branches/zip: univ.i: Define REFMAN as the base URL of the
MySQL Reference Manual and use it in every string.
This fixes Issue #221.
2009-04-16 12:02:27 +00:00
marko
d04b7669d6 branches/zip: row_scan_and_check_index(): Initialize prebuilt->index_usable.
This should have been done in r4631.  Spotted by Michael.
2009-04-16 06:32:09 +00:00
vasil
864178aa13 branches/zip:
Add ChangeLog entry for r4717.
2009-04-16 05:44:48 +00:00
calvin
6fd7b63c8e branches/zip: Use the Windows Interlocked functions for atomic memory
access

Mapping the atomic operations to Windows Interlocked functions:

os_compare_and_swap_* to InterlockedCompareExchange(64)
os_atomic_increment_* to InterlockedExchangeAdd(64)
os_atomic_test_and_set_byte to InterlockedExchange

In this patch, the legacy code under UNIV_CAN_USE_X86_ASSEMBLER is
removed all together, and add HAVE_WINDOWS_ATOMICS and
INNODB_RW_LOCKS_USE_ATOMICS to CMakeLists.txt

This is to address mantis issue#194.

rb://113

Approved by: Marko
2009-04-15 21:22:35 +00:00
vasil
124945b446 branches/zip:
Add ChangeLog entry for r4543.
2009-04-15 17:36:06 +00:00
vasil
f946e6f422 branches/zip:
Whitespace cleanup in ChangeLog
2009-04-15 08:39:04 +00:00
vasil
9c37ed7c03 branches/zip:
Fix typo in the ChangeLog
2009-04-15 08:36:57 +00:00
vasil
74baa550a6 branches/zip:
Add missing ChangeLog entries
2009-04-15 08:36:16 +00:00
vasil
4f3c09517d branches/zip: Merge revisions 4481:4710 from branches/5.1:
(resolving conflict in r4574, r4575 and skipping r4699 and r4705 because
analogous changes to r4699 and r4705 were already made to branches/zip)

  ------------------------------------------------------------------------
  r4573 | vasil | 2009-03-30 14:17:13 +0300 (Mon, 30 Mar 2009) | 4 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Fix email address from dev@innodb.com to innodb_dev_ww@oracle.com
  
  ------------------------------------------------------------------------
  r4574 | vasil | 2009-03-30 14:27:08 +0300 (Mon, 30 Mar 2009) | 38 lines
  Changed paths:
     M /branches/5.1/Makefile.am
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Restore the state of INNODB_THREAD_CONCURRENCY to silence this warning:
  
    TEST                                      RESULT   TIME (ms)
    ------------------------------------------------------------
    
    worker[1] Using MTR_BUILD_THREAD 250, with reserved ports 12500..12509
    main.innodb                              [ pass ]   8803
    
    MTR's internal check of the test case 'main.innodb' failed.
    This means that the test case does not preserve the state that existed
    before the test case was executed.  Most likely the test case did not
    do a proper clean-up.
    This is the diff of the states of the servers before and after the
    test case was executed:
    mysqltest: Logging to '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.log'.
    mysqltest: Results saved in '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result'.
    mysqltest: Connecting to server localhost:12500 (socket /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
    mysqltest: ... Connected.
    mysqltest: Start processing test commands from './include/check-testcase.test' ...
    mysqltest: ... Done processing test commands.
    --- /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result	2009-03-30 14:12:31.000000000 +0300
    +++ /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.reject	2009-03-30 14:12:41.000000000 +0300
    @@ -99,7 +99,7 @@
     INNODB_SUPPORT_XA	ON
     INNODB_SYNC_SPIN_LOOPS	20
     INNODB_TABLE_LOCKS	ON
    -INNODB_THREAD_CONCURRENCY	8
    +INNODB_THREAD_CONCURRENCY	16
     INNODB_THREAD_SLEEP_DELAY	10000
     INSERT_ID	0
     INTERACTIVE_TIMEOUT	28800
    
    mysqltest: Result content mismatch
    
    not ok
  
  ------------------------------------------------------------------------
  r4575 | vasil | 2009-03-30 15:55:31 +0300 (Mon, 30 Mar 2009) | 8 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.result
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Fix Bug#43309 Test main.innodb can't be run twice
  
  Make the innodb mysql-test more flexible by inspecting how much a
  variable of interest has changed since the start of the test. Do not
  assume the variables have zero values at the start of the test.
  
  ------------------------------------------------------------------------
  r4576 | vasil | 2009-03-30 16:25:10 +0300 (Mon, 30 Mar 2009) | 4 lines
  Changed paths:
     M /branches/5.1/Makefile.am
  
  branches/5.1:
  
  Revert a change to Makefile.am that I committed accidentally in c4574.
  
  ------------------------------------------------------------------------
  r4659 | vasil | 2009-04-06 15:34:51 +0300 (Mon, 06 Apr 2009) | 6 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Followup to r4575 and the fix of Bug#43309 Test main.innodb can't be run twice:
  
  Add an explanatory comment, as suggested by Patrick Crews in the bug report.
  
  ------------------------------------------------------------------------
  r4699 | vasil | 2009-04-09 14:01:52 +0300 (Thu, 09 Apr 2009) | 15 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/include/srv0srv.h
     M /branches/5.1/page/page0cur.c
     M /branches/5.1/srv/srv0srv.c
  
  branches/5.1:
  
  Fix Bug#43660 SHOW INDEXES/ANALYZE does NOT update cardinality for indexes
  of InnoDB table
  
  by replacing the PRNG that is used to pick random pages with a better
  one.
  
  This is based on r4670 but also adds a new configuration option and
  enables the fix only if this option is changed. Please skip the present
  revision when merging.
  
  Approved by:	Heikki (via email)
  
  
  ------------------------------------------------------------------------
  r4705 | vasil | 2009-04-14 14:30:13 +0300 (Tue, 14 Apr 2009) | 5 lines
  Changed paths:
     M /branches/5.1/page/page0cur.c
  
  branches/5.1:
  
  When using the random function, first take the modulus by the number of pages
  and then typecast to ulint.
  
  ------------------------------------------------------------------------
  r4710 | vasil | 2009-04-15 11:55:18 +0300 (Wed, 15 Apr 2009) | 25 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
  
  branches/5.1:
  
  Merge a change from MySQL (looks like this is against 5.0 but they later
  merged it to 5.1):
  
    ------------------------------------------------------------
    revno: 1810.3846.1
    committer: Alexey Botchkov <holyfoot@mysql.com>
    branch nick: 31435
    timestamp: Tue 2008-11-11 14:42:32 +0400
    message:
      Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse 
          I think we don't need to issue an error statement in the convert_search_mode_to_innobase().
          Returning the PAGE_CUR_UNSUPP value is enough as allows to handle this
          case depending on the requirements.
      
      per-file comments:
        sql/ha_innodb.cc 
      Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse 
           no error issued in convert_search_mode_to_innobase.
           ha_innobase::records_in_range() returns HA_POS_ERROR if search mode isn't supported.
    modified:
      sql/ha_innodb.cc
  
  
  ------------------------------------------------------------------------
2009-04-15 08:26:32 +00:00
calvin
319f148e9c branches/zip: remove statically linked libraries from mysql
To make zlib and strings dynamically linked; mysqld will export
additional functions required by InnoDB.

Since the symbols will be resolved dynamically during runtime,
wdl_load_mapfile() is no longer able to make any function calls
to ones in mysqld. As the result, strtoull() (from strings.lib)
is replaced with _strtoui64().

rb://111

Approved by: Marko
2009-04-14 13:47:31 +00:00
vasil
395bee3fce branches/zip:
When using the random function, first take the modulus by the number of pages
and then typecast to ulint.
2009-04-14 10:32:11 +00:00
calvin
350f609b6b branches/zip: new CMakeLists.txt
CMakeLists.txt is completely rewritten with enhancements:
- Print out useful information, such as
  system name, directory, generator used,
  win64, Microsoft compiler, etc.
- Remove one workaround for mysqld.lib location.
  User does not need to specify a build type
  when invoking MSVC generator.
2009-04-13 14:20:45 +00:00
calvin
8578e44df7 branches/zip: delete the original CMakeLists.txt
A new version will be committed, suggested by Ken.
2009-04-13 14:16:44 +00:00
calvin
ef6633bbf1 branches/zip: Rewrite CMakeLists.txt
CMakeLists.txt is completely rewritten:
- To replace the one written by mysql
- Print out some useful information, such as
  system name, directory, generator used,
  win64, Microsoft compiler, etc.
- Remove one workaround for mysqld.lib location.
  User does not need to specify a build type
2009-04-10 20:37:10 +00:00