diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index b9ad66fbce3..021d9601558 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -121,11 +121,11 @@ SUBSYSTEM_DEF(dbcore) if(!Connect()) return var/datum/DBQuery/query_round_initialize = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (initialize_datetime, server_ip, server_port) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]')") - query_round_initialize.Execute() + query_round_initialize.Execute(async = FALSE) qdel(query_round_initialize) var/datum/DBQuery/query_round_last_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()") - query_round_last_id.Execute() - if(query_round_last_id.NextRow()) + query_round_last_id.Execute(async = FALSE) + if(query_round_last_id.NextRow(async = FALSE)) GLOB.round_id = query_round_last_id.item[1] qdel(query_round_last_id) @@ -283,12 +283,12 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table last_activity = activity last_activity_time = world.time -/datum/DBQuery/proc/warn_execute(async = FALSE) +/datum/DBQuery/proc/warn_execute(async = TRUE) . = Execute(async) if(!.) to_chat(usr, "A SQL error occurred during this operation, check the server logs.") -/datum/DBQuery/proc/Execute(async = FALSE, log_error = TRUE) +/datum/DBQuery/proc/Execute(async = TRUE, log_error = TRUE) Activity("Execute") if(in_progress) CRASH("Attempted to start a new query while waiting on the old one") @@ -325,7 +325,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table /datum/DBQuery/proc/slow_query_check() message_admins("HEY! A database query timed out. Did the server just hang? \[YES\]|\[NO\]") -/datum/DBQuery/proc/NextRow(async) +/datum/DBQuery/proc/NextRow(async = TRUE) Activity("NextRow") UNTIL(!in_progress) if(!skip_next_is_complete) @@ -361,5 +361,5 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table //strip sensitive stuff if(findtext(message, ": CreateConnection(")) message = "CreateConnection CENSORED" - + log_sql("BSQL_DEBUG: [message]")