> + Some arguments in the catalog functions accept B<search patterns> (strings
> + containing '_' and/or '%'), e.g. the C<$table> argument of C<column_info()>.
Running some tests with 'pattern value arguments',
I encountered missing ESCAPE characters in the
implementation of the DBD::Oracle catalog functions.
The attached patch fixes this.
Steffen
*** DBD-Oracle-1.12/Oracle.pm Sat Mar 02 19:38:12 2002
--- Oracle.pm Sun Mar 10 10:31:28 2002
***************
*** 391,400 ****
)
SQL
if ( defined $SchVal ) {
! push @Where, "TABLE_SCHEM LIKE '$SchVal'";
}
if ( defined $TblVal ) {
! push @Where, "TABLE_NAME LIKE '$TblVal'";
}
if ( defined $TypVal ) {
my $table_type_list;
--- 391,400 ----
)
SQL
if ( defined $SchVal ) {
! push @Where, "TABLE_SCHEM LIKE '$SchVal' ESCAPE '\\'";
}
if ( defined $TblVal ) {
! push @Where, "TABLE_NAME LIKE '$TblVal' ESCAPE '\\'";
}
if ( defined $TypVal ) {
my $table_type_list;
***************
*** 626,632 ****
my @BindVals = ();
while ( my ( $k, $v ) = each %$attr ) {
if ( $v ) {
! $Sql .= " AND $k LIKE ?\n";
push @BindVals, $v;
}
}
--- 626,632 ----
my @BindVals = ();
while ( my ( $k, $v ) = each %$attr ) {
if ( $v ) {
! $Sql .= " AND $k LIKE ? ESCAPE '\\'\n";
push @BindVals, $v;
}
}