InSQL™ 7.1 Patch 08 Readme

© 2002 Invensys Systems, Inc. All Rights Reserved.


This document provides information regarding bugs fixed and known issues.

The patch has primarily been tested on Windows 2000 Server with SP2 and MS SQL Server 7.0 SP4; however, there are no known reasons why it should not work on Windows NT 4.0 SP6a and MS SQL Server 7.0 SP2/SP3.

Patch 08 mainly addresses retrieval issues and a memory leak in InSQLOLEDB.

 


Resolved Issues

The following list contains the bugs that were fixed for this patch release. Please click on the bug number for a more detailed description of the problem.

I0013045 EventSystem system tags do not always work.

I0015676 Performing Full Import, with the "Logged Only" option checked, does not delete the tags that had the "Log Data" option unchecked.

I0018623 Legacy Retrieval (7.1): There was a difference in Quality Detail (QD) between versions 7.1 and 8.0 Retrieval, after a data-block gap.

I0018724 HistoryBlock starts 1 (one) second after the previous block of ending time.

I0018881 The OpenQuery date formats from Convert() function do not conform to the SQL Server formats.

I0018882 When a Delta Retrieval query is performed across data blocks, where the tag is configured as Not-stored, it returns multiple NULL rows.

I0018964 TagType does not change during reimport, if the node has been redirected to some other InTouch™ node.

I0019150 Event tags with Analog Specific Value detector conditions may perform incorrectly.

I0019168 The NULL value is not returned from a data hole for a slow-changing tag.

I0019300 Retrieving data from Stored blocks, through the Not-stored blocks, causes the system to loop infinitely.

I0019327 InSQL Server crashes when MinEU and MaxEU (MinRaw and MaxRaw) are out of range.

I0019450 InSQL 7.1: Applying MSSQL70-SP3 causes queries using "...WHERE TagName LIKE @variable" to fail.

I0019463 Delta Query returns a NULL value from a block, where there are no NULL values stored, when the query spans contiguous blocks.

I0019601 InSQL 7.1 Patch 07a - Tag Importer: ww_Insert_DDEInt procedure (and perhaps others) fails with an arithmetic overflow.

I0019749 Delta Retrieval of a Cyclically stored tag causes retrieval to go into an infinite loop.

I0019886 Memory leak in InSQLOLEDB occurs when parameterized queries are used.

I0019927 Extra NULLs are retrieved for a slow-changing, cyclically stored tag.

I0019988 Legacy Retrieval (7.1): Different Quality Detail (QD) was returned after a data gap for a slow-changing tag.

I0020001 Delta Retrieval does not return Quality Detail (QD) of 133 for the first row, when Query starts at a point where data is not stored.

Back to Top


Detailed Description

I0013045 EventSystem system tags do not always work.

Problem:
EventSystem system tags do not always work. These tags are very useful in determining the state of the event system, especially the normal and critical queue sizes. The following tags do not work:
    SysEventActionThreads
    SysEventDetectorThreads
    SysEventCritActionQSize
    SysEventNormActionQSize

The normal action of queue size should grow and drop, depending on the load. The Pool detector thread and Time detector threads had their own copy of EventAction. The queue size and the thread count that were reflected in the system tags, were only from the Pool detector thread.

Resolution:
Added the queue size from the Pool detector thread and Time detector thread, and the sum is reflected in the system tags. Also, the thread count, from both EventAction threads, is added and reflected in the thread count system tags.

Back to Top

I0015676 Performing Full Import, with the "Logged Only" option checked, does not delete the tags that had the "Log Data" option unchecked.

Problem:
If you perform a Full Import of a previously imported tagname.x with the "Logged Only" option checked, the tags that were modified (so "Log Data" is unchecked) in the InTouch tag definition, do not get deleted from InSQL.

Resolution:
Cause: When an InTouch node is imported with the "Logged Only" option checked, all the tags with the "Logged Only" option checked are imported into the InSQL Server. After importing, if some of the tags are unchecked for the "Logged Only" option in the InTouch Application, and a reimport of the same node is done, the unchecked tags are not deleted from InSQL, because there are no checks made to delete these tags.
Fix: During the Full Reimport, after reading from the tagname.x file, a series of stored procedures are getting executed to update the InTouchDB table in the Holding database. During this time, for those tags which are not to be imported (i.e., ToPrealism = 0), the 'Edited' field is marked as 'D'. With this change, the corresponding tags will be deleted from the Runtime database during the execution of ww_Update_AllTagTypes stored procedure.

Back to Top

I0018623 Legacy Retrieval (7.1): There was a difference in QD (Quality Detail) between versions 7.1 and 8.0 Retrieval, after a data-block gap.

Problem:
Legacy Retrieval (7.1): There was a difference in Quality Detail between versions 7.1 and 8.0 Retrieval, after a data-block gap.

Resolution:
Fixed.

Back to Top

I0018724 HistoryBlock starts 1 (one) second after the previous block of ending time.

Problem:
The Block Change-over process is started 4 (four) seconds before the change-over time. First, the files from the current block are closed; then, new files are created and opened. If the thread does not get a priority while closing the old files and opening new files, the HistoryBlock starts 1 (one) second after the previous block of ending time.

Resolution:
The problem was fixed by stamping the file with BlockChangeOverTime.

Back to Top

I0018881 The OpenQuery date formats from Convert() function do not conform to the SQL Server formats.

Problem:
The date formats returned, when performing a Convert() operation, do not conform to the SQL Server formats. This pertains to styles NULL no style type, 0, 9, 13, 100, 109, and 113.

For example:
    Style NULL there should be a leading SPACE for single-digit dates.
    Style 0 there should be a leading SPACE for a single-digit hour, not a leading zero.
    Style 0 mid-night appears as 'Jan 2 2002 00:00AM' s/b 'Jan 2 2002 12:00AM'.
    Style 0 noon appears as 'Jan 2 2002 12:00AM' s/b 'Jan 2 2002 12:00PM'.

Resolution:
DataConvert() function has been modified to conform to the SQL Server formats.

Back to Top

I0018882 When a Delta Retrieval query is performed across data blocks, where the tag is configured as Not-stored, it returns multiple NULL rows.

Problem:
Performing a Delta Retrieval query across data blocks, where the tag is configured as Not-stored, returns multiple NULL rows.

Resolution:
Before returning NULL, checks are made to see if the previously returned value is a NULL. Also, Deadband checks are modified to reject NULL followed by NULL.

Back to Top

I0018964 TagType does not change during reimport, if the node has been redirected to some other InTouch node.

Problem:
In "ww_Update_AllTagTypes" stored procedure, the IOServerKey is not updated for memory tags in the tag table during reimport.

Resolution:
The stored procedure has been modified to update the IOServerKey for memory tags.

Back to Top

I0019150 Event tags with Analog Specific Value detector conditions may perform incorrectly.

Problem:
Event tags with Analog Specific Value detector conditions may perform incorrectly. Instead of returning a single value for an edge-detected event during a true condition, it returns many values for the event while the condition is true.

Resolution:
The issue was fixed by making the edge detection of wide queries per-query basis, and the edge detection of narrow queries per-tag basis.

Back to Top

I0019168 The NULL value is not returned from a data hole (e.g., I/O Server is down) for a slow-changing tag.

Problem:
The NULL value is not returned from a data hole for a slow-changing tag. The Quality Detail is always 192, regardless if the data is stored at that point; it should have been 133. In Delta Retrieval, the comparsion to dismiss the same value is too simple. Only the values are being compared, and if they are same the value is rejected. But in the case of a NULL followed by zero, the two consecutive values are represented as zeros only. Due to this, NULL is rejected and only zero is returned.

Resolution:
Fixed by adding extra checks on Quality, so that NULL is treated as a different value from that of a zero.

Back to Top

I0019300 Retrieving data from Stored blocks, through the Not-stored blocks, causes the system to loop infinitely.

Problem:
Retrieving data from Stored blocks, through the Not-stored blocks, causes the system to loop infinitely. Test system had tags imported from DemoApp for initial blocks, then the tags are deleted from the InSQL Server for some blocks and again imported. A query was made from the Stored blocks through the blocks that were not stored. This problem, the system hanging or looping infinitely, was seen when the Not-stored tags were queried from the disk.

Resolution:
Fixed by separating Stored and Not-stored tags from the Request list.

Back to Top

I0019327 InSQL Server crashes when MinEU and MaxEU (MinRaw and MaxRaw) are out of range.

Problem:
InSQL Server crashes when MinEU and MaxEU (MinRaw and MaxRaw) are out of range.

Resolution:
Checks have been included in the User Interface (UI) to prevent values beyond a float range from being entered. The Exception was due to the typecasting of a value that is beyond the floating point range. This has been taken care of by making a range check. A WARNING message will be logged when a block with EU or Raw value is beyond the floating point range. The messages are as follows:

    "MinEU exceeded floating point limit for tag 'xxxxxxxxxxxxxx'. Resetting to Max float value."
    "MaxEU exceeded floating point limit for tag 'xxxxxxxxxxxxxx'. Resetting to Max float value."
    "MinRaw exceeded floating point limit for tag 'xxxxxxxxxxxxxx'. Resetting to Max float value."
    "MaxRaw exceeded floating point limit for tag 'xxxxxxxxxxxxxx'. Resetting to Max float value."

The value reset is only internal and will not be reflected in the database. A maximum value of up to 3.402823466e+38 can be entered.

Back to Top

I0019450 InSQL 7.1: Applying MSSQL70-SP3 causes queries using "...WHERE TagName LIKE @variable" to fail.

Problem:
The following query works fine in InSQL version 7.1 Patch 07 and lower, with MSSQL70-SP2 and lower, but does not work after applying MSSQL70-SP3:
    DECLARE @StartDate datetime
    DECLARE @EndDate datetime
    DECLARE @Kennung varchar(33)
    SET @StartDate = DateAdd(mi,-60,GetDate())
    SET @EndDate = GetDate()
    SET @kennung = 'sys%'
    SELECT * FROM v_AnalogHistory
        WHERE TagName LIKE @Kennung
        AND DateTime >= @Startdate
        AND DateTime <= @EndDate

Resolution:
The "...WHERE" clause is not remoted to the InSQL OLEDB provider when the above query is fired. Microsoft has provided a hot fix for this issue. This hot fix has to be applied on top of MSSQL 7.0 SP4. After applying the hot fix, a DWORD entry has to be made in the registry, under 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers\InSQL' named 'SQLServerLike' with a value of 1 (one). The SQL Server is then restarted.

After the above setup, the SQL Server remotes the "...WHERE" clause to the OLEDB provider; queries like the ones used above will now work.

The hot fix has to be directly obtained from Microsoft. For more information, please go to the following address on the World Wide Web:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS, and look for article Q321823.

Back to Top

I0019463 Delta Query returns a NULL value from a block, where there are no NULL values stored, when the query spans contiguous blocks.

Problem:
Delta Query returns a NULL value from a block, where there are no NULL values stored, when the query spans contiguous blocks. When going across the data blocks, LastTime was not set correctly.

Resolution:
The setting of LastTime has been modified.

Back to Top

I0019601 InSQL 7.1 Patch 07a - Tag Importer: ww_Insert_DDEInt procedure (and perhaps others) fails with an arithmetic overflow.

Problem:
InSQL 7.1 Patch 07a - Tag Importer: ww_Insert_DDEInt procedure (and perhaps others) fails with an arithmetic overflow. (For example, some tags have their MaxEU/MaxRaw set to 2147483647, and their MinEU/MinRaw set to -2147483648. While these numbers are both acceptable integer values, the Max minus the Min, in this instance, results in an arithmetic overflow.)

Resolution:
SQL Server was raising an integer overflow exception when the difference of max and min integer limits was made, hence the tags were not getting imported. The problem has been fixed by assigning the max and min values to a variable of type real, and then the calculations are performed.

Back to Top

I0019749 Delta Retrieval of a Cyclically stored tag causes the retrieval to go into an infinite loop.

Problem:
A condition was added to handle the case when Quality is 133, Quality Detail (QD) is qdINITIALVALUE, and the snap value is 0 (zero). In this scenario, Quality was being overwitten with 1 (one) and Quality Detail was set to 65536. This resulted in the query going to an infinite loop.

Resolution:
Fixed by having the condition set the QD to qdGOOD + qdINITIALVALUE.

Back to Top

I0019886 Memory leak in InSQLOLEDB occurs when parameterized queries are used.

Problem:
It is found that when parameterized queries are used in InSQLOLEDB, the provider leaks memory.

-- Parameterised (This leaks approximately 120 bytes per query.)
    DECLARE @Start DateTime
    DECLARE @End DateTime

    SELECT @Start = '2002-04-22 10:00:00'
    SELECT @End = '2002-04-22 10:10:00'

    SELECT DateTime, TagName, Value, Quality, QualityDetail FROM v_AnalogHistory
        WHERE TagName = 'SysTimeSec'
        AND DateTime >= @Start

        AND DateTime  AND wwRetrievalMode = 'Delta'
Resolution:
Fixed by releasing the memory used for binding. Also fixed some leaks in OLEDB and Lower Retrieval by replacing some of the C-Runtime library functions.

Back to Top

I0019927 Extra NULLs are retrieved for a slow-changing, cyclically stored tag.

Problem:
There was a problem with storage. Storage intermittenly saved 12-second data instead of 10-second data for the tags that were cyclically stored every second. Wherever these 12-second archives were encountered, retrieval did not read those because each size was more/bigger than was allocated in the precalculated decompression buffer size. This resulted in the buffer to just NOT load; without the buffer loaded, NULLs would be returned to the Client machine.

Resolution:
Fixed by reallocating the buffer whenever it is found that it is too small to hold the next buffer from disk.

Back to Top

I0019988 Legacy Retrieval (7.1): Different Quality Detail (QD) was returned, after a data gap, for a slow-changing tag.

Problem:
Legacy Retrieval (7.1): Different Quality Detail (QD) was returned, after a data gap, for a slow-changing tag.

Resolution:
Fixed.

Back to Top

I0020001 Delta Retrieval does not return Quality Detail (QD) of 133 for the first row, when Query starts at a point where data is not stored.

Problem:
Delta Retrieval does not return QD of 133 for the first row, when Query starts at a point where data is not stored.

Resolution:
Value 1 (one) Second before the start time of the query is checked. If the value is the same as the one at starting time, then, the first row is marked with the initial Quality value.

Back to Top