Commit 1f737c03 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Stream fields shouldn't be treated as strings.

parent 4047cc70
......@@ -1293,7 +1293,9 @@ static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
if ( tv->columns[i].type & MSITYPE_NULLABLE )
continue;
if ( tv->columns[i].type & MSITYPE_STRING )
if ( MSITYPE_IS_BINARY(tv->columns[i].type) )
TRACE("skipping binary column\n");
else if ( tv->columns[i].type & MSITYPE_STRING )
{
LPCWSTR str;
......
......@@ -1906,6 +1906,20 @@ static void test_try_transform(void)
r = run_query(hdb, 0, query);
ok(r == ERROR_SUCCESS, "failed to add table\n");
hrec = MsiCreateRecord(2);
r = MsiRecordSetInteger(hrec, 1, 2);
ok(r == ERROR_SUCCESS, "failed to set integer\n");
write_file("testdata.bin", "lamyon", 6);
r = MsiRecordSetStream(hrec, 2, "testdata.bin");
ok(r == ERROR_SUCCESS, "failed to set stream\n");
query = "INSERT INTO `BINARY` ( `ID`, `BLOB` ) VALUES ( ?, ? )";
r = run_query(hdb, hrec, query);
ok(r == ERROR_SUCCESS, "failed to add row with blob\n");
MsiCloseHandle(hrec);
r = MsiDatabaseCommit( hdb );
ok( r == ERROR_SUCCESS , "Failed to commit database\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment