Skip to content

Commit

Permalink
dont use "select max(id) as id from ui_table_debug_sql_log" to get in…
Browse files Browse the repository at this point in the history
…serted ID in UI DB table
  • Loading branch information
yazz committed Jan 2, 2025
1 parent e118f24 commit 2594d49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13457,17 +13457,18 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
if (steps && (steps.length > 0)) {
lastTraceid = steps[steps.length - 1]
}
let nextId = yz.uiDb.uiDbNextId ++
yz.uiDb.sqlui("INSERT INTO ui_table_debug_sql_log ( id , debug_tracer_id , sql_statement , fk_parent_debug_trace_log_id , debug_tick , caller_file_name , caller_line_number ) VALUES (?,?,?,?,?,?,?)",
[
yz.uiDb.uiDbNextId ++,
nextId,
dbgCode,
sql,
lastTraceid,
yz.debug.debugTick,
sourceFileName,
lineNumber
])
yz.debug.currentSqlLogId = yz.uiDb.sqlui1("select max(id) as id from ui_table_debug_sql_log").id
yz.debug.currentSqlLogId = nextId
}
}
if (startOfSql.startsWith("update") || startOfSql.startsWith("delete")) {
Expand Down

0 comments on commit 2594d49

Please sign in to comment.