diff options
author | lpsolit%gmail.com <> | 2008-08-27 22:19:58 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-08-27 22:19:58 +0200 |
commit | 745f9e658a8e4d26bfd250b263132b25ab60e173 (patch) | |
tree | 42edcc9a4f45604c457a7d53136645d636c7df37 /Bugzilla/Install/DB.pm | |
parent | 75e8ed221770ed75e075dba4c652132c0d7674f3 (diff) | |
download | bugzilla-745f9e658a8e4d26bfd250b263132b25ab60e173.tar.gz bugzilla-745f9e658a8e4d26bfd250b263132b25ab60e173.tar.xz |
Bug 450379: Searching SQL for candidates to truncate short_desc (> 255 chars) should use CHAR_LENGTH - Patch by A.A. Shimono (himorin) <shimono@mozilla.gr.jp> and Xiaoou <xiaoou.wu@oracle.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r-- | Bugzilla/Install/DB.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 561dc0850..218ea093f 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -2623,7 +2623,7 @@ sub _change_short_desc_from_mediumtext_to_varchar { # and then truncate the summary. my $long_summary_bugs = $dbh->selectall_arrayref( 'SELECT bug_id, short_desc, reporter - FROM bugs WHERE LENGTH(short_desc) > 255'); + FROM bugs WHERE CHAR_LENGTH(short_desc) > 255'); if (@$long_summary_bugs) { print <<EOT; @@ -2979,7 +2979,7 @@ sub _check_content_length { my $dbh = Bugzilla->dbh; my %contents = @{ $dbh->selectcol_arrayref( "SELECT $id_field, $field_name FROM $table_name - WHERE LENGTH($field_name) > ?", {Columns=>[1,2]}, $max_length) }; + WHERE CHAR_LENGTH($field_name) > ?", {Columns=>[1,2]}, $max_length) }; if (scalar keys %contents) { print install_string('install_data_too_long', |