Commit b6679b1d authored by marko's avatar marko

branches/innodb+: Merge revisions 3180:3312 from branches/zip:

  ------------------------------------------------------------------------
  r3254 | marko | 2008-11-24 18:01:42 +0200 (Mon, 24 Nov 2008) | 4 lines

  branches/zip: Note that it is legitimate for a secondary index record not
  to be found during purge.  This tries to address Issue #129.  The comments
  were supplied by Heikki.
  ------------------------------------------------------------------------
  r3286 | marko | 2008-11-26 10:00:28 +0200 (Wed, 26 Nov 2008) | 18 lines

  branches/zip: row_merge_drop_temp_indexes(): Replace the WHILE 1 with
  WHILE 1=1 in the SQL procedure, so that the loop will actually be
  entered and temporary indexes be dropped during crash recovery.
  Thanks to Sunny Bains for pointing this out.

  Tested as follows:

  Set a breakpoint in row_merge_rename_indexes.

  CREATE TABLE t(a INT)ENGINE=InnoDB;
  CREATE INDEX a ON t(a);

  -- The breakpoint will be reached.  Kill and restart mysqld.
  SHOW CREATE TABLE t;
  -- This shows the MySQL .frm file, without and index.
  CREATE TABLE innodb_table_monitor(a INT)ENGINE=InnoDB;
  -- This will dump the InnoDB dictionary to the error log, without the index.
  ------------------------------------------------------------------------
  r3302 | vasil | 2008-11-27 23:26:39 +0200 (Thu, 27 Nov 2008) | 12 lines

  branches/zip:

  Fix Mantis issue#130 wdl: does not handle 64-bit address

  - Change the call from strtoul() to strtoull()
  - Change "%16X" to "%16llx" when scanning preferred load address

  rb://58

  Submitted by:   Calvin
  Approved by:    Marko
  ------------------------------------------------------------------------
  r3303 | vasil | 2008-11-27 23:31:18 +0200 (Thu, 27 Nov 2008) | 10 lines

  branches/zip:

  * Remove a change from win-plugin/win-plugin.diff about time_t because
    MySQL has used VS2005 for building 5.1.30.

  * Adjust the line numbers so the patch applies cleanly without fuzz and
    offset messages.

  Submitted by:   Calvin
  ------------------------------------------------------------------------
  r3304 | vasil | 2008-11-27 23:33:48 +0200 (Thu, 27 Nov 2008) | 6 lines

  branches/zip:

  Non-functional change in win-plugin/win-plugin.diff: fix the file name
  before the diff, this is irrelevant but it is nice to be the same as
  the file name on the following line.
  ------------------------------------------------------------------------
  r3312 | marko | 2008-11-28 16:18:43 +0200 (Fri, 28 Nov 2008) | 5 lines

  branches/zip: row_undo_mod_del_mark_or_remove_sec_low(): Complain if
  the secondary index entry cannot be found, and this is not an incomplete
  transaction that is being rolled back in crash recovery.  The source code
  comments were suggested by Heikki.
  ------------------------------------------------------------------------
parent 87c9f0fc
2008-11-26 The InnoDB Team
* row/row0merge.c (row_merge_drop_temp_indexes):
Replace the WHILE 1 with WHILE 1=1 in the SQL procedure, so that
the loop will actually be entered and temporary indexes be dropped
during crash recovery.
2008-10-31 The InnoDB Team
* dict/dict0mem.c, include/dict0mem.h, include/lock0lock.h,
......
......@@ -263,6 +263,11 @@ wdl_load_mapfile(
char* func_addr;
ulint load_addr = 0;
ibool valid_load_addr = FALSE;
#ifdef _WIN64
const char* tmp_string = " Preferred load address is %16llx";
#else
const char* tmp_string = " Preferred load address is %08x";
#endif
fp = fopen(filename, "r");
if (fp == NULL) {
......@@ -285,8 +290,7 @@ wdl_load_mapfile(
/* Search start of symbol list and get the preferred load address */
while (fgets(tmp_buf, sizeof(tmp_buf), fp)) {
if (sscanf(tmp_buf, " Preferred load address is %16X",
&load_addr) == 1) {
if (sscanf(tmp_buf, tmp_string, &load_addr) == 1) {
valid_load_addr = TRUE;
}
......@@ -338,7 +342,7 @@ wdl_load_mapfile(
chain_header = map_cell;
map_cell->symbol = strdup(func_name);
map_cell->value = strtoul(tmp_buf, NULL, 0)
map_cell->value = (ulint) strtoull(tmp_buf, NULL, 0)
- load_addr;
map_fold = ut_fold_string(map_cell->symbol);
......
......@@ -20,7 +20,9 @@ Created 2/25/1997 Heikki Tuuri
/***************************************************************
Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */
marked, at the time of the insert. InnoDB is eager in a rollback:
if it figures out that an index record will be removed in the purge
anyway, it will remove it in the rollback. */
UNIV_INTERN
ulint
row_undo_ins(
......
......@@ -1842,7 +1842,7 @@ row_merge_drop_temp_indexes(void)
"WHERE SUBSTR(NAME,0,1)='\377' FOR UPDATE;\n"
"BEGIN\n"
"\tOPEN c;\n"
"\tWHILE 1 LOOP\n"
"\tWHILE 1=1 LOOP\n"
"\t\tFETCH c INTO indexid;\n"
"\t\tIF (SQL % NOTFOUND) THEN\n"
"\t\t\tEXIT;\n"
......
......@@ -230,7 +230,15 @@ row_purge_remove_sec_if_poss_low_nonbuffered(
switch (search_result) {
case ROW_NOT_FOUND:
/* Not found */
/* Not found. This is a legitimate condition. In a
rollback, InnoDB will remove secondary recs that would
be purged anyway. Then the actual purge will not find
the secondary index record. Also, the purge itself is
eager: if it comes to consider a secondary index
record, and notices it does not need to exist in the
index, it will remove it. Then if/when the purge
comes to consider the secondary index record a second
time, it will not exist any more in the index. */
/* fputs("PURGE:........sec entry not found\n", stderr); */
/* dtuple_print(stderr, entry); */
......
......@@ -277,7 +277,9 @@ row_undo_ins_parse_undo_rec(
/***************************************************************
Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */
marked, at the time of the insert. InnoDB is eager in a rollback:
if it figures out that an index record will be removed in the purge
anyway, it will remove it in the rollback. */
UNIV_INTERN
ulint
row_undo_ins(
......
......@@ -314,8 +314,35 @@ row_undo_mod_del_mark_or_remove_sec_low(
search_result = row_search_index_entry(index, entry, mode,
&pcur, &mtr);
switch (search_result) {
switch (UNIV_EXPECT(search_result, ROW_FOUND)) {
trx_t* trx;
case ROW_NOT_FOUND:
/* In crash recovery, the secondary index record may
be missing if the UPDATE did not have time to insert
the secondary index records before the crash. When we
are undoing that UPDATE in crash recovery, the record
may be missing. In normal processing, the record
SHOULD exist. */
trx = thr_get_trx(thr);
if (!trx_is_recv(trx)) {
fputs("InnoDB: error in sec index entry del undo in\n"
"InnoDB: ", stderr);
dict_index_name_print(stderr, trx, index);
fputs("\n"
"InnoDB: tuple ", stderr);
dtuple_print(stderr, entry);
fputs("\n"
"InnoDB: record ", stderr);
rec_print(stderr, btr_pcur_get_rec(&pcur), index);
putc('\n', stderr);
trx_print(stderr, trx, 0);
fputs("\n"
"InnoDB: Submit a detailed bug report"
" to http://bugs.mysql.com\n", stderr);
}
err = DB_SUCCESS;
goto func_exit;
case ROW_FOUND:
......
diff -Nur CMakeLists.txt.orig CMakeLists.txt
--- CMakeLists.txt.orig 2008-10-03 12:25:41 -05:00
+++ CMakeLists.txt 2008-09-26 17:32:51 -05:00
@@ -97,6 +97,10 @@
IF(CYBOZU)
ADD_DEFINITIONS(-DCYBOZU)
ENDIF(CYBOZU)
+# Checks for 32-bit version. And always use 32-bit time_t for compatibility
+IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 4)
+ ADD_DEFINITIONS(-D_USE_32BIT_TIME_T)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 4)
# in some places we use DBUG_OFF
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF")
@@ -246,9 +250,9 @@
@@ -244,9 +244,9 @@
IF(WITH_FEDERATED_STORAGE_ENGINE)
ADD_SUBDIRECTORY(storage/federated)
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
......@@ -149,7 +138,7 @@ diff -Nur sql/mysqld.def.orig sql/mysqld.def
+ localtime_r
+ my_strdup
diff -Nur ../old/sql/mysqld_x64.def.orig ./sql/mysqld_x64.def
diff -Nur sql/mysqld_x64.def.orig sql/mysqld_x64.def
--- sql/mysqld_x64.def.orig 1969-12-31 18:00:00 -06:00
+++ sql/mysqld_x64.def 2008-10-31 02:22:04 -05:00
@@ -0,0 +1,99 @@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment