summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-08-18 01:48:01 +0300
committerunknown <heikki@hundin.mysql.fi>2004-08-18 01:48:01 +0300
commit0c062ae60f9dbb21ce3702389f89e4441451d02b (patch)
tree3374aa426a2d37a0fbcffeba922bae916fb0febd /sql
parent35daaa5e1544a4162f85aa3f071a668fe6f21a9d (diff)
downloadmariadb-git-0c062ae60f9dbb21ce3702389f89e4441451d02b.tar.gz
srv0start.c, ut0mem.c, ut0dbg.c, ut0dbg.h, srv0start.h:
Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) mysqld.cc, ha_innodb.cc: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) sql/ha_innodb.cc: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) sql/mysqld.cc: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) innobase/include/srv0start.h: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) innobase/include/ut0dbg.h: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) innobase/ut/ut0dbg.c: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) innobase/ut/ut0mem.c: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri) innobase/srv/srv0start.c: Changes for NetWare to exit the InnoDB gracefully instead of crashing the server (patch by PRam@novell.com, polished a little by Heikki Tuuri)
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc9
-rw-r--r--sql/mysqld.cc3
2 files changed, 12 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index f233dd5a5c5..22ddfe779d5 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -121,6 +121,10 @@ char innodb_dummy_stmt_trx_handle = 'D';
static HASH innobase_open_tables;
+#ifdef __NETWARE__ /* some special cleanup for NetWare */
+bool nw_panic = FALSE;
+#endif
+
static mysql_byte* innobase_get_key(INNOBASE_SHARE *share,uint *length,
my_bool not_used __attribute__((unused)));
static INNOBASE_SHARE *get_share(const char *table_name);
@@ -950,6 +954,11 @@ innobase_end(void)
DBUG_ENTER("innobase_end");
+#ifdef __NETWARE__ /* some special cleanup for NetWare */
+ if (nw_panic) {
+ set_panic_flag_for_netware();
+ }
+#endif
err = innobase_shutdown_for_mysql();
hash_free(&innobase_open_tables);
my_free(internal_innobase_data_file_path,MYF(MY_ALLOW_ZERO_PTR));
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 8f08099f340..e4d60fc9e7c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1547,6 +1547,8 @@ void registerwithneb()
ulong neb_event_callback(struct EventBlock *eblock)
{
EventChangeVolStateEnter_s *voldata;
+ extern bool nw_panic;
+
voldata= (EventChangeVolStateEnter_s *)eblock->EBEventData;
/* Deactivation of a volume */
@@ -1559,6 +1561,7 @@ ulong neb_event_callback(struct EventBlock *eblock)
if (!memcmp(&voldata->volID, &datavolid, sizeof(VolumeID_t)))
{
consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n");
+ nw_panic = TRUE;
kill_server(0);
}
}