Commit graph

22072 commits

Author SHA1 Message Date
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
87c4f37a50 ha_innodb.cc:
trx_is_interrupted(): Remove debug output.


sql/ha_innodb.cc:
  trx_is_interrupted(): Remove debug output.
2005-04-21 15:16:16 +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
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
44bab0ead1 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-04-18 11:27:02 +02:00
unknown
ede0adac42 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0
2005-04-18 10:19:49 +02:00
unknown
e371d05b63 Merge mysql.com:/M50/mysql-5.0 into mysql.com:/M50/clone-5.0.4-build
scripts/make_binary_distribution.sh:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
2005-04-18 10:07:51 +02:00
unknown
fab23b39de Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-look-range
2005-04-17 21:00:44 +04:00
unknown
982a12eea0 Merge fix for BUG#9439 from 4.1
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
2005-04-17 20:54:31 +04:00
unknown
4c66b82868 Merge mysql.com:/space/my/mysql-4.1-build
into mysql.com:/space/my/mysql-5.0-build
2005-04-17 13:04:29 +02:00
unknown
1780ad4940 Merge mysql.com:/space/my/mysql-4.0-build
into mysql.com:/space/my/mysql-4.1-build


support-files/MacOSX/Makefile.am:
  Auto merged
2005-04-17 12:48:33 +02:00
unknown
ff3d799a05 - removed ReadMe.txt from CLEANFILES, as it's cleaned by Docs/Makefile.am
already (and that's the Makefile that acutally creates it)
2005-04-17 12:44:59 +02:00
unknown
be9b52bd69 Post-merge fixes
sql/opt_range.cc:
  Auto merged
2005-04-17 02:10:43 +04:00
unknown
3c112262b5 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-look-range
2005-04-17 02:06:17 +04:00
unknown
6b00231421 Fix for BUG#9348: when computing union of two intervals set lower bound to
minimum of lower bounds of two joined intervals.


mysql-test/r/range.result:
  Testcase for BUG#9348
mysql-test/t/range.test:
  Testcase for BUG#9348
2005-04-17 02:05:09 +04:00
unknown
b8f4f27e00 mysql.server script fixed to use mysqld_safe by default + lots of minor additions
scripts/make_binary_distribution.sh:
  add libexec expansion handling to make_binary_distribution
support-files/mysql.server.sh:
  mysql.server init.d script fixed back to use mysqld_safe by default, as mysqlmanager does not handle all
  installation scenarious yet. + libexecdir template was added for mysqlmanager to deal nicely  with the
  source distribution
2005-04-16 23:57:15 +04:00
unknown
9e5325ab5c Fix for BUG#9439:
Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
(this is the final cset with proper tests)


mysql-test/r/show_check.result:
  Testcase for BUG#9439
mysql-test/t/show_check.test:
  Testcase for BUG#9439
sql/sql_show.cc:
  Fix for BUG#9439:
  Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
2005-04-16 23:35:39 +04:00
unknown
1eb8066155 Merge mysql.com:/home/mydev/mysql-4.1-bug9188
into mysql.com:/home/mydev/mysql-5.0-bug9188


myisam/myisampack.c:
  Auto merged
2005-04-16 21:01:46 +02:00
unknown
ec280d6ffb Merge mysql.com:/home/mydev/mysql-4.1-bug9487
into mysql.com:/home/mydev/mysql-4.1-bug9188
2005-04-16 20:56:21 +02:00
unknown
f3feba87a2 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-bug9487
2005-04-16 18:56:46 +02:00
unknown
cef7e66e98 Merge
myisam/mi_search.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/myisam.result:
  SCCS merged
mysql-test/t/myisam.test:
  SCCS merged
2005-04-16 17:58:11 +02:00
unknown
dacff5a908 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-bug9188
2005-04-16 17:44:04 +02:00
unknown
550fff6b72 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
2005-04-16 11:43:03 +03:00
unknown
ca66271141 Set bindir, datadir & others if --basedir is given. This ensures that one only has to set basedir in [mysqld] group when moving a binary installation to a not default polace
Use for now safe_mysqld by default. (unless use-manager is set in the [mysql.server] option in my.cnf)
Search first for defaults files in basedir and then in datadir (like mysqld_safe)


support-files/mysql.server.sh:
  Set bindir, datadir & others if --basedir is given. This ensures that one only has to set basedir in [mysqld] group when moving a binary installation to a not default polace
  Use for now safe_mysqld by default. (unless use-manager is set in the [mysql.server] option in my.cnf)
  Search first for defaults files in basedir and then in datadir (like mysqld_safe)
  I removed the test for localstatedir as default.c doesn't anymore read defaults files from localstatedir
2005-04-16 11:40:41 +03:00
unknown
4528fd1527 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-04-16 10:14:43 +02:00
unknown
48faa137af Added more rows to test to get predictable results
mysql-test/t/range.test:
  Added more rows to test to get predictable results
  (if it still fails, we need to add even more rows)
scripts/make_binary_distribution.sh:
  Apply Jims patch for  mysql.server
support-files/mysql.server.sh:
  Apply Jims patch to support mysqld_safe
2005-04-16 10:53:30 +03:00
unknown
e77860b7be Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-04-15 22:35:29 -07:00
unknown
d85fdc1b84 subselect.result, subselect.test:
Added a test case for bug #9516.
item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.


sql/item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.
mysql-test/t/subselect.test:
  Added a test case for bug #9516.
mysql-test/r/subselect.result:
  Added a test case for bug #9516.
2005-04-15 22:08:34 -07:00
unknown
2b92a78eb8 subselect.result, subselect.test:
Added a test case for bug #9338.
sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
item.cc:
  Fixed bug #9338.
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field. The new method
  is used to replace the occurences of Item_field objects.
item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.


sql/item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.
sql/item.cc:
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field The new method
  is used to replace the occurences of Item_field objects.
sql/sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
mysql-test/t/subselect.test:
  Added a test case for bug #9338.
mysql-test/r/subselect.result:
  Added a test case for bug #9338.
2005-04-15 20:43:45 -07:00
unknown
2be63528bc Merge with 4.1
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/set_var.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
sql/handler.cc:
  Merge
sql/handler.h:
  Merge
sql/mysqld.cc:
  Merge
2005-04-16 04:35:54 +03:00
unknown
9b224e9180 Ensure that all privilege tables are created in MyISAM 2005-04-16 04:12:30 +03:00
unknown
0327d05c69 Fixed core dump with long timezone names
Don't abort on bootstrap if a wrong --default-storage-engine is specified


sql/handler.cc:
  Combined code
sql/mysqld.cc:
  Fixed core dump with long timezone names
  Don't abort on bootstrap if a wrong --default-storage-engine is specified
  Don't print strange messages if one sends 'kill' to a mysqld --bootstrap
sql/set_var.cc:
  Indentaion change
2005-04-16 03:40:33 +03:00
unknown
0a1b13c99c Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-04-16 00:34:05 +02:00
unknown
f75a518853 merged
sql/sql_lex.cc:
  ul
2005-04-16 00:10:35 +02:00
unknown
bd4c929ba6 Merge mysql.com:/home/jimw/my/mysql-4.1-9833
into mysql.com:/home/jimw/my/mysql-4.1-clean


sql/mysqld.cc:
  Auto merged
2005-04-15 11:52:58 -07:00
unknown
484943a2af Merge mysql.com:/home/jimw/my/mysql-4.1-9815
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-04-15 11:52:35 -07:00
unknown
315f66c8e2 Merge mysql.com:/home/jimw/my/mysql-4.1-9852
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-04-15 11:51:41 -07:00
unknown
7fe3db99c8 Bug#9487 - myisampack segmentation violation and bus error
Fixed some casts for 64-bit systems.
Fixed a possible buffer overflow.


myisam/myisampack.c:
  Bug#9487 - myisampack segmentation violation and bus error
  Added or changed proper casts for the argument of flush_buffer().
  Added a check for the counterstrike of the trick to have
  file_buffer.end some bytes below the real end of the buffer.
2005-04-15 19:26:38 +02:00
unknown
e2d9929d2c BUG#9922 - INSERT SELECT with UNIONs allows concurrent INSERTs
don't set lex->lock_option=TL_READ in the parser for SELECT
2005-04-15 19:20:15 +02:00
unknown
88538066ba Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into quadita2.mysql.com:/nfstmp1/guilhem/mysql-5.0-4ita
2005-04-15 18:02:22 +02: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
b753fd96b2 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-bug9188
2005-04-15 17:16:42 +02:00
unknown
6b75a704e8 Bug #9839 Column with AUTOINC contains -1 Value on node stop, post review fix 2005-04-15 16:14:08 +02:00
unknown
b112ccb583 Bug #9839 Column with AUTOINC contains -1 Value on node stop 2005-04-15 15:52:07 +02:00
unknown
53c095f083 Fixed BUG#9902: Crash with simple stored function using user defined variables
... actually, it was a query cache problem. (It shouldn't cache such queries)


mysql-test/r/sp.result:
  Added testcase for BUG#9902.
mysql-test/t/sp.test:
  Added testcase for BUG#9902.
sql/sql_yacc.yy:
  Don't cache queries which are calling stored functions.
2005-04-15 11:06:25 +02:00