Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database upgrade from Dec2011 to Apr2012 broken for storage() #3072

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Database upgrade from Dec2011 to Apr2012 broken for storage() #3072

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

Date: 2012-04-26 21:43:22 +0200
From: @drstmane
To: SQL devs <>
Version: 11.9.1 (Apr2012) [obsolete]
CC: @mlkersten

Last updated: 2012-05-25 12:58:48 +0200

Comment 17163

Date: 2012-04-26 21:43:22 +0200
From: @drstmane

storage() does not work in Apr2012, as sql.storage() has grown an extra return argument sorted:bat[:oid,:bit].

Apr2012:

sql>select * from storage();
TypeException:user.s1_1[5]:'sql.storage' undefined in: (_7:bat[:oid,:str], _8:bat[:oid,:str], _9:bat[:oid,:str], _10:bat[:oid,:str], _11:bat[:oid,:lng], _12:bat[:oid,:lng], _13:bat[:oid,:int], _14:bat[:oid,:lng], _15:bat[:oid,:lng]) := sql.storage()
39000!program contains errors

mal>?sql.storage()
pattern sql.storage() (schema:bat[:oid,:str],table:bat[:oid,:str],column:bat[:oid,:str],location:bat[:oid,:str],count:bat[:oid,:lng],capacity:bat[:oid,:lng],width:bat[:oid,:int],size:bat[:oid,:lng],hashsize:bat[:oid,:lng],sorted:bat[:oid,:bit])
address sql_storage;
comment return a table with storage information

Dec2011:

mal>?sql.storage()
pattern sql.storage() (schema:bat[:oid,:str],table:bat[:oid,:str],column:bat[:oid,:str],location:bat[:oid,:str],count:bat[:oid,:lng],capacity:bat[:oid,:lng],width:bat[:oid,:int],size:bat[:oid,:lng],hashsize:bat[:oid,:lng])
address sql_storage;
comment return a table with storage information

Comment 17165

Date: 2012-04-26 22:03:21 +0200
From: @mlkersten

It works on current.
You have to redefine the storage() definition on an existing database.

mk@vienna::/export/scratch1/mk/current/package/sql/backends/monet5/datacell/Tests> mclient -d sf1
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.10.0 (unreleased), 'mapi:monetdb://vienna.ins.cwi.nl:50000/sf1'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>select * from storage();
+--------+-----------------+----------------------+----------+---------+----------+-------+-----------+----------+--------+
| schema | table | column | location | count | capacity | width | size | hashsize | sorted |
+========+=================+======================+==========+=========+==========+=======+===========+==========+========+
| sys | schemas | id | 01/114 | 3 | 1024 | 4 | 4096 | 0 | true |
| sys | schemas | name | 01/112 | 3 | 256 | 1 | 10496 | 0 | false |
| sys | schemas | authorization | 01/115 | 3 | 256 | 4 | 1024 | 0 | true |
| sys | schemas | owner | 01/116 | 3 | 256 | 4 | 1024 | 0 | true |

Comment 17166

Date: 2012-04-26 22:34:54 +0200
From: @drstmane

Indeed, on freshly created databases, storage() works fine with Dec2011-SP2, Apr2012_1 (release candidate), and latest Apr2012 (changeset 702b55cbad26).
However, after upgrading a Dec2011-SP2 (or earlier) created database to Apr2012, the automatic upgrade does not update the definition of SQL function storage() to reflect the signature change of MAL function sql.storage().

Comment 17179

Date: 2012-04-27 10:31:15 +0200
From: @sjoerdmullender

Changeset 98699895d8d4 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=98699895d8d4

Changeset description:

Further update to database schema when upgrading to Apr2012 release.
This fixes bug #3072.

Comment 17192

Date: 2012-04-27 15:58:09 +0200
From: @sjoerdmullender

Fixed for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants