Skip to content

Commit 6d56330

Browse files
johnjelinekdveeden
authored andcommitted
fix(column_info): use show columns to describe
Resolves this error: `You have an error in your SQL syntax`
1 parent 3c7a6ba commit 6d56330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/DBD/mysql.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ sub column_info {
404404

405405
local $dbh->{FetchHashKeyName} = 'NAME_lc';
406406
# only ignore ER_NO_SUCH_TABLE in internal_execute if issued from here
407-
my $desc_sth = $dbh->prepare("DESCRIBE $table_id " . $dbh->quote($column));
407+
my $desc_sth = $dbh->prepare("SHOW COLUMNS FROM $table_id LIKE " . $dbh->quote($column));
408408
my $desc = $dbh->selectall_arrayref($desc_sth, { Columns=>{} });
409409

410410
#return $desc_sth if $desc_sth->err();

0 commit comments

Comments
 (0)