Re: column_info in mysql.pm 2.9002

Re: column_info in mysql.pm 2.9002

am 12.01.2004 20:22:08 von Jochen Wiedmann

Forwarded to perl@lists.mysql.com, in order to read Rudy Lippan, the current
maintainer.


Michael Bernstein wrote:

> Jochen,
>
> Looking at the code in mysql.pm:
>
> sub column_info {
> my ($dbh, $catalog, $schema, $table, $column) = @_;
> return $dbh->set_err(1, "column_info doesn't support table wildcard")
> if $table !~ /^\w+$/;
> return $dbh->set_err(1, "column_info doesn't support column selection")
> if $column ne "%";
>
> It seems that the first test (for table wildcard) should allow
> the '.' character as well as the character class \w, because
> SQL syntax allows table names to be specified .


>
> Thanks!
>
> Michael Bernstein
>
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: column_info in mysql.pm 2.9002

am 21.01.2004 04:07:28 von Rudy Lippan

On Mon, 12 Jan 2004, Jochen Wiedmann wrote:
> Forwarded to perl@lists.mysql.com, in order to read Rudy Lippan, the current
> maintainer.
> Michael Bernstein wrote:
>
> > Jochen,
> >
> > Looking at the code in mysql.pm:
> >
> > sub column_info {
> > my ($dbh, $catalog, $schema, $table, $column) = @_;
> > return $dbh->set_err(1, "column_info doesn't support table wildcard")
> > if $table !~ /^\w+$/;
> > return $dbh->set_err(1, "column_info doesn't support column selection")
> > if $column ne "%";
> >
> > It seems that the first test (for table wildcard) should allow
> > the '.' character as well as the character class \w, because
> > SQL syntax allows table names to be specified .



The test is wrong, but not because it does not allow .
,
but rather because it does not allow quoted identifiers (eg. A table name
like "This is my. Quoted table name!"). SQL allows you to specify a table
like ..
. I don't have a copy of the SQL99 spec
handy, but IIRC, the catalog is what MySQL calls a database.

I have noted the problem and I will fold in a fix in the next version. If
you have any questions, feel free to email me.

Rudy.


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: column_info in mysql.pm 2.9002

am 21.01.2004 04:07:28 von Rudy Lippan

On Mon, 12 Jan 2004, Jochen Wiedmann wrote:
> Forwarded to perl@lists.mysql.com, in order to read Rudy Lippan, the current
> maintainer.
> Michael Bernstein wrote:
>
> > Jochen,
> >
> > Looking at the code in mysql.pm:
> >
> > sub column_info {
> > my ($dbh, $catalog, $schema, $table, $column) = @_;
> > return $dbh->set_err(1, "column_info doesn't support table wildcard")
> > if $table !~ /^\w+$/;
> > return $dbh->set_err(1, "column_info doesn't support column selection")
> > if $column ne "%";
> >
> > It seems that the first test (for table wildcard) should allow
> > the '.' character as well as the character class \w, because
> > SQL syntax allows table names to be specified .



The test is wrong, but not because it does not allow .
,
but rather because it does not allow quoted identifiers (eg. A table name
like "This is my. Quoted table name!"). SQL allows you to specify a table
like ..
. I don't have a copy of the SQL99 spec
handy, but IIRC, the catalog is what MySQL calls a database.

I have noted the problem and I will fold in a fix in the next version. If
you have any questions, feel free to email me.

Rudy.


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org