Forum Stats

  • 3,827,534 Users
  • 2,260,790 Discussions
  • 7,897,295 Comments

Discussions

Import bug (fatal error): SQL Developer 4.1EA2 drops destination table upon rollback after error

jmarton
jmarton Member Posts: 92
edited Apr 27, 2015 11:42AM in SQL Developer

I created a table in the worksheet and then I tried to import data into is using SQL Developer EA2. After error is raised, I was presented with the error on the screenshot below. (Note: Rightmost button stands for "Cancel") By choosing cancel (i.e. Click cancel to cancel and rollback.) my destination table is dropped to recycle bin. Rollback should not undo any DDL even when the table was created using the import wizard. But purging a table that was not created by the import wizard is a fatal error.

test_imp_rollback_bug_error.png

Steps to reproduce:

  1. create the destination table from worksheet and check if it was created:
    column table_name format a21
    create table test_imp_rollback_bug(dummy number(2));
    insert into test_imp_rollback_bug values (-1);
    commit;
    select table_name from user_tables where table_name='TEST_IMP_ROLLBACK_BUG';
    
    --Result:
    TABLE_NAME
    -------------------------
    TEST_IMP_ROLLBACK_BUG
    
    
  2. import CSV using the import settings attached, To achieve this, utilize the new Restore state of the SQL Developer's import wizard. Note: you might need to adjust schema of the destination table.
    1. test_imp_rollback_bug_numbers.csv
    2. test_imp_rollback_bug-import_settings.sdimp
  3. Upon "Insert failed for rows  1  through  50 " message presented, click Cancel.
  4. The table does not exists any more:
    select table_name from user_tables where table_name='TEST_IMP_ROLLBACK_BUG';
    --Result:
    no rows selected
    
    

Edit (jmarton, 2015-04-26):

Software versions used:

SQL Developer version: 4.1.0.18.37

Oracle JDK: 1.8.0_31, 64bit, Linux

Instant client: linux.x64-12.1.0.2.0

Database: 12cR1 12.1.0.2.0 64bit, Linux, EE, CDB-install

Tagged:
2943043

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,617 Employee
    edited Apr 26, 2015 9:39AM
    1. select table_name from user_tables where table_name='TEST_IMP_ROLLBACK_BUG'; 
    2. --Result: 
    3. no rows selected

    >>Note: you might need to adjust schema of the destination table.

    A rollback won't drop a table. Are you sure the tale isn't there? select from dba_tables or all_tables, assuming you had to change the destination schema as indicated in your test notes.

  • jmarton
    jmarton Member Posts: 92
    edited Apr 26, 2015 10:50AM

    You are right that a Database-level rollback does not delete any tables. I didn't say it was a database level rollback. It was something done by SQL Developer referred to as rollback on the screenshot.

    Jeff, please try to reproduce the behaviour and you will see whether you can reproduce it if you don't believe the fact that the first query from user_tables show the table, but the 2nd does not show it. There were no 'alter session set current_schema....' nor any similar in the reproduction steps. And I also mentioned that "table is dropped to recycle bin"

    The note is only applicable for step 2 of the reproduction as the schema I used is included in the import parameter file test_imp_rollback_bug-import_settings.sdimp

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,617 Employee
    edited Apr 27, 2015 11:42AM

    This is a bug that has been fixed for the official release.

    2943043jmarton
This discussion has been closed.