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

set设置自定义变量,select返回结果为null #230

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

set设置自定义变量,select返回结果为null #230

smilethensee opened this issue Jun 23, 2022 · 3 comments

Comments

@smilethensee
Copy link

set @A=1;
select @A返回的结果为NULL,为啥是怎样呢?

@teckick
Copy link
Contributor

teckick commented Jun 24, 2022

Gaea没有处理对SET语句的后端连接绑定, 还是用的连接池, 执行 SET @ASELECT @A 的后端连接可能不是同一个, 所以会有这个现象.

@smilethensee
Copy link
Author

Gaea没有处理对SET语句的后端连接绑定, 还是用的连接池, 执行 SET @ASELECT @A 的后端连接可能不是同一个, 所以会有这个现象.

好的,也就是gaea不支持自定义变量嘛?

@teckick
Copy link
Contributor

teckick commented Jun 24, 2022

Gaea没有处理对SET语句的后端连接绑定, 还是用的连接池, 执行 SET @ASELECT @A 的后端连接可能不是同一个, 所以会有这个现象.

好的,也就是gaea不支持自定义变量嘛?

可以试试开事务之后再执行SET

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