Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个连接,两个 stmt_id 的支持 #14

Open
hoterran opened this issue Nov 30, 2012 · 1 comment
Open

一个连接,两个 stmt_id 的支持 #14

hoterran opened this issue Nov 30, 2012 · 1 comment
Assignees

Comments

@hoterran
Copy link
Owner

目前如果一个连接,两个stmt语句的话,输出是有错的,因为stmt_id 仅留了一个字段。
这个需要一个链表来保存stmt和sql还有param

@ghost ghost assigned hoterran Nov 30, 2012
@hoterran
Copy link
Owner Author

目前这里有很大的缺陷,在下个版本里修改.

  1. 当存在两个 stmt 语句的时候,如果交叉使用,则会出错,后面的 stmt_id 会覆盖前面的.

COM_STMT_PREPARE AfterPreparePacket
ok save stmt_id , param_count

COM_STMT_PREPARE AfterPreparePacket
ok save new_stmt_id , new_param_count

如果第一个 stmt 执行语句则报错, hash_get_param_count 拿不到记录 第二个可以.

  1. 普通 sql 和 stmt 交叉使用,

stmt
normal sql 会把上面的 stmt 的 数据给清理
再次执行 normal sql 是可以.
再次执行 stmt, 显示的是 normal sql 和结果集.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant