General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Two GENDBC Bugs with Indexes and Collate Sequences
I've just written a program to auto-generate a reindex routine from an existing DBC. In the process of researching the approach to this, I noted two bugs in GENDBC that could bite you if you work with multiple COLLATE sequences in your indexes.
1) The code uses the setting of SET( "COLLATE") at generate time rather than runtime to decide whether a SET COLLATE command is needed in the generated code. This could cause an index with the wrong collate sequence to be created if the DBC is not created with the same COLLATE setting as when GENDBC was run originally.
2) GENDBC does not generate code to set and restore the current setting of COLLATE when the code completes. As such, if you run the generated code, COLLATE is left set arbitrarily at the setting of the last index TAG that was encountered.
These are obscure bugs, which you are unlikely to encounter, unless you are working with apps that use multiple collate sequences *and* you are deploying code produced by GENDBC (such as dynamic creation of a local DBC copy).
I will report these to Microsoft. (Naturally, the code I wrote does not suffer from these same defects <s>.)
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only