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

Inconsistency between read-only and read-write modes after dropping a schema #3000

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2012-02-08 16:25:30 +0100
From: Yagiz <<y.kargin>>
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 16871

Date: 2012-02-08 16:25:30 +0100
From: Yagiz <<y.kargin>>

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11
Build Identifier: MonetDB-default

Mclient is used. After creating a schema and tables under it in read-write mode, if you switch to read-only, everything works fine. Then if you switch back to read-write and drop the schema, you are not able to see the tables under it in read-write mode, however you are still able to see them in read-only mode. So the tables of the schema are removed in read-write but not in read-only.

Then if you recreate the schema and tables in read-write mode -- no complains -- the tables in read-write mode become corrupt.

Reproducible: Always

Steps to Reproduce:

  1. Connect with mclient in read-write mode.

  2. sql>CREATE SCHEMA test;

  3. sql>CREATE TABLE test.files (file_id INT, location STRING);

  4. sql>CREATE TABLE test.catalog (file_id INT, seq_no INT, sample_count INT);

  5. sql>DROP SCHEMA test;

  6. sql>\d test.files
    table test.files does not exist (<-- that's good)

  7. go into the read-only mode.

  8. sql>\d test.files (<-- returns the table definition!)
    sql>SELECT * FROM test.catalog;
    3F000!SELECT: no such schema 'test'
    BUG is already there in step 8.

  9. Now repeat steps 1, 2, 3 and 4.

  10. go into the read-only mode.

  11. sql>\d test.files
    table test.files is not unique, corrupt catalog?
    sql>SELECT * FROM test.files;
    +---------+----------+
    | file_id | location |
    +=========+==========+
    +---------+----------+

Actual Results:

Inconsistency between read-only and read-write modes.

Expected Results:

Should have removed the tables from read-only mode too.

MonetDB 5 server v11.8.0 (64-bit, 64-bit oids)
This is an unreleased version
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.12 2011-01-15 (compiled with 8.10)
openssl: OpenSSL 1.0.0e 6 Sep 2011 (compiled with OpenSSL 1.0.0e-fips 6 Sep 2011)
libxml2: 2.7.7 (compiled with 2.7.7)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code -Wp,-D_FORTIFY_SOURCE=2
Linking : /usr/bin/ld -m elf_x86_64

Comment 17216

Date: 2012-05-02 21:44:31 +0200
From: @njnes

fixed, readonly mode now correctly handles the deleted rows.
Could you add a test to the system?

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

Successfully merging a pull request may close this issue.

None yet
1 participant