Sorry to answer in the same thead but It seems to be catalog corruption bug too. Le 09/08/2015 15:33, Ying Zhang a écrit :
SELECT name FROM tables WHERE name = 'atable' ; => no results, so we want to create it. CREATE TABLE atable (a int) ; => table name already in use ! (our program crashes here) Your program crashes? Not MonetDB server?
Our program crashes because it does the "SELECT * FROM tables" to list them and then tries to create a table (which is not listed in the results), but this table already exists. So it crashes. This program only do : SELECT FROM tables + CREATE/DROP TABLE + COPY FROM. Thats all. But it does it thousand times a day. We had this database state after running a few days without interruptions.
Then , manually we can do :
DROP TABLE atable ; => OK CREATE TABLE atable (a int) ; => OK SELECT * FROM atable => OK SELECT name FROM tables WHERE name = 'atable' ; => no results SELECT name FROM tables WHERE name ilike '%atable%' ; => no results SELECT name FROM _tables WHERE name = 'atable' ; => no results I can reproduce this with a fresh database on the default branch. You meen "I cannot" I guess. We cannot reproduce it on our side. That's why we keep this database alive.
If it’s reproducible, it’s surely a bug. But is it possible for you to provide a sequence of SQL queries, with which we can reproduce your problem? As, i said above, we cannot reproduce it for now. That's why we didn't make any bug-report yet. But when I saw Ashish's message, I thought that maybe it's the same/a similar bug.
-- Guillaume Savary Securactive R&D