randgen team mailing list archive
-
randgen team
-
Mailing list archive
-
Message #00191
[Merge] lp:~patrick-crews/randgen/bug961630 into lp:randgen
Patrick Crews has proposed merging lp:~patrick-crews/randgen/bug961630 into lp:randgen.
Requested reviews:
Random Query Generator Team (randgen)
Related bugs:
Bug #961630 in Random Query Generator: "inconsistent table name quoting by the random data generator"
https://bugs.launchpad.net/randgen/+bug/961630
For more details, see:
https://code.launchpad.net/~patrick-crews/randgen/bug961630/+merge/98731
Updated GenData.pm to ensure we consistently quote table names during the main gendata operations.
--
https://code.launchpad.net/~patrick-crews/randgen/bug961630/+merge/98731
Your team Random Query Generator Team is requested to review the proposed merge of lp:~patrick-crews/randgen/bug961630 into lp:randgen.
=== modified file 'lib/GenTest/App/Gendata.pm'
--- lib/GenTest/App/Gendata.pm 2011-11-15 08:18:12 +0000
+++ lib/GenTest/App/Gendata.pm 2012-03-21 20:56:19 +0000
@@ -449,7 +449,7 @@
$prng->shuffleArray(\@fields_copy);
- $executor->execute("DROP TABLE /*! IF EXISTS*/ $table->[TABLE_NAME]");
+ $executor->execute("DROP TABLE /*! IF EXISTS*/ `$table->[TABLE_NAME]`");
# Compose the CREATE TABLE statement by joining all fields and indexes and appending the table options
@@ -587,7 +587,7 @@
(($row_id % 50) == 0) ||
($row_id == $table->[TABLE_ROW])
) {
- my $insert_result = $executor->execute("INSERT /*! IGNORE */ INTO $table->[TABLE_NAME] VALUES ".join(', ', @row_buffer));
+ my $insert_result = $executor->execute("INSERT /*! IGNORE */ INTO `$table->[TABLE_NAME]` VALUES ".join(', ', @row_buffer));
return $insert_result->status() if $insert_result->status() >= STATUS_CRITICAL_FAILURE;
@row_buffer = ();
}