[Codestriker-commits] CVS update: codestriker/lib/Codestriker/DB Database.pm MySQL.pm
Brought to you by:
sits
|
From: <si...@us...> - 2008-01-13 04:25:35
|
User: sits
Date: 08/01/12 20:25:34
Modified: bin install.pl
lib/Codestriker/DB Database.pm MySQL.pm
Log:
Support larger text sizes under MySQL
Index: install.pl
===================================================================
RCS file: /cvsroot/codestriker/codestriker/bin/install.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- install.pl 9 Jan 2008 06:16:05 -0000 1.13
+++ install.pl 13 Jan 2008 04:25:33 -0000 1.14
@@ -675,7 +675,7 @@
$database->add_field('project', 'state', $INT16);
# If we are using MySQL, and we are upgrading from a version of the database
-# which used "text" instead of "mediumtext" for certain fields, update the
+# which used "text" instead of "longtext" for certain fields, update the
# appropriate table columns.
if ($Codestriker::db =~ /^DBI:mysql/i) {
# Check that document field in topic is up-to-date.
Index: Database.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/DB/Database.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Database.pm 7 Aug 2006 02:14:48 -0000 1.10
+++ Database.pm 13 Jan 2008 04:25:34 -0000 1.11
@@ -64,6 +64,9 @@
RaiseError=>$raise_error,
LongReadLen=>10240000});
+ # To see debugging from the DBI driver.
+ # $self->{dbh}->{TraceLevel} = 1;
+
# Return the new connection.
return $self->{dbh};
}
Index: MySQL.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/DB/MySQL.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MySQL.pm 10 Jun 2006 07:45:30 -0000 1.8
+++ MySQL.pm 13 Jan 2008 04:25:34 -0000 1.9
@@ -18,7 +18,7 @@
# Type mappings.
my $_TYPE = {
- $Codestriker::DB::Column::TYPE->{TEXT} => "mediumtext",
+ $Codestriker::DB::Column::TYPE->{TEXT} => "longtext",
$Codestriker::DB::Column::TYPE->{VARCHAR} => "varchar",
$Codestriker::DB::Column::TYPE->{INT32} => "int",
$Codestriker::DB::Column::TYPE->{INT16} => "smallint",
@@ -56,6 +56,7 @@
$dbh->do("SET NAMES 'utf8'");
$dbh->do("SET character_set_results='utf8'");
}
+ $dbh->do("SET max_allowed_packet=128000000");
return $dbh;
}
|