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

mclient does not properly double quote schema names when using autofill tab #3387

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: 2013-10-16 21:28:14 +0200
From: @bartscheers
To: clients devs <>
Version: 11.15.17 (Feb2013-SP5)

Last updated: 2013-12-03 13:59:33 +0100

Comment 19279

Date: 2013-10-16 21:28:14 +0200
From: @bartscheers

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Firefox/24.0
Build Identifier:

When my schema name is SP5_db, I can query tables without a prefix, but when I use SP5.table it responds with: "no such schema 'sp5_db'". Note the lower case conversion.

Reproducible: Always

Steps to Reproduce:

  1. create new db by running ./prep.sh
  2. create schema by running mclient -dSP5_db < prep.sql
  3. create table "version" by running mclient -dSP5_db -uSP5_db < version.sql
  4. mclient -dSP5_db -uSP5_db
  5. sql>select * from SP5_db.version ;

Actual Results:

SELECT: no such schema 'sp5_db'

Expected Results:

Same as without prefix:

sql>select * from version;
+----------+-------+
| name | value |
+==========+=======+
| revision | 1 |
+----------+-------+

Comment 19280

Date: 2013-10-16 21:31:52 +0200
From: @sjoerdmullender

You need to use double quotes to protect the server from mapping upper and lower case to each other:
select * from "SP5_db".version ;

If this for some reason also doesn't work, you can reopen this bug report.

Comment 19281

Date: 2013-10-16 21:37:41 +0200
From: @bartscheers

Yes, quotes do work.

But I use the tab autofill in mclient, and SP5_db is generated without quotes by server or mclient.

select * from vers

becomes:

select * from SP5_db.version;

Comment 19282

Date: 2013-10-16 21:40:24 +0200
From: @sjoerdmullender

Why didn't you say so in the first place! ;-)

So the bug is that mclient should properly quote names it fills in.

Comment 19294

Date: 2013-10-22 14:19:02 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

Quote schema and table name generated by TAB completion.
This fixes bug #3387.

Comment 19295

Date: 2013-10-22 14:19:26 +0200
From: @sjoerdmullender

Fixed.

Comment 19378

Date: 2013-12-03 13:59:33 +0100
From: @sjoerdmullender

Feb2013-SP6 has been released.

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