Opened 9 years ago

Closed 9 years ago

#1027 closed defect (invalid)

rasdl could not delete base/marray/settype from RASBASE

Reported by: Bang Pham Huu Owned by: Dimitar Misev
Priority: major Milestone: 9.1.x
Component: undecided Version: development
Keywords: rasdl delete Cc:
Complexity: Medium

Description

I have tried to do this ticket http://rasdaman.org/ticket/1004 but have problem when delete base/marray/set from RASBASE.

Here is my created set type in RASBASE

rasdl --print

struct abcPixel { char a; }; 
typedef marray <abcPixel, 2> abcImage;
typedef set <abcImage> abcSet;

and when running query

rasdl --delbasetype abcPixel --connect RASBASE

I have an error without regarding to base/marray or settyp about no such table RAS_COUNTERS

Using error text file: /home/rasdaman/install/share/rasdaman//errtxts
21/10/2015 16:14:40.793 DEBUG [rasdaman@gonzo] [SimpleFileStorage::SimpleFileStorage(const string&)] [simplefilestorage.cc:46] SimpleFileStorage initialized on root path/home/rasdaman/install/data/
rasdl: rasdaman schema and database manipulation tool, rasdaman v9.1.0-g7e602bf on base DBMS sqlite -- generated on 14.10.2015 09:29:25.
Deleting basetype abcPixel...21/10/2015 16:14:40.794  [INFO] Connecting to RASBASE
21/10/2015 16:14:40.794 [FATAL] SQL query failed: SELECT NextValue FROM RAS_COUNTERS ORDER BY CounterId
21/10/2015 16:14:40.794 [FATAL] Database error, code: 1, message: no such table: RAS_COUNTERS

EDL003 rasdaman error: 206: Error in base DBMS, error number: 1
no such table: RAS_COUNTERS
rasdl done.

How can I pass this error, thanks.

Change History (4)

comment:1 by Dimitar Misev, 9 years ago

You need to specify the absolute path to your SQLite RASBASE with —connect.

E.g. rasdl —connect /path/to/RASBASE

comment:2 by Dimitar Misev, 9 years ago

Or if you don't specify —connect it should work as well, as it reads the connect string from the rasmgr.conf

comment:3 by Bang Pham Huu, 9 years ago

Thanks, Dimitar, it works with both of your example, best is using the configuration. In fact, I've tried this before but when I tried to delete (base/mdd/set) type it doesn't change anything.

The point in here is because I've created a collection that used the set type "abcSet" then when I try to delete (settype) it could not do this.

I think it is better if:

+ As ticket http://rasdaman.org/ticket/1004 (it looks like it is not valid because user could not delete definition of dataset if it has been used by collection). So in there, a message output will help user know this is using by some collections.

+ Also with "—delbasetype, —delmddtype, —delsettype". If "base/mdd/set" type is not existed it can return a message output, instead of

Deleting basetype abcPixel8768...22/10/2015 08:11:00.383  [INFO] Connecting to /home/rasdaman/install/data/RASBASE
ok
rasdl done.

+ And also in rasql query language guide, page 26, need to add information about the fullpath to RASBASE instead of

rasdl --database RASBASE -–delsettype MyCollectionType

And notice user need to follow the logic to delete from set → mdd → base. Because now user can run —delbasetype even when settype is existed and it just do nothing (a properly error message is good in here).

rasdl --delbasetype abcPixel

Deleting basetype abcPixel...22/10/2015 09:02:16.665  [INFO] Connecting to /home/rasdaman/install/data/RASBASE
ok
rasdl done.


rasdl -p | grep 'abc'
typedef struct { char a } abcPixel;
typedef marray <struct { char a }, 2> abcImage;


+ Last also not relate to this ticket, but if using

rasql -q "Select a from RAS_COLLECTIONNAMES as a" —out string

could return all objects and their settype it is much better for data administrator to know which kind of settype are using.

 Result object 1: xx7  - example: GreySet
  Result object 2: test3 - Float3D 
  Result object 3: mr1 - GreySet
  Result object 4: xx13 - GreySet
  Result object 5: frank_te13 - RGBSet
  Result object 6: frank_test245 - RGBSet
  Result object 7: x77 - RGBSet
  Result object 8: x35 - RGBSet

comment:4 by Dimitar Misev, 9 years ago

Resolution: invalid
Status: newclosed

I'll close this ticket because it's resolved. Please continue to #134

We need to discuss the last point (returning types along with the collection names), it might be best to send an email on the rasdaman-dev list to start discussion. In my opinion it might be better to have a new virtual collection, RAS_COLLECTIONTYPES.

Note: See TracTickets for help on using tickets.