Skip to content

Commit

Permalink
Close MySQL prepared statements
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-shaw committed Feb 15, 2020
1 parent 1f8fefa commit e583975
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/mysql/mysqloltp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,11 @@ ostat $mysql_handler $w_id $prepare $RAISEERROR
if { $KEYANDTHINK } { thinktime 5 }
}
}
if {$prepare} {
foreach st {neword_st payment_st ostat_st delivery_st slev_st} {
catch {mysqlexec $mysql_handler "deallocate prepare $st"}
}
}
mysqlclose $mysql_handler}
}

Expand Down Expand Up @@ -1695,6 +1700,11 @@ ostat $mysql_handler $w_id $prepare $RAISEERROR
if { $KEYANDTHINK } { thinktime 5 }
}
}
if {$prepare} {
foreach st {neword_st payment_st ostat_st delivery_st slev_st} {
catch {mysqlexec $mysql_handler "deallocate prepare $st"}
}
}
mysqlclose $mysql_handler
}
}}
Expand Down Expand Up @@ -2078,6 +2088,11 @@ ostat $mysql_handler $w_id $prepare $RAISEERROR $clientname
if { $KEYANDTHINK } { async_thinktime 5 $clientname ostat $async_verbose }
}
}
if {$prepare} {
foreach st {neword_st payment_st ostat_st delivery_st slev_st} {
catch {mysqlexec $mysql_handler "deallocate prepare $st"}
}
}
mysqlclose $mysql_handler
if { $async_verbose } { puts "$clientname:complete" }
return $clientname:complete
Expand Down

0 comments on commit e583975

Please sign in to comment.