Not able to retrieve table from csql cache

Help
KDG
2014-08-19
2014-08-21
  • KDG

    KDG - 2014-08-19

    Hi,

    I have csql running on my machine.

    $csqlserver -c

    Sys_DB [Size=0001MB]
    User_DB [Size=0010MB]
    Database server recovering cached tables...
    There is no table to be cached.
    Cached Tables recovered
    Database Server Started...

    When I try to retrieve a table from csql cache, I get the following error:

    $csql

    CSQL>select * from t1;
    19/08/2014 15:58:46.731579:11548:3072878912:DatabaseManagerImpl.cxx:829:Table not exists t1
    19/08/2014 15:58:46.731711:11548:3072878912:SelStatement.cxx:303:Unable to open the table:Table not exists
    Statement prepare failed with error -5

    If I run csql with '-g' option, I can see the table, but it still shows the above errors, which indicate that the table is not there in cache.

    $csql -g

    CSQL>select * from t1;
    19/08/2014 15:50:59.278021:11273:3072076096:DatabaseManagerImpl.cxx:829:Table not exists t1
    19/08/2014 15:50:59.278148:11273:3072076096:SelStatement.cxx:303:Unable to open the table:Table not exists


        f1      f2
    

        100     100
        200     200
    

    CSQL>

    I have the table names mentioned in my TABLE_CONFIG_FILE like this:

    1:t1
    1:t2

    What might be going wrong ?

     
  • KDG

    KDG - 2014-08-21

    Got it at last. The TABLE_CONFIG_FILE was not edited properly.
    I added the table names according to the CSQL user manual doc, which was not correct.
    The TABLE_CONFIG_FILE should be like this:

    1 t1 NULL NULL NULL myodbc
    1 t2 NULL NULL NULL myodbc

    Now the tables are getting cached properly.

    $ csql
    CSQL>select * from t1;


        t1.f1   t1.f2
    

        100     100
        200     200
    

    Had to go through CSQL source code to find out the issue.
    Clearly, the CSQL user manual doc needs to be updated.

     

Log in to post a comment.