James Hawkins
c9b3bc1165
msi: Column attributes for temporary string and int columns should be g and j respectively.
2009-03-02 12:05:28 +01:00
James Hawkins
b3c9875cf7
msi: Correctly order transposed column values in the INSERT query.
2009-03-02 12:04:57 +01:00
James Hawkins
74aa053485
msi: The _Tables and _Columns tables have no persistence attribute.
2009-02-26 12:13:52 +01:00
Nikolay Sivov
c3e2cb00d5
msi: Remove redundant pointer check (Coverity).
2009-01-26 14:30:34 +01:00
Andrew Talbot
668197a898
msi: Declare some functions static.
2009-01-12 13:10:53 +01:00
James Hawkins
b187008345
msi: Remove a part of a debugging statement that was accidentally left in.
2008-10-09 12:58:09 +02:00
James Hawkins
e88b09a342
msi: Don't update the table columns if there are no more columns.
...
This should fix the heap corruption that caused intermittent crashes
for patchwatcher.
2008-10-07 12:14:03 +02:00
James Hawkins
374c042880
msi: Remove the columns in reverse order.
2008-10-07 12:13:46 +02:00
James Hawkins
62c544cf4f
msi: Implement the DROP TABLE sql command.
2008-10-06 13:05:52 +02:00
James Hawkins
4b9fd1d5e2
msi: Store the _Columns and _Tables tables in the database structure.
2008-08-25 11:40:46 +02:00
James Hawkins
ccd030c7d3
msi: Add handling for the special _Storages table.
2008-07-08 10:50:04 +02:00
James Hawkins
85866317c5
msi: Don't reorder the table when matching rows as the results are already ordered.
2008-04-07 11:27:15 +02:00
James Hawkins
bed661aef4
msi: Handle sorting an empty table.
2008-04-02 12:31:01 +02:00
Andrew Talbot
6661f43438
msi: Assign to structs instead of using memcpy.
2008-03-07 11:01:07 +01:00
James Hawkins
40aa7df344
msi: Implement the MSIMODIFY_REFRESH command of MsiViewModify.
2008-02-18 12:41:37 +01:00
Gerald Pfeifer
388edd1086
msi: Complete initializers.
2008-01-10 13:20:15 +01:00
James Hawkins
4b75f33012
msi: Actually delete the row data instead of blanking it out.
2008-01-09 13:38:02 +01:00
Gerald Pfeifer
2b1e487d36
msi: Adjust the types of loop variables.
2008-01-04 12:12:43 +01:00
Gerald Pfeifer
f7fea9e9f0
msi: Simplify condition in TABLE_fetch_stream().
2008-01-02 12:38:42 +01:00
Gerald Pfeifer
05cf0bdf81
msi: Fix error handling in encode_streamname().
2007-12-27 13:43:56 +01:00
Rob Shearman
5b072fbbec
msi: Fix several memory leaks after using IEnumSTATSTG_Next.
...
The pwcsName field of STATSTG must be freed, otherwise the memory will
be leaked.
2007-12-26 14:02:01 +01:00
James Hawkins
3c0f7ca4e6
msi: Fix deleting temporary rows, with tests.
2007-12-23 14:17:11 +01:00
James Hawkins
b774ffe1d2
msi: Free the ordering information.
2007-12-19 12:18:54 +01:00
James Hawkins
91c205e8c0
msi: Sort each table of the join separately.
2007-12-18 12:32:55 +01:00
James Hawkins
3a5178e900
msi: Don't update a table entry when applying a transform if the string value is the same.
2007-11-05 14:54:11 +01:00
James Hawkins
35a6782d7b
msi: Test and implement the MSIMODIFY_DELETE command.
2007-11-05 14:52:46 +01:00
James Hawkins
26f86c55c9
msi: Return ERROR_FUNCTION_FAILED if a matching row is not found.
2007-10-18 12:09:39 +02:00
James Hawkins
46ec7ee183
msi: Return ERROR_FUNCTION_FAILED when inserting duplicate keys.
2007-10-18 12:09:33 +02:00
Alexandre Julliard
6adf058089
msi: Avoid casting const pointers to non-const.
2007-10-17 14:14:21 +02:00
Alexandre Julliard
71747518ad
msi: Properly clear the new table data when a column is added.
2007-10-17 14:13:53 +02:00
James Hawkins
b830fb0a34
msi: Implement the MSIMODIFY_UPDATE command in the SELECT view.
2007-07-27 12:24:39 +02:00
James Hawkins
f4147ca004
msi: Add handling for the MSIMODIFY_UPDATE command.
2007-07-24 11:49:59 +02:00
James Hawkins
8a7690c151
msi: Properly delete the columns view.
2007-07-24 11:49:33 +02:00
James Hawkins
ccef56f2cc
msi: Ref count temporary columns and release them when necessary.
2007-07-23 11:55:34 +02:00
James Hawkins
0fd733bf90
msi: Implement adding columns using the ALTER command.
2007-07-23 11:55:11 +02:00
James Hawkins
3b1ab76986
msi: Implement reference counting for tables, manipulated with the HOLD and FREE sql commands.
2007-07-19 12:00:43 +02:00
James Hawkins
dc3060c542
msi: Load the AdminProperties stream if the package is an Admin package.
2007-07-17 12:54:53 +02:00
James Hawkins
f0b97cb1e1
msi: Check for NULL transform, as there may be no transforms for the _Columns or _Tables tables.
2007-07-11 12:00:53 +02:00
James Hawkins
17ba74195b
msi: Handle adding columns in transforms.
2007-07-10 13:35:50 +02:00
Rob Shearman
2e2b17f340
msi: Fix transforms to work when the number of bytes per string reference differs to that of the database it is being applied to.
2007-06-27 12:32:42 +02:00
Rob Shearman
bf67b14602
msi: Fix bytes_per_column for binary types when the database is using 3-byte string references.
2007-06-27 12:32:42 +02:00
James Hawkins
9309f4dfa0
msi: Properly delete rows from the table, instead of zeroing out the row.
2007-06-19 11:31:44 +02:00
Andrew Talbot
cf1e01eb0c
msi: Constify some variables.
2007-06-14 13:20:45 +02:00
James Hawkins
a05613a9f2
msi: Add support for large string tables.
2007-06-08 11:59:28 +02:00
James Hawkins
8568e0a4a8
msi: Represent table data as bytes instead of shorts.
2007-06-08 11:58:36 +02:00
James Hawkins
65f23343ee
msi: Reduce the amount of code that directly accesses table data.
2007-06-08 11:58:20 +02:00
James Hawkins
298699e242
msi: Use fetch_int to reduce code duplication and access to table data.
2007-06-08 11:57:57 +02:00
Marcus Meissner
ff40f3d2d3
msi: Do not mark the tables const.
2007-04-27 11:13:40 +02:00
James Hawkins
da55285acb
msi: Implement special handling for the _Streams table.
2007-04-25 12:44:37 +02:00
Rob Shearman
3323303e09
msi: Set rec to NULL after calling msiobj_release on it in msi_create_table so that we don't call msiobj_release on it again.
2007-04-25 11:49:26 +02:00
Rob Shearman
e474304160
msi: Add a non-persistent string instead of a persistent one if the table or row is non-persistent.
2007-04-24 12:25:41 +02:00
Rob Shearman
44f7cb8858
msi: Add a persistent flag to tables.
...
Implement MSI_DatabaseIsTablePersistent.
2007-04-24 12:25:25 +02:00
Rob Shearman
a33cc3d859
msi: Don't add info to the _Columns table for non-persistent tables.
2007-04-24 12:24:59 +02:00
Rob Shearman
23379b3b5c
msi: Add support for adding temporary/non-persistent data to tables.
2007-04-24 12:24:48 +02:00
Rob Shearman
338568886c
msi: Create the table directly in create_table instead of requiring it to be loaded after saving.
2007-04-24 12:23:02 +02:00
Rob Shearman
ba0507a178
msi: Move table creation to table.c.
2007-04-24 12:22:48 +02:00
Rob Shearman
3aa9a25cb3
msi: Store the column info in the MSITABLE structure.
...
Load the data on view creation for simplicity instead of view execution.
2007-04-24 12:22:14 +02:00
Rob Shearman
94d48238ff
msi: Remove the hash table for a column when one of its values is modified since it will now be invalid.
2007-04-24 12:21:40 +02:00
Rob Shearman
37b11baaa3
msi: Move string loading and saving to string.c.
2007-04-24 12:20:19 +02:00
Rob Shearman
2e3289ca6c
msi: Add support for non-persistent strings.
...
Store the loaded refcount in the string table.
2007-04-24 12:18:04 +02:00
James Hawkins
d677bd7f3b
msi: Return MSICONDITION_NONE in MsiDatabaseIsTablePersistent if the table doesn't exist.
2007-04-23 14:00:24 +02:00
Mike McCormack
a16e5151da
msi: Factor out code to calculate column offsets.
2007-02-06 13:20:17 +01:00
Andrew Talbot
e5938d6fbb
msi: Remove unused variables.
2007-01-12 20:41:45 +01:00
Francois Gouget
6a385ae273
msi: assert.h is not a local header (spotted by winapi_check).
2006-11-13 12:59:14 +01:00
Alexandre Julliard
36c4ec8f33
msi: Fixed definition of the MSIITERHANDLE type.
2006-11-06 13:02:47 +01:00
Mike McCormack
14dda0f74f
msi: Fix a typo.
2006-11-01 13:38:23 +01:00
Mike McCormack
9a4ba8c114
msi: Search the patch package for source cabinet files.
2006-11-01 13:38:09 +01:00
Mike McCormack
15bfb30fc3
msi: Update tables using records, not integer by integer.
2006-10-26 12:56:10 +02:00
Mike McCormack
f6c7ae6a0c
msi: Fix insertion of null integers into a table.
2006-10-23 12:38:56 +02:00
Mike McCormack
8ecd34b971
msi: Allow rows in the _Columns table to be unordered.
2006-10-19 13:38:16 +02:00
Mike McCormack
f2c207fa03
msi: Reset the column number for each new table in a transform.
2006-10-19 13:38:09 +02:00
Mike McCormack
98a42ad575
msi: Fix tables with binary data where the key is an integer.
2006-10-17 11:17:43 +02:00
Mike McCormack
1f737c035e
msi: Stream fields shouldn't be treated as strings.
2006-10-17 11:17:34 +02:00
Francois Gouget
0b20150531
msi: Remove spaces before '\n's.
2006-10-16 11:31:03 +02:00
Mike McCormack
9187951ac7
msi: Handle the sign properly when converting integer data.
2006-10-12 14:58:39 +02:00
Mike McCormack
1b256f2c6e
msi: Improve error checking when applying transform data.
2006-10-12 14:58:33 +02:00
Mike McCormack
5742b332fe
msi: An empty string table entry should always have a zero refcount.
2006-10-12 11:32:21 +02:00
Mike McCormack
175c407bfc
msi: Make msi_makestring static.
2006-10-10 16:11:42 +02:00
Mike McCormack
2d48706d74
msi: Fix a memory leak.
2006-10-10 12:56:05 +02:00
Mike McCormack
07c85fe895
msi: Avoid reading the transform table data twice.
2006-10-10 12:55:57 +02:00
Mike McCormack
4d41a2b9ee
msi: Fix transform traces.
2006-10-06 12:54:30 +02:00
Mike McCormack
92cc0bc0c2
msi: Work around what appears to be a bug in native MSI's generation of transform data.
2006-10-06 12:54:21 +02:00
Mike McCormack
f53ba3ca58
msi: Transform the _Columns and _Tables tables first so the table metadata is present for new tables.
2006-10-06 12:54:13 +02:00
Mike McCormack
2c626c9d81
msi: Handle null integers properly in transforms.
2006-10-06 12:53:58 +02:00
Mike McCormack
59edd7d8a8
msi: Only ignore the StringPool and StringData in a transform.
2006-10-05 11:33:07 +02:00
Mike McCormack
2af5ed571a
msi: Only declare the szStringData and szStringPool strings once.
2006-10-05 11:33:00 +02:00
Mike McCormack
8d7bbd1809
msi: Remove an unused variable.
2006-10-05 11:32:51 +02:00
Mike McCormack
f1d4646a49
msi: Win64 printf format warning fixes.
2006-10-05 11:32:32 +02:00
Mike McCormack
60d92d42a3
msi: Fix a couple of test cases for MsiDatabaseIsTablePersistent.
2006-09-13 12:19:54 +02:00
Mike McCormack
00fdc6cb80
msi: Use msi_string_lookup_id instead of msi_id2stringW where possible.
2006-09-08 12:44:23 +02:00
Mike McCormack
533833b4e1
msi: Validate database fields before inserting them.
2006-09-07 11:00:32 +02:00
Mike McCormack
5f832b2731
msi: Fix writing of long strings to the database.
2006-08-28 11:49:21 +02:00
Mike McCormack
089411747b
msi: Fix strings with lengths that are exact multiples of 2^16.
2006-08-24 14:09:08 +02:00
Mike McCormack
65d12c342d
msi: Fix the value of LONG integers in records (suggested by James Hawkins).
2006-07-27 11:57:12 +02:00
James Hawkins
5842af1b95
msi: Fix a typo.
2006-07-27 11:43:22 +02:00
Dmitry Timoshkov
081563e7ec
Avoid non-portable WCHAR[] constructs.
2006-07-05 11:43:55 +02:00
Mike McCormack
cfe36cc81d
msi: Fix loading of long strings.
2006-06-13 12:56:42 +02:00
Alexandre Julliard
9a59ee76e4
msi: Make all the ops structures static and const.
2006-06-10 12:02:39 +02:00
Jonathan Ernst
360a3f9142
Update the address of the Free Software Foundation.
2006-05-23 14:11:13 +02:00
Mike McCormack
819815d66c
msi: Use a debug channel to turn on transform debugging.
2006-04-07 20:00:45 +02:00
Mike McCormack
85e8d3adf8
msi: Fix possible free of uninitialized pointer.
2006-04-07 11:45:29 +02:00
Robert Shearman
9f487ba1de
msi: Optimise WHERE operations.
...
Optimise WHERE operations on matching against strings by adding a new
function find_matching_rows to the views, which eliminates the need to
examine every record when executing a query. Implement this function
in the table using a hash table on the ID stored in the data.
2006-03-20 12:03:04 +01:00
Robert Shearman
66c9cbbe0f
msi: Fix heap overflow in save_string_table.
...
Fix heap overflow caused by not accounting for the dummy first item,
which contains the codepage.
2006-02-22 22:15:12 +01:00
Francois Gouget
0edbaf7e80
Remove spaces before '\n' in traces.
2005-11-10 12:14:56 +00:00
Mike McCormack
50684c15d5
Create the +msidb debug channel for msi database code.
2005-11-02 14:24:21 +00:00
Mike McCormack
29c93e431d
Deleted two buggy functions that incorrectly and inefficiently check
...
whether a row already exists in a table, and replaced them with a call
to an existing working function that does the same thing correctly.
2005-10-29 11:07:29 +00:00
Mike McCormack
1cd26d25fc
Implement transforms. This still includes some debugging code which
...
can be enabled by setting debug_transform to 1 in the relevant
places.
2005-10-27 12:25:04 +00:00
Mike McCormack
f8fef6ea94
Create a stub function to apply a single table transform and call it
...
where we need to apply transforms.
2005-10-26 13:56:33 +00:00
Mike McCormack
8e74308a10
Fix and test MsiViewGetColumnInfo and binary fields.
2005-09-28 11:59:40 +00:00
Mike McCormack
fbbb32d6d1
Create a function to determine the table's row size and use it.
...
Fix a memory leak in the table code.
2005-09-26 13:25:48 +00:00
Mike McCormack
1c5967c48c
Load a table's column information separately from the table itself.
2005-09-22 10:34:07 +00:00
Mike McCormack
7d7da60db4
Don't refcount tables.
2005-09-21 10:20:20 +00:00
Mike McCormack
ee034ba4c2
Added memory allocation inline functions (part 2).
2005-09-20 11:59:14 +00:00
Mike McCormack
230e71cc18
Fix memory leaks in the table code.
2005-09-17 14:29:38 +00:00
Mike McCormack
6b5f290d75
Make load_string_table return the string table.
2005-09-16 19:01:40 +00:00
Mike McCormack
5f1b258c9c
Convert the list of tables to a standard list.
2005-09-14 10:07:26 +00:00
Mike McCormack
8a8c561cfa
- the combination of all table keys must be unique, not each key
...
- MsiViewExecute may not be called before MsiModifyView
2005-08-29 10:16:12 +00:00
Mike McCormack
e8d1a167df
Implement MsiModifyView (MSIMODIFY_INSERT_TEMPORARY).
2005-08-24 11:10:23 +00:00
Mike McCormack
bcd8fa3c78
Handle loading strings over 64k from the string table.
2005-08-08 11:01:56 +00:00
Mike McCormack
64de949cdd
More -Wmissing-declarations and -Wwrite-strings warning fixes.
2005-05-31 09:30:28 +00:00
Juan Lang
806be361d0
Turn handled errors from ERRs to WARNs or TRACEs.
2005-05-20 19:16:50 +00:00
Mike McCormack
bd07966c8f
Avoid some non-standard str functions.
2005-05-11 12:58:22 +00:00
Mike McCormack
95dea4969a
- Rename dupstrW to strdupW, and remove duplicate definition.
...
- Move definition of string manipulation functions to msipriv.h.
2005-03-16 11:31:35 +00:00
Mike McCormack
e2df8814ea
Allow MsiViewExecute to be called twice on the same query.
2005-02-16 16:06:05 +00:00
Francois Gouget
4d801b66e6
Assorted spelling fixes.
2005-02-10 19:19:35 +00:00
Mike McCormack
ef1d367bcc
Fix MsiModifyView and MsiViewGetColumnInfo to use MSIRECORD* not MSIHANDLE.
2005-02-08 13:44:25 +00:00
Francois Gouget
da8b3dd7f2
Assorted spelling fixes.
2005-01-26 21:09:04 +00:00
Mike McCormack
48df747150
Fix a bug caused by freeing memory too soon in the table code.
2005-01-20 19:57:22 +00:00
Michael Stefaniuc
b937407ee5
Do not check for non NULL pointer before HeapFree'ing it. It's
...
redundant.
2005-01-20 10:36:35 +00:00
Mike McCormack
1bd8d8a55a
Fix selecting string columns and matching against a wildcard.
2004-12-22 15:22:12 +00:00
Michael Stefaniuc
9fe94da2aa
Add missing HeapFree's (found by smatch).
2004-12-10 15:24:52 +00:00
Mike McCormack
6b395bab07
Fix transposition of 4 byte values when reading in table data from
...
storage.
2004-12-06 16:17:45 +00:00
Francois Gouget
486d020c1b
Don't define COBJMACROS in objbase.h.
...
Update the Wine sources accordingly.
2004-10-07 03:06:48 +00:00
Mike McCormack
36123b5564
Remove a piece of dead code causing a warning.
2004-07-12 19:53:05 +00:00
Alexandre Julliard
a7a6f5f31c
Authors: Mike McCormack <mike@codeweavers.com>, Aric Stewart <aric@codeweavers.com>
...
Refcount all objects, and use pointers internally.
2004-07-09 22:25:34 +00:00
Mike McCormack
c4d7c8daa0
Allow binary fields with stream names longer than table names.
2004-07-06 19:00:46 +00:00
Mike McCormack
24e9a34494
Fetch binary streams at the table level.
2004-07-06 18:56:12 +00:00
Mike McCormack
abd259fd12
Fix the UPDATE query.
2004-06-30 18:24:33 +00:00
Mike McCormack
ab519f2a2c
Make the SQL insert query work.
2004-06-30 18:18:27 +00:00
Mike McCormack
6fb0cee5d9
Dump database table names on startup.
2004-06-29 03:57:39 +00:00
Mike McCormack
0eecfdef67
Allow reading records containing streams.
2004-06-29 03:41:28 +00:00
Aric Stewart
401bd3f772
Start implementing actions.
2004-06-28 20:34:35 +00:00
Mike McCormack
c0523aaa57
Pull the codepage from the string table.
2004-06-26 00:18:36 +00:00
Francois Gouget
6a6c85c6d8
Make Unicode const strings static so they are not copied to the stack
...
each time we enter the function.
2004-04-19 20:12:14 +00:00
Mike McCormack
943a71e453
Fix handle allocation and the CREATE TABLE query.
2004-03-19 19:14:12 +00:00
Mike McCormack
068b4ec7d4
First go at write support.
2004-03-19 01:16:36 +00:00
Mike McCormack
b040e4bcd2
When loading table data, split it up into rows.
2004-03-18 04:04:08 +00:00
Mike McCormack
f5e1c13070
Move the string table out into a separate file, improve lookups.
2004-03-17 20:49:59 +00:00
Mike McCormack
367462798a
Treat missing MSI tables as empty.
2003-10-28 21:49:06 +00:00
Mike McCormack
3871395140
Fixed MSI buffer overflow.
2003-10-28 21:43:14 +00:00