Regression from 3.2.3 in mssql 2000 unsupported usage of varchar(max) and sys.extenden_properties

Description

When running update in version 3.3.0+ there is an exception:

liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Error executing SQL SELECT
CAST(value as varchar(max)) as REMARKS
FROM
sys.extended_properties
WHERE
name='MS_Description' AND major_id = OBJECT_ID('DATABASECHANGELOG')
AND
minor_id = COLUMNPROPERTY(major_id, 'ID', 'ColumnId'): Line 2: Incorrect syntax near 'max'.
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.snapshotObject(ColumnSnapshotGenerator.java:69)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:60)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:163)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:241)
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:195)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:177)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:60)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:37)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:25)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:126)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:134)
at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:141)
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:88)

The update proccess will not continue after this.

It is the hardcoded SQL in ColumnSnapshotGenerator for mssql instances of db that is the issue. MS SQL 2000 does not support the usage of 'max' when specifying size of data type. Also the table/view sys.extended_properties does not exist. See for same issue of non-existent table/view.

Environment

MS SQL Server 2000

Reporter

David Björklund

Components

Fix versions

Affects versions

Priority

Critical
Configure