mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
msi: Don't reorder the table when matching rows as the results are already ordered.
This commit is contained in:
parent
82517d6d67
commit
85866317c5
@ -1796,9 +1796,6 @@ static UINT TABLE_find_matching_rows( struct tagMSIVIEW *view, UINT col,
|
||||
|
||||
*row = entry->row;
|
||||
|
||||
if (tv->order)
|
||||
*row = tv->order->reorder[*row];
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -4775,8 +4775,9 @@ static void test_defaultdatabase(void)
|
||||
static void test_order(void)
|
||||
{
|
||||
MSIHANDLE hdb, hview, hrec;
|
||||
CHAR buffer[MAX_PATH];
|
||||
LPCSTR query;
|
||||
UINT r;
|
||||
UINT r, sz;
|
||||
int val;
|
||||
|
||||
hdb = create_db();
|
||||
@ -4983,6 +4984,47 @@ static void test_order(void)
|
||||
r = MsiViewFetch(hview, &hrec);
|
||||
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
|
||||
|
||||
MsiViewClose(hview);
|
||||
MsiCloseHandle(hview);
|
||||
|
||||
query = "CREATE TABLE `Buffet` ( `One` CHAR(72), `Two` SHORT PRIMARY KEY `One`)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'uno', 2)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'dos', 3)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'tres', 1)";
|
||||
r = run_query(hdb, 0, query);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
query = "SELECT * FROM `Buffet` WHERE `One` = 'dos' ORDER BY `Two`";
|
||||
r = MsiDatabaseOpenView(hdb, query, &hview);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
r = MsiViewExecute(hview, 0);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
r = MsiViewFetch(hview, &hrec);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
|
||||
sz = sizeof(buffer);
|
||||
r = MsiRecordGetString(hrec, 1, buffer, &sz);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
ok(!lstrcmp(buffer, "dos"), "Expected \"dos\", got \"%s\"\n", buffer);
|
||||
|
||||
r = MsiRecordGetInteger(hrec, 2);
|
||||
ok(r == 3, "Expected 3, got %d\n", r);
|
||||
|
||||
MsiCloseHandle(hrec);
|
||||
|
||||
r = MsiViewFetch(hview, &hrec);
|
||||
ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
|
||||
|
||||
MsiViewClose(hview);
|
||||
MsiCloseHandle(hview);
|
||||
MsiCloseHandle(hdb);
|
||||
|
Loading…
Reference in New Issue
Block a user