drizzled/message/schema_writer.cc results differ from native CREATE SCHEMA statements

Bug #618295 reported by Patrick Crews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Andrew Hutchings
7.0
Fix Released
Medium
Andrew Hutchings

Bug Description

test main.flush_block_commit test shows differing results depending on whether or not it is run via make test or from the /tests directory:

main.flush_block_commit [ fail ]
--- /tests/r/flush_block_commit.result 2010-08-15 17:17:01.248790000 +0300
+++ /tests/r/flush_block_commit.reject 2010-08-15 20:16:44.840409006 +0300
@@ -35,5 +35,5 @@
 10
 show create database test;
 Database Create Database
-test CREATE DATABASE `test` COLLATE = utf8_general_ci
+test CREATE DATABASE `test`
 drop table t1;

If the test is run via make test, the collation information is shown in SHOW CREATE DATABASE.
If the test is run from /tests (./test-run flush_block_commit), it does not.

This is quite odd.

Related branches

Changed in drizzle:
assignee: nobody → Patrick Crews (patrick-crews)
Revision history for this message
Patrick Crews (patrick-crews) wrote :

Other tests are failing in this manner - we need to sort this out so we don't confuse / annoy anybody who is trying to run our tests

Changed in drizzle:
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Patrick Crews (patrick-crews) wrote :

This is a bug in drizzled/message/schema_writer.cc, most likely.

This is the file that test-run.pl calls for creating the initial vardir/datadir when executing tests and results in no COLLATE information being present in SHOW CREATE DATABASE|SCHEMA statements:

To repeat, record this test case and check out the .result file:
SHOW CREATE DATABASE test;
DROP DATABASE test;
CREATE DATABASE test;
SHOW CREATE DATABASE test;

.result output

SHOW CREATE DATABASE test;

Database Create Database
test CREATE DATABASE `test`

DROP DATABASE test;
CREATE DATABASE test;

SHOW CREATE DATABASE test;

Database Create Database
test CREATE DATABASE `test` COLLATE = utf8_general_ci

NOTE how there is no COLLATE info in the initial SHOW CREATE output - the test db in this case was created via schema_writer.cc

From looking in the schema_writer.cc code, there are only a few values being set for the schema.

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

Not sure yet if this is related to jp failures we are seeing:
Via make test-jp and ./test-run --suite=jp, we see the following class of diff:

jp.jp_enum_utf8 [ fail ]
--- .././tests/suite/jp/r/jp_enum_utf8.result 2010-08-30 18:26:44.731873000 +0300
+++ .././tests/suite/jp/r/jp_enum_utf8.reject 2010-08-31 00:29:02.190413817 +0300
@@ -78,55 +78,55 @@
 T1 CREATE TABLE `t1` (
   `C1` enum('ア','イ','ウ') DEFAULT NULL,
   KEY `C1` (`C1`)
-) ENGINE=InnoDB
+) ENGINE=InnoDB COLLATE = utf8_general_ci

The expected results do not expect to see any COLLATE info for the tables, however, this should not be as we should ALWAYS show COLLATE info.

Will update this bug if this is the case or will open a new bug and link it here pending further investigation.

summary: - flush_block_commit test shows differing results between make test and
- being run from the /tests directory
+ drizzled/message/schema_writer.cc results differ from native CREATE
+ SCHEMA statements
Changed in drizzle:
assignee: Patrick Crews (patrick-crews) → Andrew Hutchings (linuxjedi)
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Note to self:

Fix is to add something like:
schema_message.set_collation(default_charset_info->name);

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