[Rt-commit] r15903 - in rt/3.8/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Thu Sep 11 03:49:52 EDT 2008
Author: sartak
Date: Thu Sep 11 03:49:51 2008
New Revision: 15903
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/etc/upgrade/schema.mysql-4.0-4.1.pl
Log:
Modified: rt/3.8/trunk/etc/upgrade/schema.mysql-4.0-4.1.pl
==============================================================================
--- rt/3.8/trunk/etc/upgrade/schema.mysql-4.0-4.1.pl (original)
+++ rt/3.8/trunk/etc/upgrade/schema.mysql-4.0-4.1.pl Thu Sep 11 03:49:51 2008
@@ -353,15 +353,14 @@
sub column_byte_length {
my ($table, $column) = @_;
if ( $version >= 5.0 ) {
- my ($char, $octet) = @{ $dbh->selectrow_arrayref(
- "SELECT CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH FROM information_schema.COLUMNS WHERE"
+ return $dbh->selectrow_arrayref(
+ "SELECT CHARACTER_OCTET_LENGTH FROM information_schema.COLUMNS WHERE"
." TABLE_SCHEMA = ". $dbh->quote($db_name)
." AND TABLE_NAME = ". $dbh->quote($table)
." AND COLUMN_NAME = ". $dbh->quote($column)
- ) };
- return $octet if $octet == $char;
+ )->[0];
}
- return $dbh->selectrow_arrayref("SELECT MAX(LENGTH(". $dbh->quote_identifier($column) .")) FROM $table")->[0];
+ return $dbh->selectrow_arrayref("SELECT MAX(LENGTH(". $dbh->quote($column) .")) FROM $table")->[0];
}
sub column_info {
More information about the Rt-commit
mailing list