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

no such table 'queryHistory' #3285

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

no such table 'queryHistory' #3285

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

Comments

@monetdb-team
Copy link

Date: 2013-05-18 01:40:14 +0200
From: Tim H. <<monetdb.bug.reporter>>
To: SQL devs <>
Version: 11.15.7 (Feb2013-SP2)
CC: @mlkersten

Last updated: 2014-02-20 15:02:56 +0100

Comment 18736

Date: 2013-05-18 01:40:14 +0200
From: Tim H. <<monetdb.bug.reporter>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Build Identifier:

When I try to query from sys.queryLog when my current schema is not sys then the query fails with error: no such table 'queryHistory'

Transcript:

[root ~] mclient -d testdb -u monetdb
Database: MonetDB v11.15.8 (unreleased)
auto commit mode: on
sql>create schema my_schema;
operation successful (4.528ms)
sql>set schema my_schema;
auto commit mode: on
sql>select * from sys.queryLog;
SELECT: no such table 'queryhistory'

Reproducible: Always

Steps to Reproduce:

  1. mclient -d dbname -u monetdb
  2. create schema my_schema;
  3. set schema my_schema;
  4. select * from sys.queryLog;

Actual Results:

SELECT: no such table 'queryhistory'

Expected Results:

+----+---------+------+-------+-------+----------+-------+-----------+---------+--------+------+--------+--------+---------+---------+
| id | defined | name | query | parse | optimize | ctime | arguments | execute | result | foot | memory | tuples | inblock | oublock |
+====+=========+======+=======+=======+==========+=======+===========+=========+========+======+========+========+=========+=========+
+----+---------+------+-------+-------+----------+-------+-----------+---------+--------+------+--------+--------+---------+---------+
0 tuples (5.558ms)

Comment 18739

Date: 2013-05-18 02:54:45 +0200
From: @mlkersten

This correct.
In the Feb 2013 release, the queryLog is defined as:

create view queryLog as
select qd.*, ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock, ql.oublock from queryHistory qd, callHistory ql
where qd.id = ql.id;

In this view qd and ql are not qualified by schema name, which means they are resolved the current schema. A patch would be:

create view queryLog as
select qd.*, ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock, ql.oublock from sys.queryHistory qd, sys.callHistory ql
where qd.id = ql.id;

The querylog functionality is changed in the development branch:
http://www.monetdb.org/Documentation/Cookbooks/SQLrecipies/QueryHistoryNew

Comment 19613

Date: 2014-02-20 15:02:56 +0100
From: @sjoerdmullender

Jan2014 has been released.

@monetdb-team monetdb-team added bug Something isn't working minor SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants