Author: timbo
Date: Wed May  2 03:30:21 2007
New Revision: 9490

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.pm
   dbi/trunk/ex/perl_dbi_nulls_test.pl

Log:
Changed ex/perl_dbi_nulls_test.pl to be more descriptive


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Wed May  2 03:30:21 2007
@@ -39,7 +39,7 @@
 Add trace modules that just records the last N trace messages into an array
 and prepends them to any error message.
 
-=head2 Changes in DBI 1.55 (svn rev 9465),  27th April 2007
+=head2 Changes in DBI 1.55 (svn rev 9480),  1st May 2007
 
   Fixed set_err() so HandleSetErr hook is executed reliably, if set.
   Fixed accuracy of profiling when perl configured to use long doubles.
@@ -60,6 +60,7 @@
   Changed DBD::NullP to be slightly more useful for testing.
   Changed File::Spec prerequisite to not require a minimum version.
   Changed tests to work with other DBMs thanks to ZMAN.
+  Changed ex/perl_dbi_nulls_test.pl to be more descriptive.
 
   Added more functionality to the (undocumented) Callback mechanism.
     Callbacks can now elect to provide a value to be returned, in which case

Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Wed May  2 03:30:21 2007
@@ -3808,8 +3808,11 @@
 =item C<ReadOnly> (boolean, inherited)
 
 An application can set the C<ReadOnly> attribute of a handle to a true value to
-indicate that it will not be attempting to make any changes (insert, delete,
-update etc) using that handle or any children of it.
+indicate that it will not be attempting to make any changes using that handle
+or any children of it.
+
+Note that the exact definition of 'read only' is rather fuzzy.
+For more details see the documentation for the driver you're using.
 
 If the driver can make the handle truly read-only (by issuing a statement like
 "C<set transaction read only>" as needed, for example) then it should.
@@ -3822,7 +3825,7 @@
 For example, the DBD::Gofer driver considers the C<ReadOnly> attribute when
 making a decison about whether to retry an operation that failed.
 
-The attribute should be set to 1 or 0. (Other values are reserved.)
+The attribute should be set to 1 or 0 (or undef). Other values are reserved.
 
 =item C<private_your_module_name_*>
 

Modified: dbi/trunk/ex/perl_dbi_nulls_test.pl
==============================================================================
--- dbi/trunk/ex/perl_dbi_nulls_test.pl (original)
+++ dbi/trunk/ex/perl_dbi_nulls_test.pl Wed May  2 03:30:21 2007
@@ -102,7 +102,7 @@
 for my $i (0..$#char_column_values)
 {
     my $val = $char_column_values[$i];
-    printf "Inserting values (%d, %s)\n", $i+1, $dbh->quote($val);
+    printf "   Inserting values (%d, %s)\n", $i+1, $dbh->quote($val);
     $sth->execute($i+1, $val);
 }
 print "(Driver bug: statement handle should not be Active after an INSERT.)\n"
@@ -113,17 +113,19 @@
 for my $i (0..$#select_clauses)
 {
     my $sel = $select_clauses[$i];
-    print "\n=> Testing clause style $i: ".$sel->{clause}." to match $marge\n";
+    print "\n=> Testing clause style $i: ".$sel->{clause}."...\n";
     
     $sth = $dbh->prepare("SELECT myid,mycol FROM $tablename ".$sel->{clause})
        or next;
 
+    print "   Selecting row with $marge\n";
     $sth->execute(@{$sel->{nonnull}})
        or next;
     my $r1 = $sth->fetchall_arrayref();
     my $n1_rows = $sth->rows;
     my $n1 = @$r1;
     
+    print "   Selecting rows with NULL\n";
     $sth->execute(@{$sel->{null}})
        or next;
     my $r2 = $sth->fetchall_arrayref();
@@ -152,21 +154,23 @@
       print "=> WHERE clause style $i returned incorrect results.\n";
       if ($n1 > 0 || $n2 > 0)
       {
-        print "    Non-NULL test rows returned these row ids: ".
+        print "   Non-NULL test rows returned these row ids: ".
             join(", ", map { $r1->[$_][0] } (0..$#{$r1}))."\n";
-        print "    The NULL test rows returned these row ids: ".
-            join(", ", map { $r2->[$_][0] } (0..$#{$r1}))."\n";
+        print "   The NULL test rows returned these row ids: ".
+            join(", ", map { $r2->[$_][0] } (0..$#{$r2}))."\n";
       }
     }
 }
 
 $dbh->disconnect();
-
-printf "\n%d styles are supported $tag:\n", scalar @ok;
+print "\n";
+print "-" x 72, "\n";
+printf "%d styles are supported:\n", scalar @ok;
 print "$_\n" for @ok;
+print "-" x 72, "\n";
 print "\n";
 print "If these results don't match what's in the 'Placeholders and Bind 
Values'\n";
-print "section of the DBI documentation, or are for a database that not 
already listed,\n";
-print "please email the results to [EMAIL PROTECTED] Thank you.\n";
+print "section of the DBI documentation, or are for a database that not 
already\n";
+print "listed, please email the results to [EMAIL PROTECTED] Thank you.\n";
 
 exit 0;

Reply via email to