Skip to content

Commit

Permalink
Merge pull request #725 from sm-shaw/724
Browse files Browse the repository at this point in the history
Fixes GUI inline edit errors for MySQL and CLI for MySQL, MariaDB, Oracle, Db2
  • Loading branch information
abondvt89 authored Jul 12, 2024
2 parents e89e2f7 + 680f6bf commit 90a5945
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/db2/db2oltp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,13 @@ proc insert_db2connectpool_drivescript { testtype timedtype } {
#End of run loop is previous line
set syncdrvi(3b) [ expr $syncdrvi(3b) - 1 ]
#Delete run loop
if { [ string is entier $syncdrvi(3b) ] } {
#CLI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)
} else {
#GUI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)+1l
}
#Replace with asynchronous connect pool version
.ed_mainFrame.mainwin.textFrame.left.text fastinsert $syncdrvi(3a) $syncdrvt(3)
#Remove extra async connection
Expand Down
6 changes: 6 additions & 0 deletions src/mariadb/mariaoltp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,13 @@ mariaclose $mmaria_handler
#End of run loop is previous line
set syncdrvi(3b) [ expr $syncdrvi(3b) - 1 ]
#Delete run loop
if { [ string is entier $syncdrvi(3b) ] } {
#CLI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)
} else {
#GUI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)+1l
}
#Replace with asynchronous connect pool version
.ed_mainFrame.mainwin.textFrame.left.text fastinsert $syncdrvi(3a) $syncdrvt(3)
#Remove extra async connection
Expand Down
8 changes: 7 additions & 1 deletion src/mysql/mysqloltp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1316,15 +1316,21 @@ mysqlclose $mmysql_handler
#End of run loop is previous line
set syncdrvi(3b) [ expr $syncdrvi(3b) - 1 ]
#Delete run loop
if { [ string is entier $syncdrvi(3b) ] } {
#CLI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)
} else {
#GUI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)+1l
}
#Replace with asynchronous connect pool version
.ed_mainFrame.mainwin.textFrame.left.text fastinsert $syncdrvi(3a) $syncdrvt(3)
#Remove extra async connection
set syncdrvi(7a) [.ed_mainFrame.mainwin.textFrame.left.text search -backwards "#Open standalone connect to determine highest warehouse id for all connections" end ]
set syncdrvi(7b) [.ed_mainFrame.mainwin.textFrame.left.text search -backwards {set mmysql_handler [ ConnectToMySQL $host $port $socket $ssl_options $user $password $db ]} end ]
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(7a) $syncdrvi(7b)+1l
#Replace individual lines for Asynch
foreach line {{set mysql_handler [ ConnectToMySQLAsynch $host $port $socket $ssl_options $user $password $db $clientname $async_verbose ]} {dict set connlist $id [ set mysql_handler$id [ ConnectToMySQL $1 $2 $3 $4 $5 $6 ] ]} {#puts "sproc_cur:$st connections:[ set $cslist ] cursors:[set $cursor_list] number of cursors:[set $len] execs:[set $cnt]"}} asynchline {{set mmysql_handler [ ConnectToMySQLAsynch $host $port $socket $user $password $db $clientname $async_verbose ]} {dict set connlist $id [ set mysql_handler$id [ ConnectToMySQLAsynch $1 $2 $3 $4 $5 $6 $clientname $async_verbose ] ]} {#puts "$clientname:sproc_cur:$st connections:[ set $cslist ] cursors:[set $cursor_list] number of cursors:[set $len] execs:[set $cnt]"}} {
foreach line {{set mysql_handler [ ConnectToMySQLAsynch $host $port $socket $ssl_options $user $password $db $clientname $async_verbose ]} {dict set connlist $id [ set mysql_handler$id [ ConnectToMySQL $1 $2 $3 $4 $5 $6 $7 ] ]} {#puts "sproc_cur:$st connections:[ set $cslist ] cursors:[set $cursor_list] number of cursors:[set $len] execs:[set $cnt]"}} asynchline {{set mmysql_handler [ ConnectToMySQLAsynch $host $port $socket $user $password $db $clientname $async_verbose ]} {dict set connlist $id [ set mysql_handler$id [ ConnectToMySQLAsynch $1 $2 $3 $4 $5 $6 $clientname $async_verbose ] ]} {#puts "$clientname:sproc_cur:$st connections:[ set $cslist ] cursors:[set $cursor_list] number of cursors:[set $len] execs:[set $cnt]"}} {
set index [.ed_mainFrame.mainwin.textFrame.left.text search -backwards $line end ]
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $index "$index lineend + 1 char"
.ed_mainFrame.mainwin.textFrame.left.text fastinsert $index "$asynchline \n"
Expand Down
6 changes: 6 additions & 0 deletions src/oracle/oraoltp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,13 @@ proc insert_oraconnectpool_drivescript { testtype timedtype } {
#End of run loop is previous line
set syncdrvi(3b) [ expr $syncdrvi(3b) - 1 ]
#Delete run loop
if { [ string is entier $syncdrvi(3b) ] } {
#CLI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)
} else {
#GUI
.ed_mainFrame.mainwin.textFrame.left.text fastdelete $syncdrvi(3a) $syncdrvi(3b)+1l
}
#Replace with asynchronous connect pool version
.ed_mainFrame.mainwin.textFrame.left.text fastinsert $syncdrvi(3a) $syncdrvt(3)
#Remove extra async connection
Expand Down

0 comments on commit 90a5945

Please sign in to comment.