sjeiwei / sqljet

Automatically exported from code.google.com/p/sqljet
0 stars 0 forks source link

Create table with duplicit column name shoud be fail. #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
  @Test
  public void testBadCreateTable() throws Exception
  {
    boolean testOk = false;
    db.beginTransaction(SqlJetTransactionMode.WRITE);
    try
    {  //memory_slot_id is duplicit
      db.createTable("CREATE TABLE IF NOT EXISTS memory_slots (memory_slot_id INTEGER PRIMARY KEY AUTOINCREMENT,memory_slot_id INTEGER NOT NULL,name TEXT NOT NULL,registration TEXT,fuel_type TEXT,fuel_units TEXT,distance_units TEXT NOT NULL )");
    }
    catch (SqlJetException ex) {
      testOk = true;
    }
    finally
    {
      db.commit();
    }

    assertEquals(true, testOk);
  }

Original issue reported on code.google.com by jhruby....@gmail.com on 21 Oct 2010 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by sergey.s...@gmail.com on 21 Oct 2010 at 2:03

GoogleCodeExporter commented 9 years ago
Thanks. Fixed in trunk. Check, please.

Original comment by sergey.s...@gmail.com on 21 Oct 2010 at 3:22

GoogleCodeExporter commented 9 years ago
It's ok. :-D

Original comment by jhruby....@gmail.com on 25 Oct 2010 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by sergey.s...@gmail.com on 26 Oct 2010 at 3:23