Opened 5 years ago

Closed 5 years ago

#2282 closed defect (fixed)

wrong axes names persisted in RASBASE in INSERT statement

Reported by: Vlad Merticariu Owned by: apercov
Priority: major Milestone: 10.0
Component: undecided Version: 9.8
Keywords: Cc: apercov, Dimitar Misev
Complexity: Medium

Description

The mdd type contains named axes (by default for 2D these are x,y). In insert statements, when a new mdd is saved, instead of persisting its domain with the axes names from the type definition (mddbasetype), d0, d1,…, dn are used instead.

To reproduce: start with a clean RASBASE, open the sqlite3 console (sqlite3 /path/to/RASBASE), and execute:

select * from RAS_DOMAINVALUES;

Output:

...
36|0|||x
36|1|||y
37|0|||x
37|1|||y

You will already see the domains of the types, last column being the axis name (x, y etc).

Create a new collection of type GreySet, then insert an array into it.

rasql --user rasadmin --passwd rasadmin -q 'create collection test GreySet'
rasql --user rasadmin --passwd rasadmin -q 'insert into test values marray x in [0:100,0:100] values 1c'

Check again the RAS_DOMAINVALUES tables in RASBASE:

select * from RAS_DOMAINVALUES;

Output:

...
36|0|||x
36|1|||y
37|0|||x
37|1|||y
38|0|0|100|d0
38|1|0|100|d1
39|0|0||d0
39|1|0||d1

You can see that d0 and d1 are used as axes names, even though x,y were used in the type definition.

Change History (2)

comment:1 by apercov, 5 years ago

Owner: changed from dkamov to apercov
Status: assignedaccepted

comment:2 by apercov, 5 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.