Closed will2love closed 2 years ago
Could you please try the current version from the master branch? I think this has already been fixed there:
GO111MODULE=on go get -u github.com/cube2222/octosql/cmd/octosql@6c111421de240b28f28edcb6a7d2272ea4630a92
now I use the branch v0.2.0 . and I don't know which branch is the latest and most stable
I've sent you the bash command to install the latest version (master branch). I just want to know if the problem is still there or not. If not, there should be a new release soon based on the current master branch.
Thanks The above problems have been solved,but I use mysql test sub query have some issues.
sql: select * from (select t.id from mysql_test t where t.test_name = 'test') d
result is successful .
sql2: select from (select from mysql_test t where t.test_name = 'test') d result is null. why?
It's a bug, thanks!
I just tested it and the optimizer incorrectly changes the alias of the datasource without changing the variables beneath.
The first query puts a map above the datasource so the optimizer can't push the new alias down.
PS: You can get a graph such as the above on the master branch using:
octosql 'select * from (select * from mysql_test t where t.test_name = "test") d' --describe | dot -Tpng > test.png
ok, Is there any plan to fix this bug to master branch when next commit?
We'll try to fix it in time for the next release, as it's a pretty severe bug.
If this bug is fixed, please remind me and close this issue thank you!
when I query mysql datetime field ,but it return {} all datetime field return {}
sql : select t.start_time from mysql_test t where t.id = 7
result: t.start_time":{}
this is a bug when query mysql datatime field?
Hi - unfortunately I couldn't reproduce the problem you are having. Could you maybe create a small table, try to replicate the issue and then send the rows?
Follow up:
1) I created a MySQL TABLE:
CREATE TABLE timers(id INT, str VARCHAR(10), t DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP)
2) Inserted values:
INSERT INTO timers (id, str) VALUES (1, 'a')
INSERT INTO timers (id, str) VALUES (2, 'b')
INSERT INTO timers (id, str) VALUES (3, 'c')
3) Run SELECT t.t FROM timers t WHERE t.id = 2
and got the expected result
As to your select * from (select * from mysql_test t where t.test_name = 'test') d
problem, the fix was pushed onto the master branch and this query should now be working fine :)
CREATE TABLE
test_config
(id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',test_config_id
bigint(20) NOT NULL COMMENT '',test_id
varchar(64) NOT NULL COMMENT '实验id ',test_name
varchar(64) NOT NULL COMMENT ' ',flow_id
bigint(20) NOT NULL COMMENT ' ',start_time
datetime NOT NULL COMMENT '开始时间',end_time
datetime NOT NULL COMMENT '结束时间',test_status
bigint(20) NOT NULL DEFAULT '0' ',creater
varchar(16) NOT NULL COMMENT '创建人',group_info
varchar(1024) NOT NULL COMMENT '',sys_ctime
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',sys_utime
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',is_del
tinyint(4) DEFAULT '0' COMMENT '删除标志位 0:未删除 1:删除', PRIMARY KEY (id
), UNIQUE KEYuniq_config_id
(test_config_id
), UNIQUE KEYuniq_test_id
(test_status
,flow_id
) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='实验配置表';sql: select from mysql_test t where t.creater='will' sql2: select from mysql_test t where t.test_name='test'
when my query condition is a string , also get error: couldn't get record stream from execution plan: couldn't query statement: sql: converting argument $1 type: unsupported type octosql.String, a string
but sql: select from mysql_test t where t.id=7 select from mysql_test t where t.flow_id=1111
when my query condition is a int can show successful result : {"t.creater":"williehu","t.end_time":{},"t.flow_id":10003,"t.group_info":"test","t.id":7,"t.is_del":0,"t.start_time":{},"t.sys_ctime":{},"t.sys_utime":{},"t.test_config_id":121321,"t.test_id":"mongo","t.test_name":"test","t.test_status":0}
Have any config must to set ?