Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
85866317
Commit
85866317
authored
Apr 05, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't reorder the table when matching rows as the results are already ordered.
parent
82517d6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
table.c
dlls/msi/table.c
+0
-3
db.c
dlls/msi/tests/db.c
+43
-1
No files found.
dlls/msi/table.c
View file @
85866317
...
...
@@ -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
;
}
...
...
dlls/msi/tests/db.c
View file @
85866317
...
...
@@ -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
();
...
...
@@ -4985,6 +4986,47 @@ static void test_order(void)
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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment