[
https://issues.apache.org/jira/browse/DERBY-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-4027:
--------------------------------------
Attachment: recheck-slot.diff
BTreeController.compareNextRecord() and comparePreviousRecord() are on a page
boundary and therefore need to check the first record of the next page or the
last record of the previous page, they don't check if the slot number is out of
bounds when they go to the next/previous page. This causes problems if the
neighbour page doesn't have any records. The attached patch (recheck-slot.diff)
makes the methods recheck that the slot numbers are within bounds after moving
to another page.
What I don't quite understand about the code, is that the record with slot
number 0 is not used. That is, the code only looks at slots 1 ...
(recordCount() - 1). Does anyone know why? Slot 0 is a valid slot, as far as I
read the code, but if I change those methods to look at slot 0, they start
throwing EOFException.
I haven't run the regression tests, but at least the repro ran without errors
with the patch.
> An attempt was made to access an out of range slot on a page
> ------------------------------------------------------------
>
> Key: DERBY-4027
> URL: https://issues.apache.org/jira/browse/DERBY-4027
> Project: Derby
> Issue Type: Bug
> Affects Versions: 10.4.2.0
> Environment: Fedora 10 and Ubuntu 8.04
> Sun Java 1.6.0_07 and 1.6.0_11
> derby 10.4.2.0
> Reporter: Uwe Kubosch
> Priority: Blocker
> Attachments: derby.log, derby.log, derby.log, Derby4027Repro.java,
> recheck-slot.diff, schema.sql
>
>
> When running our application we get the following error message:
> An attempt was made to access an out of range slot on a page:
> INSERT INTO orders (operation, receptacle, vehicle_id, iata_origin,
> icao_origin, sta, eta, ata, pta, onb, arr_stand_id, arr_gate, arr_flight_no,
> arr_remarks, flight_no, icao_flight_no, icao_callsign, iata_destination,
> icao_destination, std, etd, atd, ofb, stand_id, pit_code, gate,
> aircraft_subtype_code, aircraft_registration, fuel_request, canceled,
> delay_ind, remarks, ptd, slot_request_code, slot_request, slot_granted,
> terminal, customer_name, customer_type, supplier_id, carnet_no,
> carnet_expiry, contract_id, authorization_reference, service_level,
> standby_at, started_at, completed_at, status, comment,
> meter1_start_volume_automatic, meter1_start_volume_manual,
> meter1_stop_volume_automatic, meter1_stop_volume_manual,
> meter2_start_volume_automatic, meter2_start_volume_manual,
> meter2_stop_volume_automatic, meter2_stop_volume_manual, temperature,
> density, created_at, updated_at, fuel_on_board, id) VALUES('FUELLING', NULL,
> NULL, NULL, NULL, '2009-01-22 07:25:00', '2009-01-22 07:30:00', '2009-01-22
> 07:27:00', '2009-01-22 07:27:00', '2009-01-22 07:29:46',
> 'anAEBO3yqr3zaaabxfoB_Q', NULL, 'DY 0201', NULL, 'DY 0242', 'NAX0242',
> 'NAX242', 'TOS', 'ENTC', '2009-01-22 07:50:00', NULL, '2009-01-22 08:13:00',
> '2009-01-22 08:06:08', 'anAEBO3yqr3zaaabxfoB_Q', NULL, '18', '733', 'LNKHA',
> 7200, 0, 'X', NULL, '2009-01-22 08:13:00', NULL, NULL, NULL, '1', NULL, NULL,
> NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2009-01-21 08:04:54',
> '2009-01-22 13:24:59', 0, 'aV9HYQ55ir3B9DabxfoB_Q')
> The error occurs several times per day on different systems. It started
> yesterday
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.