Description
Hi there,
I encountered this problem in my real system, but here's a contrived simple example:
-- make a table mapping an ID to a bool
create table MY_TABLE (
ID int not null primary key,
MY_BOOL bool not null
);
-- insert one row
insert into MY_TABLE values (0, false);
-- this correctly returns 0
select MY_BOOL from MY_TABLE;
-- this should set MY_BOOL to 1
update MY_TABLE
set MY_BOOL = true
where ID in (
select 0
);
-- but it didn't. This still returns 0
select MY_BOOL from MY_TABLE;
-- this does work though
update MY_TABLE
set MY_BOOL = true
where ID = 0;
-- returns 1
select MY_BOOL from MY_TABLE;
Activity
timsehn commentedon May 29, 2025
I'm going to move this to Dolt for more visibility.
angelamayxie commentedon May 29, 2025
This is what I get in dolt
versus what I get in mysql
Note that dolt is able to match the row but does not update it. Dolt is also missing
Query OK, 0 rows affected (0.01 sec)
after the initialcreate table
harness.UseServer()
can change the plans generated dolthub/go-mysql-server#2999fix the fake inprocess database, do various cleanups
fix the fake inprocess database, do various cleanups
fix the fake inprocess database, do various cleanups (#167)
jycor commentedon May 30, 2025
Hey @srabraham, we've merged the fix for this issue to GMS main.
It's on its way to dolt main, and we'll cut a release for you later tonight.
srabraham commentedon May 30, 2025
You rock! Thanks!
bpf120 commentedon May 30, 2025
@srabraham , thanks for filing! We'd love to learn about your Dolt use case too. Feel free to email me or swing by our Discord if you would like to share.