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

fresh database contains UDF functions #2666

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

fresh database contains UDF functions #2666

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working major SQL

Comments

@monetdb-team
Copy link

Date: 2010-09-08 11:27:32 +0200
From: @grobian
To: SQL devs <>
Version: 2.40.1 (Oct2010) [obsolete]

Blocker for: #2665
Last updated: 2010-11-15 09:39:07 +0100

Comment 14885

Date: 2010-09-08 11:27:32 +0200
From: @grobian

A newly created database contains UDF functions by default. These are dumped by msqldump, which in turn then conflict with the already existing same named functions upon a restore.

UDF functions that are created by initialisation scripts should somehow make them part of the system catalog, such that they remain invisible.

Comment 14890

Date: 2010-09-09 09:38:02 +0200
From: @sjoerdmullender

I'm planning to add a new Boolean column called system to the functions table. The default value will be false, but it will be set true to all functions that exist in the table when the column is added at the end of the createdb script.

Comment 14891

Date: 2010-09-09 11:45:46 +0200
From: @sjoerdmullender

I'm hitting a snag: when the server restarts with an existing database, the system tables are recreated, but the code doing that doesn't know anything about the added column.
Perhaps we need to go to plan B: add an extra (system) table that contains the names of all system functions.

Comment 14893

Date: 2010-09-09 14:14:54 +0200
From: @sjoerdmullender

Changeset ecd7ad5a7094 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=ecd7ad5a7094

Changeset description:

Don't dump system-created User-defined Functions.
This fixes bug #2666.
The fix is to create a new table, called systemfunctions, which
contains the IDs of all system functions.  Dump will first check
whether the table exists (if it doesn't, it will use the old way of
dumping), and then not dump any functions that are mentioned in the
table.
The table is created and filled at the end of the createdb.sql script.

Comment 14895

Date: 2010-09-09 16:00:35 +0200
From: @sjoerdmullender

The UDF functions that exist in a newly created database are no longer dumped.
There is a test that tests dump on an empty database.
I.e., I consider this bug fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major SQL
Projects
None yet
Development

No branches or pull requests

2 participants