[geeklog-devel] [geeklog-cvs] Geeklog-1.x/public_html lib-common.php, 1.675, 1.676 usersettings.php, 1.167, 1.168

Michael Jervis mjervis at gmail.com
Sat Feb 16 03:30:44 EST 2008


>  Of course in MSSQL this was always a problem and this fix is mySQL specific.
>
>  CREATE TABLE [dbo].[{$_TABLES['blocks']}] (
>      [bid] [numeric](5, 0) IDENTITY (1, 1) NOT NULL ,
>  ...
>      [content] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

Well I'd say that my fix is correct and the SQL Server implementation
is wrong. If the MySQL field is 65k of characters, then having a 5000
character field in the MSSQL implementation is very wrong. Problem is
that the maximum length of a Varchar in SQL Server is 8000. nvarchar
is 4000. Needs to be a text field in SQL Server, which is 2^31 - 1
characters. Which is clearly way more than the MySQL implementation
but 5k is too small if MySQL is 65k.

SQL Server 2000's text field is deprecated for varchar(max) in 2005,
just to confuse matters further though!

(In the midst of a SQL Server 2000 -> 2005 migration at work for our
product, with several hundred tables and over 3000 stored
procedures...)



More information about the geeklog-devel mailing list