TDDB Frequently Asked Questions



TDDB on the Web     Official TDDB Discussion Group     Home

  1. Why do I get the following error?

    The Lock Upgrade may cause Data Corruption. Please
    Lock the Table: 'tabtab,global' in UPDATE/SERIALIZABLE
    Mode before Inserting into or Reading from the Table if
    you wish to perform UPDATES on it later.
    
    This means that you first locked a table in READ mode, or fired a SELECT/INSERT query and then are trying to perform an UPDATE on that same table in the same Transcation without separating the 2 with a COMMIT or a ROLLBACK statament. This means that TDDB would have to upgrade the lock from that of type READ or INSERT to that of type UPDATE or SERIALIZABLE. This operation of lock upgradation is not supported by TDDB since it can cause Data Corruption at the Table level. Hence, you should first explicitly Lock the table(s) in UPDATE|SERIALIZABLE mode and then you can freely perform any SELECT or UPDATE statements on it in any order.
    Note: TDDB locks tables in UPDATE mode while INSERTing data into the tables if the table(s) have at least one UNIQUE field in them.

  2. I created a table, but when I wanted to insert values the table was not found!

    TDDB $>create table test (id int);
    Table Created Successfully.
    Query Execution Time: 0.09 sec.
    
    TDDB $>select * from test;
    SELECT: Table `test,global' does not exist.
    There was an error executing the statement.
    Query Execution Time: 0 sec.
    
    TDDB $>insert into test values (1);
    INSERT: Table `test,global' does not exist.
    There was an error executing the statement.
    Query Execution Time: 0 sec.
    
    Yes, there are 2 things to take care of:
    1. Even DDL statements are Transactional(you need to explicitly COMMIT after creating the table)
    2. The default mode of the client is AUTOCOMMIT OFF.

    So, if you exited the client with exit or Ctrl+D, the table will now have shown up, and the INSERT will work, since the client COMMITs on exit. You can view the list of tables by doing a "SELECT * FROM global.tabtab;"

  3. Why are the version numbers negative?

    Since TDDB is still in Alpha stage, we decided to use negative version numbers to denote that. As expected, a 0 major version number would mean that it is in Beta, and non-negative version numbers would denote the fact that TDDB is now stable for machine consumption ;-)



TDDB on the Web     Official TDDB Discussion Group     Home