3622 Marko Mäkelä 2011-05-09 [merge]
Merge mysql-5.5-innodb to mysql-trunk-innodb.
modified:
storage/innobase/dict/dict0crea.c
storage/innobase/include/page0page.h
storage/innobase/include/page0page.ic
storage/innobase/page/page0page.c
storage/innobase/row/row0mysql.c
3621 Vasil Dimov 2011-05-09 [merge]
Merge mysql-trunk -> mysql-trunk-innodb
added:
mysql-test/collections/mysql-trunk-bug27480.push
mysql-test/include/ipv6_func.inc
mysql-test/include/start_slave_io.inc
mysql-test/include/start_slave_sql.inc
modified:
BUILD/SETUP.sh
client/mysql.cc*
client/mysqlbinlog.cc
client/mysqltest.cc
extra/replace.c
include/mysql.h
include/mysql.h.pp
libmysql/libmysql.c
mysql-test/collections/default.experimental
mysql-test/include/handler.inc
mysql-test/include/ipv6.inc
mysql-test/r/alter_table.result
mysql-test/r/events_1.result
mysql-test/r/events_restart.result
mysql-test/r/flush_read_lock.result
mysql-test/r/func_misc.result
mysql-test/r/grant2.result
mysql-test/r/grant4.result
mysql-test/r/handler_innodb.result
mysql-test/r/handler_myisam.result
mysql-test/r/ipv4_as_ipv6.result
mysql-test/r/ipv6.result
mysql-test/r/merge.result
mysql-test/r/mysqlbinlog_base64.result
mysql-test/r/mysqldump.result
mysql-test/r/ps_ddl.result
mysql-test/r/temp_table.result
mysql-test/r/type_newdecimal.result
mysql-test/suite/funcs_1/r/is_columns_mysql.result
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
mysql-test/suite/innodb/r/innodb_mysql.result
mysql-test/suite/innodb/t/innodb_mysql.test
mysql-test/suite/rpl/r/rpl_crash_safe_master.result
mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
mysql-test/suite/rpl/r/rpl_row_crash_safe.result
mysql-test/suite/rpl/r/rpl_server_id2.result
mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result
mysql-test/suite/rpl/t/rpl_crash_safe_master.test
mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
mysql-test/suite/rpl/t/rpl_row_until.test
mysql-test/suite/rpl/t/rpl_server_id2.test
mysql-test/t/alter_table.test
mysql-test/t/events_1.test
mysql-test/t/events_restart.test
mysql-test/t/flush_read_lock.test
mysql-test/t/func_misc.test
mysql-test/t/grant2.test
mysql-test/t/grant4.test
mysql-test/t/handler_myisam.test
mysql-test/t/ipv4_as_ipv6.test
mysql-test/t/ipv6.test
mysql-test/t/merge.test
mysql-test/t/mysqlbinlog_base64.test
mysql-test/t/mysqlbinlog_raw_mode.test
mysql-test/t/mysqldump.test
mysql-test/t/ps_ddl.test
mysql-test/t/temp_table.test
mysql-test/t/type_newdecimal.test
scripts/make_win_bin_dist
scripts/mysql_system_tables.sql
sql/event_db_repository.cc
sql/field.cc
sql/handler.h
sql/item.cc
sql/item_cmpfunc.cc
sql/item_create.cc
sql/item_func.cc
sql/item_inetfunc.cc
sql/item_inetfunc.h
sql/item_row.cc
sql/item_strfunc.cc
sql/log_event.cc
sql/my_decimal.cc
sql/my_decimal.h
sql/opt_range.cc
sql/protocol.cc
sql/rpl_slave.cc
sql/sp_head.cc
sql/sql_acl.cc
sql/sql_acl.h
sql/sql_admin.cc
sql/sql_alter.cc
sql/sql_analyse.cc
sql/sql_base.cc
sql/sql_base.h
sql/sql_class.h
sql/sql_db.cc
sql/sql_handler.cc
sql/sql_handler.h
sql/sql_insert.cc
sql/sql_lex.h
sql/sql_parse.cc
sql/sql_parse.h
sql/sql_partition.cc
sql/sql_partition_admin.cc
sql/sql_prepare.cc
sql/sql_rename.cc
sql/sql_select.cc
sql/sql_select.h
sql/sql_show.cc
sql/sql_table.cc
sql/sql_truncate.cc
sql/sql_view.cc
sql/sql_yacc.yy
sql/table.cc
sql/table.h
storage/archive/ha_archive.cc
storage/myisammrg/ha_myisammrg.cc
storage/ndb/src/kernel/blocks/lgman.cpp
strings/decimal.c
vio/viosocket.c
=== modified file 'storage/innobase/dict/dict0crea.c'
--- a/storage/innobase/dict/dict0crea.c revid:vasil.dimov@stripped5zc3qq4n550
+++ b/storage/innobase/dict/dict0crea.c revid:marko.makela@stripped
@@ -677,9 +677,9 @@ dict_create_index_tree_step(
/* printf("Created a new index tree in space %lu root page %lu\n",
index->space, index->page_no); */
- page_rec_write_index_page_no(btr_pcur_get_rec(&pcur),
- DICT_SYS_INDEXES_PAGE_NO_FIELD,
- node->page_no, &mtr);
+ page_rec_write_field(btr_pcur_get_rec(&pcur),
+ DICT_SYS_INDEXES_PAGE_NO_FIELD,
+ node->page_no, &mtr);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -749,9 +749,8 @@ dict_drop_index_tree(
root_page_no); */
btr_free_root(space, zip_size, root_page_no, mtr);
- page_rec_write_index_page_no(rec,
- DICT_SYS_INDEXES_PAGE_NO_FIELD,
- FIL_NULL, mtr);
+ page_rec_write_field(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD,
+ FIL_NULL, mtr);
}
/*******************************************************************//**
@@ -854,8 +853,8 @@ create:
in SYS_INDEXES, so that the database will not get into an
inconsistent state in case it crashes between the mtr_commit()
below and the following mtr_commit() call. */
- page_rec_write_index_page_no(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD,
- FIL_NULL, mtr);
+ page_rec_write_field(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD,
+ FIL_NULL, mtr);
/* We will need to commit the mini-transaction in order to avoid
deadlocks in the btr_create() call, because otherwise we would
=== modified file 'storage/innobase/include/page0page.h'
--- a/storage/innobase/include/page0page.h revid:vasil.dimov@stripped20110509065434-bflm35zc3qq4n550
+++ b/storage/innobase/include/page0page.h revid:marko.makela@stripped84847-j9qvqnp9eevhdk6p
@@ -619,17 +619,16 @@ page_rec_find_owner_rec(
/*====================*/
rec_t* rec); /*!< in: the physical record */
/***********************************************************************//**
-This is a low-level operation which is used in a database index creation
-to update the page number of a created B-tree to a data dictionary
-record. */
-UNIV_INTERN
+Write a 32-bit field in a data dictionary record. */
+UNIV_INLINE
void
-page_rec_write_index_page_no(
-/*=========================*/
- rec_t* rec, /*!< in: record to update */
+page_rec_write_field(
+/*=================*/
+ rec_t* rec, /*!< in/out: record to update */
ulint i, /*!< in: index of the field to update */
ulint page_no,/*!< in: value to write */
- mtr_t* mtr); /*!< in: mtr */
+ mtr_t* mtr) /*!< in/out: mini-transaction */
+ __attribute__((nonnull));
/************************************************************//**
Returns the maximum combined size of records which can be inserted on top
of record heap.
=== modified file 'storage/innobase/include/page0page.ic'
--- a/storage/innobase/include/page0page.ic revid:vasil.dimov@oracle.com-20110509065434-bflm35zc3qq4n550
+++ b/storage/innobase/include/page0page.ic revid:marko.makela@strippedom-20110509084847-j9qvqnp9eevhdk6p
@@ -959,6 +959,27 @@ page_get_free_space_of_empty(
- 2 * PAGE_DIR_SLOT_SIZE));
}
+/***********************************************************************//**
+Write a 32-bit field in a data dictionary record. */
+UNIV_INLINE
+void
+page_rec_write_field(
+/*=================*/
+ rec_t* rec, /*!< in/out: record to update */
+ ulint i, /*!< in: index of the field to update */
+ ulint val, /*!< in: value to write */
+ mtr_t* mtr) /*!< in/out: mini-transaction */
+{
+ byte* data;
+ ulint len;
+
+ data = rec_get_nth_field_old(rec, i, &len);
+
+ ut_ad(len == 4);
+
+ mlog_write_ulint(data, val, MLOG_4BYTES, mtr);
+}
+
/************************************************************//**
Each user record on a page, and also the deleted user records in the heap
takes its size plus the fraction of the dir cell size /
=== modified file 'storage/innobase/page/page0page.c'
--- a/storage/innobase/page/page0page.c revid:vasil.dimov@stripped
+++ b/storage/innobase/page/page0page.c revid:marko.makela@oracle.com-20110509084847-j9qvqnp9eevhdk6p
@@ -1253,28 +1253,6 @@ page_move_rec_list_start(
return(TRUE);
}
-
-/***********************************************************************//**
-This is a low-level operation which is used in a database index creation
-to update the page number of a created B-tree to a data dictionary record. */
-UNIV_INTERN
-void
-page_rec_write_index_page_no(
-/*=========================*/
- rec_t* rec, /*!< in: record to update */
- ulint i, /*!< in: index of the field to update */
- ulint page_no,/*!< in: value to write */
- mtr_t* mtr) /*!< in: mtr */
-{
- byte* data;
- ulint len;
-
- data = rec_get_nth_field_old(rec, i, &len);
-
- ut_ad(len == 4);
-
- mlog_write_ulint(data, page_no, MLOG_4BYTES, mtr);
-}
#endif /* !UNIV_HOTBACKUP */
/**************************************************************//**
=== modified file 'storage/innobase/row/row0mysql.c'
--- a/storage/innobase/row/row0mysql.c revid:vasil.dimov@oracle.com-20110509065434-bflm35zc3qq4n550
+++ b/storage/innobase/row/row0mysql.c revid:marko.makela@stripped84847-j9qvqnp9eevhdk6p
@@ -2966,7 +2966,7 @@ row_truncate_table_for_mysql(
rec = btr_pcur_get_rec(&pcur);
if (root_page_no != FIL_NULL) {
- page_rec_write_index_page_no(
+ page_rec_write_field(
rec, DICT_SYS_INDEXES_PAGE_NO_FIELD,
root_page_no, &mtr);
/* We will need to commit and restart the
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110509084847-j9qvqnp9eevhdk6p.bundle
| Thread |
|---|
| • bzr push into mysql-trunk-innodb branch (marko.makela:3621 to 3622) | marko.makela | 9 May |