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

prepare类型语句出错 #229

Open
smilethensee opened this issue Jun 23, 2022 · 3 comments
Open

prepare类型语句出错 #229

smilethensee opened this issue Jun 23, 2022 · 3 comments

Comments

@smilethensee
Copy link

用mysql官网的prepare语句测试
PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
SET @A = 3;
SET @b = 4;
EXECUTE stmt1 USING @A, @b;
报错如下:
ERROR 1243 (HY000): Unknown prepared statement handler (stmt1) given to EXECUTE

@teckick
Copy link
Contributor

teckick commented Jun 23, 2022

Gaea支持二进制Prepare协议, 但对文本Prepare没有明确支持

@smilethensee
Copy link
Author

Gaea支持二进制Prepare协议, 但对文本Prepare没有明确支持

那我该怎么写prepare语句呢?不是很懂。要通过jdbc这种工具吗?

@teckick
Copy link
Contributor

teckick commented Jun 24, 2022

Gaea支持二进制Prepare协议, 但对文本Prepare没有明确支持

那我该怎么写prepare语句呢?不是很懂。要通过jdbc这种工具吗?

是的. https://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html

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

No branches or pull requests

2 participants