Commit 3a0c314055494f48c89df552bfd35c7a37c5e390
1 parent
0d2111f2
关闭prepare stmt
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
src/utils/MysqlUtil.lua
... | ... | @@ -30,24 +30,24 @@ end |
30 | 30 | |
31 | 31 | function addFriend(roleId, friendId) |
32 | 32 | local stmt_csp = mysqlproxy:prepare("call add_friends(?, ?, ?)") |
33 | - skynet.error(string.format("addFriend!!!!!!!!!,%s,%s,%s",roleId, friendId, skynet.timex())) | |
34 | - logdump(stmt_csp, '') | |
33 | + --logdump(stmt_csp, '') | |
35 | 34 | local r = mysqlproxy:execute(stmt_csp, roleId, friendId, skynet.timex()) |
36 | 35 | if r[1][1]["t_error"] == 0 then |
37 | 36 | rpcRole(roleId, "addFriend", friendId) |
38 | 37 | rpcRole(friendId, "addFriend", roleId) |
39 | 38 | end |
39 | + mysqlproxy:stmt_close(stmt_csp) | |
40 | 40 | end |
41 | 41 | |
42 | 42 | function delFriend(roleId, friendId) |
43 | 43 | local stmt_csp = mysqlproxy:prepare("call del_friends(?, ?)") |
44 | - skynet.error(string.format("delFriend!!!!!!!!!,%s,%s",roleId, friendId)) | |
45 | - logdump(stmt_csp, '') | |
44 | + --logdump(stmt_csp, '') | |
46 | 45 | local r = mysqlproxy:execute(stmt_csp, roleId, friendId) |
47 | 46 | if r[1][1]["t_error"] == 0 then |
48 | 47 | rpcRole(roleId, "delFriend", friendId) |
49 | 48 | rpcRole(friendId, "delFriend", roleId) |
50 | 49 | end |
50 | + mysqlproxy:stmt_close(stmt_csp) | |
51 | 51 | end |
52 | 52 | |
53 | 53 | function roleExists(roleId) | ... | ... |