@@ -23,23 +23,23 @@ eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
2323if ($@ ) {
2424 plan skip_all => " no database connection" ;
2525}
26- plan tests => 115 ;
26+ plan tests => 117 ;
2727
2828ok(defined $dbh , " Connected to database" );
2929
3030ok($dbh -> do(" DROP TABLE IF EXISTS dbd_mysql_t35" ), " making slate clean" );
3131
32- ok($dbh -> do(" CREATE TABLE dbd_mysql_t35 (id INT(4), name VARCHAR(64), name_limit VARCHAR(64))" ), " creating table" );
32+ ok($dbh -> do(" CREATE TABLE dbd_mysql_t35 (id INT(4), name VARCHAR(64), name_limit VARCHAR(64), limit_by VARCHAR(64) )" ), " creating table" );
3333
34- ok(($sth = $dbh -> prepare(" INSERT INTO dbd_mysql_t35 VALUES (?,?,?)" )));
34+ ok(($sth = $dbh -> prepare(" INSERT INTO dbd_mysql_t35 VALUES (?,?,?,? )" )));
3535
3636for my $i (0..99) {
3737 my @chars = grep !/[0O1Iil]/, 0..9, ' A' ..' Z' , ' a' ..' z' ;
3838 my $random_chars = join ' ' , map { $chars [rand @chars ] } 0 .. 16;
3939
4040 # save these values for later testing
4141 $testInsertVals -> {$i } = $random_chars ;
42- ok(($rows = $sth -> execute($i , $random_chars , $random_chars )));
42+ ok(($rows = $sth -> execute($i , $random_chars , $random_chars , $random_chars )));
4343}
4444
4545ok($sth = $dbh -> prepare(" SELECT * FROM dbd_mysql_t35 LIMIT ?, ?" ),
@@ -53,6 +53,11 @@ ok( (defined($array_ref = $sth->fetchall_arrayref) &&
5353
5454ok(@$array_ref == 50);
5555
56+ ok($sth = $dbh -> prepare(" SELECT * FROM dbd_mysql_t35 WHERE limit_by > ?" ),
57+ " testing prepare of select statement with started by 'limit' column" );
58+
59+ ok($sth -> execute(" foobar" ), ' testing exec of bind vars for placeholder' );
60+
5661ok($sth -> finish);
5762
5863ok($dbh -> do(" UPDATE dbd_mysql_t35 SET name_limit = ? WHERE id = ?" , undef , " updated_string" , 1));
0 commit comments