From f2649f104b821c370955aab1270da8bafce0bae0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 11:32:42 +0200 Subject: [PATCH 1/4] ha_innodb.cc: Fix bug: mysqld-debug-max failed standard test because a safe mutex size was seen as 24 bytes in the body of ha_innodb.cc, but 64 bytes in read0read.c sql/ha_innodb.cc: Fix bug: mysqld-debug-max failed standard test because a safe mutex size was seen as 24 bytes in the body of ha_innodb.cc, but 64 bytes in read0read.c --- sql/ha_innodb.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 588c37e9cf3..79c85985f23 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -40,17 +40,12 @@ InnoDB */ #include "ha_innodb.h" -/* We must declare this here because we undef SAFE_MUTEX below */ pthread_mutex_t innobase_mutex; /* Store MySQL definition of 'byte': in Linux it is char while InnoDB uses unsigned char */ typedef byte mysql_byte; -#ifdef SAFE_MUTEX -#undef pthread_mutex_t -#endif - #define INSIDE_HA_INNOBASE_CC /* Include necessary InnoDB headers */ From e53b7488dcd18705fd785915f48cc64abd2fdb27 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 12:03:34 +0200 Subject: [PATCH 2/4] srv0start.h, srv0start.c, ha_innodb.cc: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules sql/ha_innodb.cc: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules innobase/srv/srv0start.c: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules innobase/include/srv0start.h: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules --- innobase/include/srv0start.h | 2 ++ innobase/srv/srv0start.c | 11 +++++++++++ sql/ha_innodb.cc | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h index 646d2c1bb06..24cdecb7341 100644 --- a/innobase/include/srv0start.h +++ b/innobase/include/srv0start.h @@ -79,6 +79,8 @@ innobase_shutdown_for_mysql(void); /*=============================*/ /* out: DB_SUCCESS or error code */ +extern ulint srv_sizeof_trx_t_in_ha_innodb_cc; + extern ibool srv_startup_is_before_trx_rollback_phase; extern ibool srv_is_being_shut_down; diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index d6d610bb5b8..cad946b1e54 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -56,6 +56,8 @@ Created 2/16/1996 Heikki Tuuri #include "srv0start.h" #include "que0que.h" +ulint srv_sizeof_trx_t_in_ha_innodb_cc; + ibool srv_startup_is_before_trx_rollback_phase = FALSE; ibool srv_is_being_started = FALSE; ibool srv_was_started = FALSE; @@ -960,6 +962,15 @@ innobase_start_or_create_for_mysql(void) "InnoDB: !!!!!!!!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!!!!!!!\n"); #endif + if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) { + fprintf(stderr, + "InnoDB: Error: trx_t size is %lu in ha_innodb.cc but %lu in srv0start.c\n" + "InnoDB: Check that pthread_mutex_t is defined in the same way in these\n" + "InnoDB: compilation modules. Cannot continue.\n", + srv_sizeof_trx_t_in_ha_innodb_cc, (ulint)sizeof(trx_t)); + return(DB_ERROR); + } + log_do_write = TRUE; /* yydebug = TRUE; */ diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 79c85985f23..b849bbb76b2 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -747,6 +747,14 @@ innobase_init(void) default_charset_info->sort_order, 256); } + /* Since we in this module access directly the fields of a trx + struct, and due to different headers and flags it might happen that + mutex_t has a different size in this module and in InnoDB + modules, we check at run time that the size is the same in + these compilation modules. */ + + srv_sizeof_trx_t_in_ha_innodb_cc = sizeof(trx_t); + err = innobase_start_or_create_for_mysql(); if (err != DB_SUCCESS) { From 7ff18489f931c1dd47bee8e569dfd82d18b00182 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 14:58:05 +0400 Subject: [PATCH 3/4] discard superflous os2/Makefile in dependence list.. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f007d511865..11b207da5fe 100644 --- a/configure.in +++ b/configure.in @@ -2417,7 +2417,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \ os2/Makefile os2/include/Makefile os2/include/sys/Makefile \ man/Makefile BUILD/Makefile readline/Makefile vio/Makefile \ libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile \ - libmysql/Makefile client/Makefile os2/Makefile \ + libmysql/Makefile client/Makefile \ pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile \ merge/Makefile dbug/Makefile scripts/Makefile \ include/Makefile sql-bench/Makefile tools/Makefile \ From 0bd1b796915a84884ea637b6382b37961903543f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 13:56:25 +0100 Subject: [PATCH 4/4] - Do-compile: added a fast test run with dynamic-row tables - Do-compile: fix small (cosmetical, not critical) typo Build-tools/Do-compile: - added a fast test run with dynamic-row tables - fix small (cosmetical, not critical) typo --- Build-tools/Do-compile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index a29bd99191d..367911bb252 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -381,13 +381,15 @@ if ($opt_stage <= 9 && !$opt_no_test) log_system("rm -f output/*"); $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql"); + # Run additional fast test with dynamic-row tables + check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql"); if ($opt_innodb) { - check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-option=\"type=innodb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql"); } if ($opt_bdb) { - check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-option=\"type=bdb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql"); } }