https://git.reactos.org/?p=reactos.git;a=commitdiff;h=41e6537b6944747556078…
commit 41e6537b69447475560787a890d65d83fa2b3b55
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 19:08:41 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:31 2022 +0100
[WINESYNC] msi: Add table existance tests for tables with temporary columns.
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id cb9cb83cda01fa873667e11038d9bdd01428f059 by Piotr Caban
<piotr(a)codeweavers.com>
---
modules/rostests/winetests/msi/db.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c
index c49b5e62655..22466548b1f 100644
--- a/modules/rostests/winetests/msi/db.c
+++ b/modules/rostests/winetests/msi/db.c
@@ -3957,10 +3957,22 @@ static void test_alter(void)
hdb = create_db();
ok( hdb, "failed to create db\n");
+ query = "CREATE TABLE `T` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255)
TEMPORARY PRIMARY KEY `C`)";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "failed to add table\n");
+
+ query = "SELECT * FROM `T`";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_BAD_QUERY_SYNTAX, "expected ERROR_BAD_QUERY_SYNTAX, got
%d\n", r);
+
query = "CREATE TABLE `T` ( `B` SHORT NOT NULL TEMPORARY, `C` CHAR(255)
TEMPORARY PRIMARY KEY `C`) HOLD";
r = run_query(hdb, 0, query);
ok(r == ERROR_SUCCESS, "failed to add table\n");
+ query = "SELECT * FROM `T`";
+ r = run_query(hdb, 0, query);
+ ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", r);
+
cond = MsiDatabaseIsTablePersistentA(hdb, "T");
ok( cond == MSICONDITION_FALSE, "wrong return condition\n");