"Table %s doesn't exist" error when trying to test a query

Bug #1424136 reported by Calvin Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Random Query Generator
Invalid
Undecided
Unassigned

Bug Description

OS: Ubuntu 14.04.1 LTS
Perl v5.18.2
DBD::mysql version: 4.025
mysql version: 5.6.22

Hi, I'm new to using RQG, and while using gentest with one of the example grammars,

perl ~/project/randgen/gentest.pl \
        --queries=1 \
        --threads=1 \
        --seed=10 \
        --reporters='' \
        --dsn=dbi:mysql:host=127.0.0.1:port=19300:user=root:database=test \
        --grammar=conf/optimizer/optimizer_no_subquery.yy \

I got the following error in the query:

# 2015-02-20T23:00:27 Starting: /home/calli/project/randgen/gentest.pl --queries=1 --threads=1 --seed=10 --reporters= --dsn=dbi:mysql:host=127.0.0.1:port=19300:user=root:database=test --grammar=conf/optimizer/optimizer_no_subquery.yy
# 2015-02-20T23:00:27 -------------------------------
# 2015-02-20T23:00:27 Configuration
# 2015-02-20T23:00:27 debug_server => ['']
# 2015-02-20T23:00:27 dsn => ['dbi:mysql:host=127.0.0.1:port=19300:user=root:database=test']
# 2015-02-20T23:00:27 duration => 3600
# 2015-02-20T23:00:27 generator => FromGrammar
# 2015-02-20T23:00:27 grammar => conf/optimizer/optimizer_no_subquery.yy
# 2015-02-20T23:00:27 queries => 1
# 2015-02-20T23:00:27 reporters => ['']
# 2015-02-20T23:00:27 seed => 10
# 2015-02-20T23:00:27 threads => 1
# 2015-02-20T23:00:27 transformers => ['']
# 2015-02-20T23:00:27 validators => ['']
# 2015-02-20T23:00:27 views => ['', '']
# 2015-02-20T23:00:27 Reporters: (none)
# 2015-02-20T23:00:27 Validators: ErrorMessageCorruption
# 2015-02-20T23:00:27 Caching schema metadata for dbi:mysql:host=127.0.0.1:port=19300:user=root:database=test
# 2015-02-20T23:00:27 Starting 1 processes, 1 queries each, duration 3600 seconds.
# 2015-02-20T23:00:27 GenTest::ErrorFilter(27207) started
# 2015-02-20T23:00:27 Loading Validator GenTest::Validator::ErrorMessageCorruption.
 SELECT DISTINCT SUM( alias2 . `col_varchar_key` ) AS field1 FROM ( B AS alias1 , ( view_CC AS alias2 , A AS alias3 ) ) WHERE alias2 . `pk` = alias1 . `pk` ORDER BY field1 , alias1 . `col_date_key` ASC
# 2015-02-20T23:00:27 Child worker process completed successfully.
# 2015-02-20T23:00:27 Query: SELECT DISTINCT SUM( alias2 . `col_varchar_key` ) AS field1 FROM ( B AS alias1 , ( view_CC AS alias2 , A AS alias3 ) ) WHERE alias2 . `pk` = alias1 . `pk` ORDER BY field1 , alias1 . `col_date_key` ASC failed: 1146 Table '%s' doesn't exist. Further errors of this kind will be suppressed.
# 2015-02-20T23:00:27 Started periodic reporting process...
# 2015-02-20T23:00:28 Killing periodic reporting process with pid 27208...
# 2015-02-20T23:00:28 Kill GenTest::ErrorFilter(27207)
# 2015-02-20T23:00:28 Test completed successfully.

I'm using the database generated by runall.pl.

The error message says table '%s' rather than a specific table. Is that supposed to happen? If it is, how should I resolve the error?

Thanks!

Revision history for this message
Patrick Crews (patrick-crews) wrote :

You must also invoke the random data generator, either before the test, or as a part of the call to runall.pl (which I do not see in the examples you have provided):
$ perl runall.pl \
   --basedir=/path/to/mysql/basedir \
   --gendata=conf/example.zz \ #<--- specifying which file gendata (the data generator) should use to prep for the test
   --grammar=conf/example.yy

Most test grammars are designed to run with a specific gendata file / test bed. The files are usually named or contain comments to indicate which files go together

https://github.com/RQG/RQG-Documentation/wiki/RandomDataGenerator

I hope this helps.

Changed in randgen:
status: New → Invalid
Revision history for this message
Patrick Crews (patrick-crews) wrote :

You might also do a 'SHOW TABLES IN test' command / mysqldump / various SELECT queries to see what test data exists in your system

Revision history for this message
Calvin Li (calli-b) wrote :

fixed it, I was using the wrong zz file.
Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.