You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Ben CHARLTON (Jira)" <ji...@apache.org> on 2021/03/11 02:28:00 UTC

[jira] [Created] (DERBY-7105) CALLING "FETCH FIRST ROW" on an empty table will throw EOF SQL Exception

Ben CHARLTON created DERBY-7105:
-----------------------------------

             Summary: CALLING "FETCH FIRST ROW" on an empty table will throw EOF SQL Exception
                 Key: DERBY-7105
                 URL: https://issues.apache.org/jira/browse/DERBY-7105
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.14.2.0
         Environment: Windows 10
Intellij 2020.3.2

            Reporter: Ben CHARLTON


Steps to produce 

Create derby database

 
{code:java}
`CREATE DATABASE APP`
 
{code}
Create empty table
{code:sql}
create table APP.PRISM_ID_MAP
(
 MATERIAL VARCHAR(63) not null,
 STATE VARCHAR(255) not null,
 BLOCK_ID INTEGER default AUTOINCREMENT: start 1 increment 1 generated always as identity,
 BLOCK_SUBID INTEGER default 0 not null,
 primary key (MATERIAL, STATE),
 unique (BLOCK_ID, BLOCK_SUBID)
){code}
Run a simple query
{code:sql}
SELECT block_id, block_subid FROM APP.prism_id_map WHERE PRISM_ID_MAP.MATERIAL = 'dirt'
{code}
Confirm Empty Set
{code:sql}
SELECT block_id, block_subid FROM APP.prism_id_map WHERE PRISM_ID_MAP.MATERIAL = 'dirt' FETCH FIRST ROW{code}
[42X01][30000] Syntax error: Encountered "<EOF>" at line *, column *.

This was performed using the Intellij inbuilt database schema manager.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)