summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'innobase')
-rw-r--r--innobase/ibuf/ibuf0ibuf.c9
-rw-r--r--innobase/include/log0recv.h2
-rw-r--r--innobase/log/log0recv.c24
-rw-r--r--innobase/row/row0mysql.c2
-rw-r--r--innobase/row/row0purge.c2
-rw-r--r--innobase/row/row0sel.c26
-rw-r--r--innobase/srv/srv0srv.c4
-rw-r--r--innobase/srv/srv0start.c29
8 files changed, 75 insertions, 23 deletions
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
index b4a28d5fcd8..805f08af361 100644
--- a/innobase/ibuf/ibuf0ibuf.c
+++ b/innobase/ibuf/ibuf0ibuf.c
@@ -48,9 +48,12 @@ insert buffer tree, and that is in the system tablespace of InnoDB.
1. The first field is the space id.
2. The second field is a one-byte marker which differentiates records from
the < 4.1.x storage format.
-3. The third field contains the type info, where we have also added 2 bytes to
- store the charset.
-4. The rest of the fields contain the fields of the actual index record.
+3. The third field is the page number.
+4. The fourth field contains the type info, where we have also added 2 bytes to
+ store the charset. In the compressed table format of 5.0.x we must add more
+ information here so that we can build a dummy 'index' struct which 5.0.x
+ can use in the binary search on the index page in the ibuf merge phase.
+5. The rest of the fields contain the fields of the actual index record.
*/
diff --git a/innobase/include/log0recv.h b/innobase/include/log0recv.h
index 5991960e8ae..c972c3ce977 100644
--- a/innobase/include/log0recv.h
+++ b/innobase/include/log0recv.h
@@ -15,6 +15,8 @@ Created 9/20/1997 Heikki Tuuri
#include "hash0hash.h"
#include "log0log.h"
+extern ibool recv_replay_file_ops;
+
/***********************************************************************
Reads the checkpoint info needed in hot backup. */
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index b01474753bd..01679a374b0 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -34,6 +34,11 @@ Created 9/20/1997 Heikki Tuuri
#include "dict0boot.h"
#include "fil0fil.h"
+/* This is set to FALSE if the backup was originally taken with the
+ibbackup --include regexp option: then we do not want to create tables in
+directories which were not included */
+ibool recv_replay_file_ops = TRUE;
+
/* Log records are stored in the hash table in chunks at most of this size;
this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */
#define RECV_DATA_BLOCK_SIZE (MEM_MAX_ALLOC_IN_BUF - sizeof(recv_data_t))
@@ -1974,18 +1979,21 @@ loop:
|| type == MLOG_FILE_RENAME
|| type == MLOG_FILE_DELETE)) {
#ifdef UNIV_HOTBACKUP
- /* In ibbackup --apply-log, replay an .ibd file
- operation, if possible; note that
- fil_path_to_mysql_datadir is set in ibbackup to
- point to the datadir we should use there */
+ if (recv_replay_file_ops) {
+
+ /* In ibbackup --apply-log, replay an .ibd file
+ operation, if possible; note that
+ fil_path_to_mysql_datadir is set in ibbackup to
+ point to the datadir we should use there */
- if (NULL == fil_op_log_parse_or_replay(body, end_ptr,
- type, TRUE, space)) {
- fprintf(stderr,
+ if (NULL == fil_op_log_parse_or_replay(body,
+ end_ptr, type, TRUE, space)) {
+ fprintf(stderr,
"InnoDB: Error: file op log record of type %lu space %lu not complete in\n"
"InnoDB: the replay phase. Path %s\n", (ulint)type, space, (char*)(body + 2));
- ut_a(0);
+ ut_a(0);
+ }
}
#endif
/* In normal mysqld crash recovery we do not try to
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index d5472219d09..cf7a3efcdfc 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1447,7 +1447,7 @@ row_create_table_for_mysql(
fprintf(stderr,
" InnoDB: Error: table %s already exists in InnoDB internal\n"
"InnoDB: data dictionary. Have you deleted the .frm file\n"
- "InnoDB: and not used DROPT ABLE? Have you used DROP DATABASE\n"
+ "InnoDB: and not used DROP TABLE? Have you used DROP DATABASE\n"
"InnoDB: for InnoDB tables in MySQL version <= 3.23.43?\n"
"InnoDB: See the Restrictions section of the InnoDB manual.\n",
table->name);
diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c
index a455722f15a..d5895f20461 100644
--- a/innobase/row/row0purge.c
+++ b/innobase/row/row0purge.c
@@ -534,6 +534,8 @@ row_purge_parse_undo_rec(
node->table = NULL;
+ row_mysql_unfreeze_data_dictionary(trx);
+
return(FALSE);
}
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 2215e3feff8..57de309c090 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -2773,6 +2773,18 @@ row_search_for_mysql(
ut_a(0);
}
+ if (trx->n_mysql_tables_in_use == 0) {
+ char err_buf[1000];
+
+ trx_print(err_buf, trx);
+
+ fprintf(stderr,
+"InnoDB: Error: MySQL is trying to perform a SELECT\n"
+"InnoDB: but it has not locked any tables in ::external_lock()!\n%s\n",
+ err_buf);
+ ut_a(0);
+ }
+
/* printf("Match mode %lu\n search tuple ", match_mode);
dtuple_print(search_tuple);
@@ -2891,8 +2903,6 @@ row_search_for_mysql(
mtr_start(&mtr);
- mtr_start(&mtr);
-
/*-------------------------------------------------------------*/
/* PHASE 2: Try fast adaptive hash index search if possible */
@@ -3072,6 +3082,18 @@ shortcut_fails_too_big_rec:
if (!prebuilt->sql_stat_start) {
/* No need to set an intention lock or assign a read view */
+ if (trx->read_view == NULL
+ && prebuilt->select_lock_type == LOCK_NONE) {
+ char err_buf[1000];
+
+ trx_print(err_buf, trx);
+
+ fprintf(stderr,
+"InnoDB: Error: MySQL is trying to perform a consistent read\n"
+"InnoDB: but the read view is not assigned!\n%s\n", err_buf);
+
+ ut_a(0);
+ }
} else if (prebuilt->select_lock_type == LOCK_NONE) {
/* This is a consistent read */
/* Assign a read view for the query */
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 027d7c8fb6e..d2368c5341f 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -2739,8 +2739,6 @@ loop:
cnt++;
- os_thread_sleep(2000000);
-
/* Try to track a strange bug reported by Harald Fuchs and others,
where the lsn seems to decrease at times */
@@ -2782,6 +2780,8 @@ loop:
fflush(stderr);
fflush(stdout);
+ os_thread_sleep(2000000);
+
if (srv_shutdown_state < SRV_SHUTDOWN_LAST_PHASE) {
goto loop;
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 5fe66f515bc..e6fdc95fad0 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1512,12 +1512,13 @@ NetWare. */
srv_is_being_started = FALSE;
#ifdef UNIV_DEBUG
- /* Wait a while so that creates threads have time to suspend themselves
- before we switch sync debugging on; otherwise a thread may execute
- mutex_enter() before the checks are on, and mutex_exit() after the
- checks are on. */
+ /* Wait a while so that the created threads have time to suspend
+ themselves before we switch sync debugging on; otherwise a thread may
+ execute mutex_enter() before the checks are on, and mutex_exit() after
+ the checks are on, which will cause an assertion failure in sync
+ debug. */
- os_thread_sleep(2000000);
+ os_thread_sleep(3000000);
#endif
sync_order_checks_on = TRUE;
@@ -1603,6 +1604,19 @@ NetWare. */
fflush(stderr);
if (trx_doublewrite_must_reset_space_ids) {
+ /* Actually, we did not change the undo log format between
+ 4.0 and 4.1.1, and we would not need to run purge to
+ completion. Note also that the purge algorithm in 4.1.1
+ can process the the history list again even after a full
+ purge, because our algorithm does not cut the end of the
+ history list in all cases so that it would become empty
+ after a full purge. That mean that we may purge 4.0 type
+ undo log even after this phase.
+
+ The insert buffer record format changed between 4.0 and
+ 4.1.1. It is essential that the insert buffer is emptied
+ here! */
+
fprintf(stderr,
"InnoDB: You are upgrading to an InnoDB version which allows multiple\n"
"InnoDB: tablespaces. Wait that purge and insert buffer merge run to\n"
@@ -1625,8 +1639,9 @@ NetWare. */
fprintf(stderr,
"InnoDB: You have now successfully upgraded to the multiple tablespaces\n"
-"InnoDB: format. You should not downgrade again to an earlier version of\n"
-"InnoDB: InnoDB!\n");
+"InnoDB: format. You should NOT DOWNGRADE again to an earlier version of\n"
+"InnoDB: InnoDB! But if you absolutely need to downgrade, see section 4.6 of\n"
+"InnoDB: http://www.innodb.com/ibman.php for instructions.\n");
}
if (srv_force_recovery == 0) {