You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the SQL logs. This is with prepared statements:
SolidCache::Entry Upsert (0.7ms) INSERT INTO "solid_cache_entries" ("key","value","key_hash","byte_size","created_at") VALUES ('\x646576656c6f706d656e743a666f6f', '\x0004085b06492208626172063a064554', -4375748427727277429, 171, CURRENT_TIMESTAMP) ON CONFLICT ("key_hash") DO UPDATE SET "key"=excluded."key","value"=excluded."value","byte_size"=excluded."byte_size" RETURNING "id"
SolidCache::Entry Load (0.1ms) SELECT "solid_cache_entries"."key", "solid_cache_entries"."value" FROM "solid_cache_entries" WHERE "solid_cache_entries"."key_hash" = $1 [[nil, -4375748427727277429]]
And this is without:
SolidCache::Entry Upsert (1.4ms) INSERT INTO "solid_cache_entries" ("key","value","key_hash","byte_size","created_at") VALUES ('\x646576656c6f706d656e743a666f6f', '\x0004085b06492208626172063a064554', -4375748427727277429, 171, CURRENT_TIMESTAMP) ON CONFLICT ("key_hash") DO UPDATE SET "key"=excluded."key","value"=excluded."value","byte_size"=excluded."byte_size" RETURNING "id"
SolidCache::Entry Load (0.8ms) SELECT "solid_cache_entries"."key", "solid_cache_entries"."value" FROM "solid_cache_entries" WHERE "solid_cache_entries"."key_hash" IN ($1, $2) [[nil, -4375748427727277429]]
I noticed that without prepared statements WHERE "solid_cache_entries"."key_hash" IN ($1, $2) you have two bind parameters, but only pass one value. PostgreSQL is equally unhappy by that:
Works as you would expect:
But this does not:
Looking at the SQL logs. This is with prepared statements:
And this is without:
I noticed that without prepared statements
WHERE "solid_cache_entries"."key_hash" IN ($1, $2)
you have two bind parameters, but only pass one value. PostgreSQL is equally unhappy by that:Resulting in the failure.
Must surely be something wrong with this line:
https://github.com/rails/solid_cache/blob/main/app/models/solid_cache/entry.rb#L119
The text was updated successfully, but these errors were encountered: