Module: wine Branch: stable Commit: 72ad32b6693ebdc2b9e22dd6c71e623e19aa69f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=72ad32b6693ebdc2b9e22dd6c7...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Feb 15 10:16:12 2016 +0100
msi: Fix the CHAR column type.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 7b21373bf112aed3cce495f1ef51334cf51224bc) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
dlls/msi/sql.y | 2 +- dlls/msi/tests/db.c | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index 553cc6d..366764d 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -355,7 +355,7 @@ data_type_l: data_type: TK_CHAR { - $$ = MSITYPE_STRING | 1; + $$ = MSITYPE_STRING | 0x400; } | TK_CHAR TK_LP data_count TK_RP { diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 98e0e96..7dd878a 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -1286,13 +1286,15 @@ static void test_viewgetcolumninfo(void) r = run_query( hdb, 0, "CREATE TABLE `Properties` " "( `Property` CHAR(255), " - " `Value` CHAR(1), " - " `Intvalue` INT, " - " `Integervalue` INTEGER, " - " `Shortvalue` SHORT, " - " `Longvalue` LONG, " - " `Longcharvalue` LONGCHAR " - " PRIMARY KEY `Property`)" ); + " `Value` CHAR(1), " + " `Intvalue` INT, " + " `Integervalue` INTEGER, " + " `Shortvalue` SHORT, " + " `Longvalue` LONG, " + " `Longcharvalue` LONGCHAR, " + " `Charvalue` CHAR, " + " `Localizablevalue` CHAR LOCALIZABLE " + " PRIMARY KEY `Property`)" ); ok( r == ERROR_SUCCESS , "Failed to create table\n" );
/* check the column types */ @@ -1306,6 +1308,8 @@ static void test_viewgetcolumninfo(void) ok( check_record( rec, 5, "I2"), "wrong record type\n"); ok( check_record( rec, 6, "I4"), "wrong record type\n"); ok( check_record( rec, 7, "S0"), "wrong record type\n"); + ok( check_record( rec, 8, "S0"), "wrong record type\n"); + ok( check_record( rec, 9, "L0"), "wrong record type\n");
MsiCloseHandle( rec );
@@ -1317,6 +1321,8 @@ static void test_viewgetcolumninfo(void) ok( 0x1502 == get_columns_table_type(hdb, "Properties", 5 ), "_columns table wrong\n"); ok( 0x1104 == get_columns_table_type(hdb, "Properties", 6 ), "_columns table wrong\n"); ok( 0x1d00 == get_columns_table_type(hdb, "Properties", 7 ), "_columns table wrong\n"); + ok( 0x1d00 == get_columns_table_type(hdb, "Properties", 8 ), "_columns table wrong\n"); + ok( 0x1f00 == get_columns_table_type(hdb, "Properties", 9 ), "_columns table wrong\n");
/* now try the names */ rec = get_column_info( hdb, "select * from `Properties`", MSICOLINFO_NAMES ); @@ -1329,6 +1335,8 @@ static void test_viewgetcolumninfo(void) ok( check_record( rec, 5, "Shortvalue"), "wrong record type\n"); ok( check_record( rec, 6, "Longvalue"), "wrong record type\n"); ok( check_record( rec, 7, "Longcharvalue"), "wrong record type\n"); + ok( check_record( rec, 8, "Charvalue"), "wrong record type\n"); + ok( check_record( rec, 9, "Localizablevalue"), "wrong record type\n");
MsiCloseHandle( rec );