← Back to team overview

randgen team mailing list archive

Re: [Branch ~randgen/randgen/rqg2] Rev 531: Patch to Gendata.pm to removethe CHECKSUM=1 for CREATE TABLE statements generated for Drizzle se...

 

Patrick,

Sorry about that -- I will keep in mind that the RQG uses the same SQL for
Drizzle and you guys are likely to keep removing features and options.

What you may wish to do is a few unit tests that check the basic RQG
functionality with Drizzle. As a starting point, you can take the ones Bernt
has created for MySQL, located in unit/. Your tests can expect that the
RQG_DRIZZLE_BASE env variable points to a working drizzle installation. Once
we have that, I will set this variable on my machine and Bernt can also set
it on his Hudson setup, so that your unit tests can run and provide easier
regression testing so that my changes do not break your things.

Philip Stoev

----- Original Message ----- From: <noreply@xxxxxxxxxxxxx>
To: "Philip Stoev" <philip@xxxxxxxxx>
Sent: Tuesday, September 07, 2010 11:33 PM
Subject: [Branch ~randgen/randgen/rqg2] Rev 531: Patch to Gendata.pm to
removethe CHECKSUM=1 for CREATE TABLE statements generated for Drizzle se...


------------------------------------------------------------
revno: 531
committer: Patrick Crews <gleebix@xxxxxxxxx>
branch nick: randgen
timestamp: Tue 2010-09-07 16:31:28 -0400
message:
 Patch to Gendata.pm to remove the CHECKSUM=1 for CREATE TABLE statements
generated for Drizzle servers.  Otherwise we get errors
modified:
 lib/GenTest/App/Gendata.pm


--
lp:randgen
https://code.launchpad.net/~randgen/randgen/rqg2

You are subscribed to branch lp:randgen.
To unsubscribe from this branch go to
https://code.launchpad.net/~randgen/randgen/rqg2/+edit-subscription



--------------------------------------------------------------------------------


=== modified file 'lib/GenTest/App/Gendata.pm'
--- lib/GenTest/App/Gendata.pm 2010-09-06 09:31:06 +0000
+++ lib/GenTest/App/Gendata.pm 2010-09-07 20:31:28 +0000
@@ -437,8 +437,15 @@
        }

        my $index_sqls = $#index_fields > -1 ? join(",\n", map {
$_->[FIELD_INDEX_SQL] } @index_fields) : undef;
-
-        $executor->execute("CREATE TABLE `$table->[TABLE_NAME]`
(\n".join(",\n/*Indices*/\n", grep { defined $_ } (@field_sqls,
$index_sqls) ).") $table->[TABLE_SQL] /*! CHECKSUM=1 */");
+        # The use of CHECKSUM=1 isn't working for Drizzle, so we do a check
and set the string accordingly:
+        my $checksum_string = '';
+        if ($executor->type() != DB_DRIZZLE)
+          {
+          $checksum_string = "/*! CHECKSUM=1 */";
+          }
+
+
+        $executor->execute("CREATE TABLE `$table->[TABLE_NAME]`
(\n".join(",\n/*Indices*/\n", grep { defined $_ } (@field_sqls,
$index_sqls) ).") $table->[TABLE_SQL] $checksum_string");

        if (not ($executor->type() == DB_MYSQL ||
                 $executor->type() == DB_DRIZZLE)) {