On 2019-07-01 19:38, Surafel Temesgen wrote:
> Thank you for informing. attach is a rebased patch against current
> master
> [...]
> [fetch_first_with_ties_v10.patch]
Hi Surafel,
The patch applies OK, make check is OK, compiles OK.
But I get:
TRAP: FailedAssertion("!(!(((slot)->tts_flags & (1 << 1)) != 0))", File:
"execTuples.c", Line: 491)
when running a variant ('fetch 1' instead of 'fetch 2') of the test SQL
against src/test/regress/data/onek.data:
(in the script below the location of the file 'onek.data' will have to
be changed)
--------------------- 8< ---------------------
#!/bin/bash
echo "
drop table if exists onek ;
create table onek (
unique1 int4,
unique2 int4,
two int4,
four int4,
ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
odd int4,
even int4,
stringu1 name,
stringu2 name,
string4 name
);
copy onek from
'/home/aardvark/pg_stuff/pg_sandbox/pgsql.fetch_first_with_ties/src/test/regress/data/onek.data';
create index onek_unique1 on onek using btree(unique1
int4_ops);
create index onek_unique2 on onek using btree(unique2 int4_ops);
create index onek_hundred on onek using btree(hundred int4_ops);
create index onek_stringu1 on onek using btree(stringu1 name_ops);
-- OK:
select * from onek
where thousand < 5 order by thousand
fetch first 1 rows only
;
-- crashes:
select * from onek
where thousand < 5 order by thousand
fetch first 1 rows with ties
;
" | psql -qXa
--------------------- 8< ---------------------
Can you have a look?
thanks,
Erik Rijkers