any tests that use data_dictionary should call create schema

Bug #522000 reported by Joe Daly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Stewart Smith
Cherry
Fix Released
Medium
Stewart Smith

Bug Description

Any tests that use the data_dictionary should include a block in them to create it. If you run the tests in a different order they will fail in some cases.

--disable_warnings
create schema if not exists data_dictionary;
--enable_warnings

Related branches

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 522000] [NEW] any tests that use data_dictionary should call create schema

On Mon, Feb 15, 2010 at 03:50:12AM -0000, Joe Daly wrote:
> Any tests that use the data_dictionary should include a block in them to
> create it. If you run the tests in a different order they will fail in
> some cases.
>
> --disable_warnings
> create schema if not exists data_dictionary;
> --enable_warnings

I think instead that plugins should be able to say that a db exists.
this solves the information_schema special case, the data_dictionary
special case alongside any other virtual databases that exist.

(i did this ages ago in a long since abandoned branch.. and it worked
great :)
--
Stewart Smith

Revision history for this message
Brian Aker (brianaker) wrote :

Hi!

Table functions will inject schemas in the very near future.

Cheers,
    --Brian

On Feb 14, 2010, at 7:50 PM, Joe Daly <email address hidden> wrote:

> Public bug reported:
>
> Any tests that use the data_dictionary should include a block in
> them to
> create it. If you run the tests in a different order they will fail in
> some cases.
>
> --disable_warnings
> create schema if not exists data_dictionary;
> --enable_warnings
>
> ** Affects: drizzle
> Importance: Undecided
> Status: New
>
> --
> any tests that use data_dictionary should call create schema
> https://bugs.launchpad.net/bugs/522000
> You received this bug notification because you are a member of
> Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> Any tests that use the data_dictionary should include a block in
> them to create it. If you run the tests in a different order they
> will fail in some cases.
>
> --disable_warnings
> create schema if not exists data_dictionary;
> --enable_warnings
>
>

Revision history for this message
Jobin Augustine (jobinau) wrote :

So in effect, we have a schema which does not exists (phantom schema):

drizzle> use data_dictionary;
ERROR 1049 (42000): Unknown database 'data_dictionary'

drizzle> select * from data_dictionary.plugins;
+-----------------------------+-----------------------+-----------+-------------+
| PLUGIN_NAME | PLUGIN_TYPE | IS_ACTIVE | MODULE_NAME |
+-----------------------------+-----------------------+-----------+-------------+
| ARCHIVE | StorageEngine | TRUE | |
| ascii | Function | TRUE | |
| benchmark | Function | TRUE | |
| BLACKHOLE | StorageEngine | TRUE | |
...

does that mean sql command is not checking for the existance of a schema?
or any bypass mechanism is working?

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 522000] Re: any tests that use data_dictionary should call create schema

Hi!

Data_dictionary soon will appear as a schema like any other. The work
for this is in my "schema_engine" patch. I should have this ready to
go in the next day or so.

Cheers,
 -Brian

On Feb 22, 2010, at 1:00 AM, Jobin Augustine wrote:

> So in effect, we have a schema which does not exists (phantom schema):
>
> drizzle> use data_dictionary;
> ERROR 1049 (42000): Unknown database 'data_dictionary'
>
> drizzle> select * from data_dictionary.plugins;
> +-----------------------------+-----------------------+-----------
> +-------------+
> | PLUGIN_NAME | PLUGIN_TYPE | IS_ACTIVE |
> MODULE_NAME |
> +-----------------------------+-----------------------+-----------
> +-------------+
> | ARCHIVE | StorageEngine | TRUE
> | |
> | ascii | Function | TRUE
> | |
> | benchmark | Function | TRUE
> | |
> | BLACKHOLE | StorageEngine | TRUE
> | |
> ...
>
> does that mean sql command is not checking for the existance of a
> schema?
> or any bypass mechanism is working?
>
> --
> any tests that use data_dictionary should call create schema
> https://bugs.launchpad.net/bugs/522000
> You received this bug notification because you are a member of
> Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> Any tests that use the data_dictionary should include a block in
> them to create it. If you run the tests in a different order they
> will fail in some cases.
>
> --disable_warnings
> create schema if not exists data_dictionary;
> --enable_warnings
>
>

Stewart Smith (stewart)
Changed in drizzle:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Stewart Smith (stewart-flamingspork)
milestone: none → 2010-03-29
Revision history for this message
Stewart Smith (stewart) wrote :

I think this is fixed... even though i managed to edit the wrong bug (how, I don't know)

Changed in drizzle:
status: Fix Committed → Fix Released
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.