db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Looking for a clue or a theory
Date Sun, 15 Feb 2009 02:44:30 GMT
I'm studying the DERBY-2487 patch proposal, and have encountered some
strange behavior that I don't understand. I'm hoping that somebody
on the list can make a suggestion or offer some ideas about where
I should look.

Below are the results of several queries against the new system table
SYS.SYSXPLAIN_RESULTSETS which is created by the patch, after I've caused
a couple rows to be insert into the table using the new feature. The right rows
appear to be getting stored in the table, but there's some sort of
subtle corruption occuring, which I don't understand.

Note the odd behavior of the 'no_opens' column, which sometimes appears
to have the value NULL and sometimes has the value 1.

By debugging up to the point where the code generates the ExecRow
to be stored in the system table, I can see that the value of the
no_opens column is 1 for the 'TABLESCAN' row, at the time of the insert.

My first theory was that the row factory for the new system table
is mis-defining the columns, perhaps with respect to the nullability
of the columns, but I've been over and over that code, and the
column definitions seem valid.

Plus, wouldn't I get a more "severe" error if the values in the ExecRow
didn't match the data types of the columns in the table? Or does the
Store not really verify the actual data in a table against the
column definitions of the table?

I know this is kind of a vague message, but hopefully somebody has
seen symptoms like this before and can make some suggestions about
where I should look.

thanks,

bryan

ij> select op_identifier, no_opens from sys.sysxplain_resultsets;
OP_IDENTIFIER                                                |NO_OPENS
-------------------------------------------------------------------------------
PROJECTION                                                   |1
TABLESCAN                                                    |NULL

2 rows selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where op_identifier='TABLESCAN';
OP_IDENTIFIER                                                |NO_OPENS
--------------------------------------------------------------------------------
TABLESCAN                                                    |1

1 row selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where op_identifier='TABLESCAN'
and no_opens is null;
OP_IDENTIFIER                                                |NO_OPENS
---------------------------------------------------------------------------------

0 rows selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where op_identifier='TABLESCAN'
and no_opens = 1;
OP_IDENTIFIER                                                |NO_OPENS
----------------------------------------------------------------------------------
TABLESCAN                                                    |1

1 row selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where op_identifier='PROJECTION';
OP_IDENTIFIER                                                |NO_OPENS
----------------------------------------------------------------------------------
PROJECTION                                                   |1

1 row selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where op_identifier='PROJECTION'
and no_opens = 1;
OP_IDENTIFIER                                                |NO_OPENS
-----------------------------------------------------------------------------------
PROJECTION                                                   |1

1 row selected
ij> select op_identifier, no_opens from sys.sysxplain_resultsets where no_opens = 1;
OP_IDENTIFIER                                                |NO_OPENS
------------------------------------------------------------------------------------
PROJECTION                                                   |1

1 row selected
ij>


Mime
View raw message