dynamobi/dynamobi — Issue #218: [LDB-103] Incorrect results on queries after partial delete on bench100k table 
Author: dynamobi-build
Created: 2011-12-30 02:22:37+00:00
State: open
Labels: LCS, LDB

[reporter="elin", created="Thu, 1 Jun 2006 14:14:07 -0500 (GMT-05:00)"]
Inline comments below:

To reproduce:

-------------------------

create foreign data wrapper ff_jdbc

library 'class com.lucidera.farrago.namespace.flatfile.FlatFileDataWrapper'

language java;

create server ff_server

foreign data wrapper ff_jdbc

options(

directory '/home/elin/open/luciddb/test/sql/bench/csv-copy',

file_extension '.csv',

ctrl_file_extension '.bcp',

field_delimiter ',',

line_delimiter '\n',

quote_char '"',

escape_char '',

with_header 'yes',

num_rows_scan '1'

);

create schema ff_schema;

import foreign schema "BCP"

limit to ("bench100K")

from server ff_server into ff_schema;

select count(*) from ff_schema."bench100K";

create schema s;

set schema 's';

create table BENCH100K (

"kseq" bigint primary key,

"k2" bigint,

"k4" bigint,

"k5" bigint,

"k10" bigint,

"k25" bigint,

"k100" bigint,

"k1k" bigint,

"k10k" bigint,

"k40k" bigint,

"k100k" bigint,

"k250k" bigint,

"k500k" bigint)

server sys_column_store_data_server;

INSERT INTO s.BENCH100K

SELECT "kseq","k2","k4","k5","k10","k25","k100","k1k","k10k","k40k","k100k","k250k","k500k"

FROM ff_schema."bench100K";

delete from bench100k where "k5" = 1;

-- this is okay, count(*) should return 80035

select count(*) from bench100k;

delete from bench100k where "k5" = 2;

-- th rows effected returned by the delete are correct 20406

-- but count(*) should return 59624, instead it returns 79416

select count(*) from bench100k;

-- this shoud have returned 0 at this point, but we're getting 2161

select count(*) from bench100k where "k5" = 2;

select * from bench100k where "k5" = 2;

-- this also returns squirrely results at this point

select count(*) from bench100k where "k5" = 1;