Mimer SQL Features and Functionality History Mimer SQL, Features and Functionality History © Copyright Mimer InformationTechnology AB, August 2017

The contents of this manual may be printed in limited quantities for use at a Mimer SQL installation site. No parts of the manual may be reproduced for sale to a third party. Information in this document is subject to change without notice. All registered names, product names and trademarks of other companies mentioned in this documentation are used for identification purposes only and are acknowledged as the property of the respective company. Companies, names and data used in examples herein are fictitious unless otherwise noted.

Produced and published by Mimer InformationTechnology AB, Uppsala, . P.O. Box 1713, SE-751 47 Uppsala, Sweden. Tel +46(0)18-780 92 00. Fax +46(0)18-780 92 40.

Mimer Web Sites: http://developer.mimer.com http://www.mimer.com Mimer SQL i Features and Functionality History

Contents

Chapter 1 New Features and Functions ...... 1 The Mimer SQL Server...... 1 Internal Databank Identifier Invalid (V9.3.8B) ...... 1 Background Dbcheck Hang (V9.3.8)...... 1 LOGDB Restart (V9.3.8)...... 1 Improved Control of LOB References Outside Databank End-of-file (V9.3.8) ...... 1 LOB’s In Databank Created By an Old Mimer Version (V9.3.7G)...... 2 Problem With Large SQL Statements (V9.3.7F)...... 2 Table Control Area Exhausted (V9.3.7F)...... 2 SQLPool Exhausted During Restore (V9.3.7E) ...... 2 Recompilation of Views Closing Cursors (V9.3.7)...... 2 Online Backup (V9.3.7)...... 2 Large Object Restart (V9.3.7) ...... 3 Write Set Corrupt when Automatic Refresh (V9.3.6) ...... 3 Server Hangs when Less than Seven 16K Pages (V9.3.6) ...... 3 Read-only Transactions (V9.3.3) ...... 3 -19078 Warning on the Error Log (V9.3.3) ...... 3 ALTER DATABANK’S FILESIZE Option (V9.3.2) ...... 3 ALTER DATABANK To READ ONLY (V9.3.2) ...... 3 CAST Boolean AS Varchar (V9.3.2) ...... 3 Update Statistics (V9.3.1) ...... 4 Performance (V9.2.1)...... 4 LOAD/UNLOAD (V9.1.1) ...... 4 PSM Debugger (V8.2.4)...... 4 Mimer SQL Structured Query Language...... 5 Sub-queries Returning Lob’s (V10.1.3A)...... 5 Spatial Data Types and Functionality (V10.1.0) ...... 5 User-Defined Types and Methods (V10.1.0)...... 5 Support For FOR Loop in PSM (V9.3.7)...... 5 BEGINS Function (V9.3.7)...... 5 Automatic Refresh of Precompiled Statements (V9.3.6)...... 6 Removable Databanks (V9.3.4)...... 6 ALTER DATABASE SET AUTOUPGRADE (V9.3.4)...... 6 Specifying Size Limits for Databank Files (V9.3.3) ...... 6 Read Only Databanks (V9.3.3) ...... 7 Parameter Overloading (V9.3.0)...... 7 Specific Names (V9.3.0) ...... 7 Boolean Data Type (V9.3.0)...... 7 ii Contents

Compound Statement (V9.3.0)...... 8 SUBSTRING on CLOB and NCLOB Columns (V9.2.5)...... 8 Using LIKE Predicate for CLOB and NCLOB Columns (V9.2.4) ...... 8 ORDER BY on Expressions (V9.2.4) ...... 8 INSERT Large Object Column With a Subselect (V9.2.3)...... 9 Extended Support for Collations (V9.2.1) ...... 9 New Scalar Functions (V9.2.1)...... 9 New Views in INFORMATION_SCHEMA (V9.2.1)...... 9 Support for Scalar Subqueries (V9.2.1) ...... 9 WITH HOLD (V9.2.1)...... 10 NCLOB Data Type (V9.2.1) ...... 10 ALTER STATEMENT (V9.2.1) ...... 10 Triggers (V8.2.1) ...... 10 Instead-of Triggers (V8.2.1)...... 10 PSM Functions (V8.2.1) ...... 10 Schema Support (V8.2.1)...... 11 Sequences (V8.2.1) ...... 11 Relaxed Rules for Views (V8.2.1)...... 11 Updateable Primary Keys (V8.2.1) ...... 11 Named Constraints (V8.2.1) ...... 12 Recursive Procedures (V8.2.1) ...... 12 Record Data Type (V8.2.1)...... 12 ATOMIC (V8.2.1)...... 12 UNDO (V8.2.1) ...... 12 128 Character Names (V8.2.1) ...... 12 System View Support (V8.2.1) ...... 13 Like Expression (V8.2.1) ...... 13 Soundex Function (V8.2.1) ...... 13 New Reserved Words (V8.2.1)...... 14 SESSION_USER (V8.2.1) ...... 14 UNIQUE Columns May Be NULL (V8.2.1) ...... 14 OVERLAPS (V8.2.1)...... 14 GRANT/REVOKE on Individual Column (V8.2.1)...... 14 Revoke GRANT OPTION (V8.2.1)...... 14 COMMENT ON New Objects (V8.2.1) ...... 15 Optional AS in Select List (V8.2.1)...... 15 Explicit Defaults (V8.2.1)...... 15 LOCALTIME, LOCALTIMESTAMP (V8.2.1)...... 15 SET Statement (V8.2.1) ...... 15 Binary Data Type (V8.2.1)...... 15 Alter Table (V8.2.1)...... 16 On Delete Rule (V8.2.1)...... 16 Get Diagnostics in PSM (V8.2.1) ...... 16 Compiler Directives (V8.2.1)...... 16 New Scalar Functions (V8.2.1)...... 16 Online Backup (V8.2.1) ...... 17 Mimer ESQL Embedded SQL ...... 17 Support for L""-style String Literals in C (V9.3.8)...... 17 GET DIAGNOSTICS Option TRANSACTION_ACTIVE (V9.3.3) ...... 17 Support for Embedded Fortran (V9.2.4B)...... 17 Support for long long Data Type in C (V9.2.1) ...... 18 Support for NCLOB struct in C (V9.2.1)...... 18 Mimer SQL iii Features and Functionality History

Support for NATIONAL CHARACTER LARGE OBJECT (NCLOB) type (V9.2.1) . 18 WITH HOLD Cursors (V9.2.1)...... 18 Block Fetching of Result Sets (V9.1.4) ...... 18 Support for New SQL Statements (V8.2.1) ...... 19 SQL Statement Classification (V8.2.1) ...... 19 Full SQL92 Support (V8.2.1)...... 19 Character Pointer Support (V8.2.1)...... 19 Mimer ODBC – Open Database Connectivity ...... 19 Indicator Variables Support SQL_DEFAULT_PARAM (V9.2.3)...... 19 Mimer Specific Keywords to SQLDriverConnect (V9.2.2) ...... 19 Connection Attribute SQL_ATTR_CONNECTION_DEAD (V9.2.1)...... 20 Internal Array Fetching (V9.2.1)...... 20 Mimer Specific Descriptor Fields (V9.2.1) ...... 20 Support for NATIONAL CHARACTER LARGE OBJECT (NCLOB) type (V9.2.1) . 20 Parameter Arrays in Conjunction With Data at Execution Parameters (V9.1.3) .... 21 Unicode API (V9.1.1)...... 21 National Character Data Types (V9.1.1)...... 21 Large OBject Support (V9.1.1)...... 21 ODBC Version 3 Support (V8.2.1)...... 21 New ODBC Data Types (V8.2.1) ...... 21 New ODBC Data Types (V8.2.1) ...... 22 New ODBC Routines (V8.2.1)...... 22 ODBC Escape Clause Enhancements (V8.2.1)...... 23 Row Wise Parameter Binding (V8.2.1) ...... 23 New Statement Options (V8.2.1) ...... 23 Mimer BSQL ...... 23 New List and Describe Functionality (V9.3.0) ...... 23 SET EXECUTE ON/OFF Statement (V9.2.2) ...... 23 SET EXPLAIN ON/OFF Statement (V9.2.2) ...... 24 Additional Parameters for BSQL Command (V9.2.1) ...... 24 List/Describe Functions for Collations (V9.2.1)...... 24 UTIL Functionality (V9.2.1)...... 25 New Data Type NCLOB (V9.2.1)...... 25 Enhanced File I/O (V9.1.1) ...... 25 Limiting the Amount of Data Displayed (V9.1.1)...... 25 Support for New SQL Syntax (V8.2.1) ...... 25 Delimited Data in LOAD/UNLOAD (V8.2.1) ...... 25 DbVisualizer ...... 26 Overloaded Function Names (V9.3.7E)...... 26 New Version of DbVisualizer (V9.3.5)...... 26 DbVisualizer (V9.2.4D)...... 26 Mimer Utilities ...... 26 Miminfo SQLPOOL Information Extended (V9.3.7F) ...... 26 MIMLOAD UNLOAD To Two Files (V9.3.7E)...... 26 MIMLOAD Performance Improvement (V9.3.7)...... 27 MIMLOAD File Size Reduction (V9.3.7) ...... 27 MIMLOAD Support For NCLOB (V9.3.7)...... 27 Updated DBC Syntax (V9.2.1) ...... 27 DBOPEN Command Line Arguments (V9.2.1) ...... 27 EXPTOLOAD (V9.2.1)...... 27 iv Contents

Mimer UTIL ...... 27 New Functions...... 27 VMS Specific Features...... 28 Long Form Switches (V9.3.4)...... 28 The TCPCONTROL Command Procedure (V9.2.1)...... 28 UNIX Specific Features ...... 29 Unicode and Long Form Switches (V9.3.4)...... 29 DbVisualizer (V9.2.4F) ...... 29 .dumper.sh Script (V9.2.1) ...... 29 New Method For Local Communication (V9.1.4)...... 30 Large Files Support (V8.2.4)...... 31 Automatic Startup (V8.2.2)...... 31 Man Pages (V8.2.2)...... 31 RPM Support (V8.2.2) ...... 31 JDBC Driver (V8.2.2)...... 31 New Utilities – Version 8.2 (V8.2.2) ...... 31 I/O Threads (V8.1.3) ...... 32 POSIX Threads (V8.1.1) ...... 32 New Utilities – Version 8.1 (V8.1.1) ...... 32 Managing /etc/sqlhosts Using mimhosts (V8.1.1)...... 33 Managing Client Connects Using mimtcp (V8.1.1)...... 34 Symbolic Links to Mimer (V8.1.1) ...... 34 Windows Specific Features...... 34 Configurable Extend Size (V9.3.8)...... 34 Mimer Administrator Enhancements (V9.3.8) ...... 34 Export of Shadowing Database (V9.3.8)...... 34 SQLConfig Support on Device (V9.3.8) ...... 35 Authenticode Signatures (V9.3.7)...... 35 PDACOPYW Compression Control (V9.3.6C) ...... 35 SQLConfig Support on Device (V9.2.5E, V9.3.5) ...... 35 Expanded Unicode Support (V9.3.5)...... 35 Windows Mobile 5.0 Support (V9.2.5E, V9.3.5)...... 35 Unicode and Long Form Switches (V9.3.4)...... 36 Running BSQL Without Installing (V9.3.0)...... 36 Home Directory Path (V9.2.5) ...... 36 Service Descriptions (V9.2.5) ...... 37 Mimer ODBC Trace (V9.2.2) ...... 37 Automatic Database Server Memory Configuration (V9.2.1) ...... 37 Getting Started after Reboot (V8.2.4)...... 38 Automatic Server Restart (V8.2.1)...... 38 New File Extensions (V8.2.1) ...... 38 New Routines for ODBC Driver Configuration (V8.2.1) ...... 38 Mac OS Specific Features ...... 38 The Mac OS X Documentation (V9.2.4)...... 38 DbVisualizer (V9.2.4D)...... 38 Mimer SQL Mobile Specific Features ...... 38 J2ME/CDC Support (V9.3.5) ...... 38 Running the Export to Handheld Wizard Without Installing (V9.3.1)...... 39 Mimer SQL Engine Support on Pocket PC (V9.2.5)...... 39 Mimer SQL v Features and Functionality History

Pocket PC Memory (V9.2.5)...... 39 Databank Size Reduction (V9.2.2H) ...... 39 Import Database From Handheld Device (V9.2.1) ...... 39 New Server Type on Desktop (V9.2.1) ...... 39 Mobile Server on Desktop (V9.2.1) ...... 40 Chapter 2 Changed Features and Functions ...... 41 The Mimer SQL Database Server...... 41 Improved UNION ALL Optimization For Views (V9.3.2)...... 41 Smaller Page Sizes Used at End of LOB Storage (V9.2.5) ...... 41 Compressed Commit Set (V9.2.5)...... 41 More Efficient Bitmap Handling (V9.2.5)...... 42 New Compressed Form for Data Storage (V9.2.5) ...... 42 Performance Enhancements (V8.2.4)...... 42 Faster Access with Long Read-only Transactions (V8.2.4) ...... 42 Index Lookup Only (V8.2.1) ...... 42 New Reorganization Algorithm (V8.2.1)...... 43 Bitmap Lookup (V8.2.1) ...... 43 Databank Check in Background (V8.2.1)...... 43 Block Pre-fetch (V8.2.1)...... 43 Caching of Compiled Queries (V8.2.1) ...... 43 Optimized Sort/Load Operations (V8.2.1)...... 43 Enhanced Work Table Management (V8.2.1)...... 44 Optimized Aggregate Functions Expressions (V8.2.1) ...... 44 Group by Optimization (V8.2.1)...... 44 New Licensing System (V8.2.1)...... 44 Mimer SQL Structured Query Language...... 44 MIMER_ROWID Pseudo-key For Trigger’s OLD/NEW Tables (V10.1.1B) ...... 44 Scrollable Cursors and WHERE CURRENT (V9.3.7)...... 44 New Columns in INFORMATION_SCHEMA Views (V9.3.3)...... 45 Changed Data Types in INFORMATION_SCHEMA View (V9.3.3) ...... 45 Improved UNION ALL Optimization For Views (V9.3.2)...... 45 CREATE and ALTER DATABANK Syntax (V9.3.1)...... 45 New Reserved Words (V9.3.1) ...... 45 Specification of ISOLATION LEVEL READ UNCOMMITTED (V9.3.0)...... 46 Changed Date and Time Arithmetic (V9.3.0) ...... 46 Using Tables With LOB Columns in Triggers (V9.2.4)...... 46 Collations and NCHAR (V9.2.1)...... 46 New Columns in INFORMATION_SCHEMA Views (V9.2.1)...... 46 Changed Privilege Check in Views (V9.2.1)...... 47 Cascade/Restrict (V8.2.1)...... 47 Privilege Changes (V8.2.1)...... 47 No Duplicate Privileges (V8.2.1)...... 48 Update Statistics Cleans Indexes (V8.2.1)...... 48 Representation of DOUBLE PRECISION and FLOAT (V8.2.1) ...... 48 CREATE IDENT Changes (V8.2.1)...... 48 CREATE DATABANK Changes (V8.2.1)...... 49 Hex-constants (V8.2.1) ...... 49 DDL-statements in Transactions (V8.2.1) ...... 49 Mimer ESQL Embedded SQL...... 49 ESQL Command-Line Arguments (V9.3.4) ...... 49 vi Contents

New SQL Descriptor Code for BIGINT (V.9.3.3)...... 49 Mimer ODBC – Open Database Connectivity ...... 50 SQLGetDiagField Returns Row Value for SQL_DIAG_ROW_NUMBER (V9.3.7) 50 Indicator Variables Return SQL_NO_TOTAL (V9.3.6)...... 50 Need Data State Now Handled at Statement Handle Level (V9.3.5)...... 50 SQLBrowseConnect and SQLDriverConnect (V9.2.2)...... 50 Mimer Product Name (V9.2.1)...... 51 Performance Enhancements (V8.2.1)...... 51 Less Server Communication with ODBC (V8.2.1)...... 51 Automatic Read-only Cursors with Auto-commit (V8.2.1) ...... 51 SELECT FOR UPDATE (V8.2.1) ...... 51 SQLSTATE Changes (V8.2.1)...... 52 Changes to ODBC Routines (V8.2.1)...... 52 Truncate Without Warning by SQLFetch (V8.2.1) ...... 52 Mimer SQL Data Type FLOAT (V8.2.1)...... 52 Extended SQLGetData Functionality (V8.2.1)...... 52 Mimer BSQL...... 53 BSQL Command-line Arguments (V9.3.4)...... 53 The CONNECT Statement (V8.2.4)...... 53 List and Describe (V8.2.1)...... 53 Show Settings (V8.2.1)...... 53 Mimer Utilities...... 53 Replication Subscription Table Limit Removed (V9.3.7)...... 53 Unimportant REPSERVER Logging Removed (V9.3.7) ...... 53 MIMLOAD Command-line Arguments (V9.3.4)...... 54 DBOPEN Command-line Arguments (V9.3.4)...... 54 MIMLOAD (V9.1.1)...... 54 Mimer UTIL ...... 54 Load/Unload Menu (V8.2.1) ...... 54 Using UTIL in a Script (V8.2.1)...... 54 Using INFORMATION_SCHEMA (V8.2.1)...... 54 VMS Specific Features...... 55 ESQL Command-Line Arguments (V9.3.4) ...... 55 BSQL Command-line Argument (V9.3.4)...... 55 MIMLICENSE Command-line Argument (V9.3.4)...... 55 MIMLOAD Command-line Argument (V9.3.4)...... 55 MININFO Command-line Argument (V9.3.4)...... 55 Dump Files and MIMER.LOG (V8.2.4)...... 55 MIMINFO Command Syntax for Selecting a Database (V8.2.4) ...... 55 MIMTCP Process (V8.2.2) ...... 56 Installation is Pre-linked (V8.1.1) ...... 56 No Single-user Mode Libraries (V8.1.1)...... 56 New SINGLEDEFS.DAT Parameter (V8.1.1)...... 56 Changed Directory Structure (V8.1.1)...... 57 Multi-vendor TCP/IP Support (V8.1.1)...... 57 Changed MIMSETUP8 Parameters (V8.1.1)...... 57 DECNET Object Name is the Database Name (V8.1.1)...... 57 No Files on SYS$SHARE (V8.1.1) ...... 58 MULTIDEFS.DAT (V8.1.1)...... 58 Mimer SQL vii Features and Functionality History

UNIX Specific Features...... 58 Added Sudo Support (V9.3.8B) ...... 58 dbinstall Execution (V9.2.1)...... 59 New I/O Primitives Used on Solaris (V9.2.1) ...... 59 The DumpScript Parameter in the multidefs File (V8.2.4F) ...... 59 Automatic Server Dump Facility (V8.2.4)...... 59 Updated Error Tracing (V8.2.4)...... 59 Root Not Required (V8.2.2)...... 60 Example makefile Version 8.2 (V8.2.2)...... 60 Licensing System (V8.2.2)...... 60 SDBGEN (V8.2.2)...... 60 Default Number of Users (V8.2.2) ...... 61 tmp Not Used (V8.2.2)...... 61 Client Channel Limit (V8.1.3D)...... 61 Asynchronous I/O Limit (V8.1.3D) ...... 61 MemLock Default in multidefs (V8.1.3D) ...... 62 Menu System, mimadmin (V8.1.3) ...... 62 mimunlink (V8.1.3)...... 62 MIMER_HOME Not Required (V8.1.3) ...... 62 Single-user Shared Library Lookup ...... 62 Database Server Startup ...... 63 Example makefile Version 8.1 (V8.1.3)...... 63 Database Server Alert Messages (V8.1.2)...... 63 Administration Environment (V8.1.1)...... 63 No Single-user Mode Programs (V8.1.1)...... 63 Changed Directory Structure (V8.1.1)...... 64 DB Server Configuration File, multidefs (V8.1.1)...... 64 Database Registry File, /etc/sqlhosts (V8.1.1)...... 64 TCP Ports for Database Servers (V8.1.1) ...... 65 Database Server Aliases (V8.1.1) ...... 65 Database Server Dump Directory (V8.1.1)...... 65 ODBC Support (V8.1.1) ...... 65 Windows Specific Features...... 66 Embedded SQL Support (V9.3.8)...... 66 Administrative Privileges (V9.3.7E) ...... 66 Protocol for Old Emulator Dropped (V9.3.5) ...... 66 SmartDevice Directory Structure (V9.2.5E, V9.3.5) ...... 66 C Runtime Library (V9.3.5)...... 67 Renamed Wizards (V9.3.4) ...... 67 Mimer Administrator (V8.2.1) ...... 67 Mimer Info Enhancements (V8.2.1)...... 67 DB-check Enhancements (V8.2.1) ...... 67 Mimer SQL Mobile Specific Features...... 68 PDACOPY Wizard Simplified (V9.3.5)...... 68 Filenames Altered During Export (V9.2.5)...... 68 Mimer Explorer Enhancements (V9.2.1)...... 68 Chapter 3 Corrected Features and Functions...... 69 The Mimer SQL Database Server...... 69 Internal Databank Identifier Invalid (V9.3.8B) ...... 69 viii Contents

Background Dbcheck Hang (V9.3.8)...... 69 LOGDB Restart (V9.3.8) ...... 69 Improved Control of LOB References Outside Databank End-of-file (V9.3.8)...... 69 LOB’s In Databank Created By an Old Mimer Version (V9.3.7G)...... 70 Problem With Large SQL Statements (V9.3.7F)...... 70 Table Control Area Exhausted (V9.3.7F)...... 70 SQLPool Exhausted During Restore (V9.3.7E) ...... 70 Recompilation of Views Closing Cursors (V9.3.7)...... 70 Online Backup (V9.3.7) ...... 70 Large Object Restart (V9.3.7)...... 71 Write Set Corrupt when Automatic Refresh (V9.3.6)...... 71 Server Hangs when Less than Seven 16K Pages (V9.3.6)...... 71 Read-only Transactions (V9.3.3) ...... 71 -19078 Warning on the Error Log (V9.3.3) ...... 71 ALTER DATABANK’S FILESIZE Option (V9.3.2)...... 71 ALTER DATABANK To READ ONLY (V9.3.2) ...... 71 CAST Boolean AS Varchar (V9.3.2)...... 71 Update Statistics (V9.3.1) ...... 72 Execution Interrupted by Scheduler (V9.2.5)...... 72 Online Backup Improvements (V9.2.4) ...... 72 Recreating a Smaller LOGDB (V9.2.4) ...... 72 Improved Index Handling (V9.2.4) ...... 72 ORDER BY With Many Indexes (V9.2.2G)...... 72 More Than 32 Foreign Key References From a Table (V9.2.2)...... 72 Interrupted UPDATE STATISTICS (V9.2.2)...... 73 Implicit Databank Verification Causing Loop (V9.2.2)...... 73 Using Columns With Collations in Primary Keys or Indexes (V9.2.1C) ...... 73 XA Transactions – Migrating Between Processes (V9.2.1)...... 73 XA Transactions – Object Reference After Restart (V9.2.1)...... 73 Database Hang During Databank Verification (V9.2.1)...... 73 Next Values of Sequences (V8.2.4)...... 73 Online Backup Problem (V8.2.4E)...... 74 Background Thread Loop (V8.2.4E)...... 74 Multiple Updates of Same Record with Secondary Index Access (V8.2.4E) ...... 74 Invalid Timestamp Messages During online Backup (V8.2.4E)...... 74 Creating Temporary Tables Using MIMER/PG (V8.2.4E) ...... 74 Many Request Threads and High Load (V8.2.4) ...... 74 Growing T-cache (V8.2.4)...... 74 Error Handling and Low Memory (V8.2.4) ...... 75 DDL Statements and Older Clients (V8.2.4)...... 75 Mimer ESQL Clients (V8.2.4) ...... 75 Commit Set Problems (V8.2.4)...... 75 Accessing Views in Read Only Transactions (V8.2.3) ...... 75 Mimer SQL Structured Query Language...... 76 Error Handling Mixing Set Functions and Column Expressions (V10.1.2B) ...... 76 INSERT VALUES With Scalar Subquery (V10.0.8)...... 76 Error Handling Mixing Set Functions and Column Expressions (V10.0.8) ...... 76 CASE With Different Collations (V10.0.3)...... 77 Scrollable Cursor For UNION ALL With Variable Length Columns (V10.0.3)...... 77 Sub-query With Set Function as Argument to Function (V10.0.6J)...... 77 OUTER JOIN Optimization (V10.0.5C) ...... 77 Complex Old/New Table Query Out Of Memory (V9.3.8B)...... 77 Mimer SQL ix Features and Functionality History

Outer Join With schema.table.* (V9.3.8B)...... 77 Many Values in IN Clause (V9.3.8B)...... 78 Support for Clients Running version 7 (V9.3.8) ...... 78 Recursive Stored Procedures (V9.3.8) ...... 78 BEGINS With Long Literal (V9.3.8) ...... 78 SELECT DISTINCT on Part of Primary Key (V9.3.7G) ...... 78 Default NULL For Binary Columns (V9.3.7F)...... 78 Drop Filesize For System Databanks (V9.3.7E)...... 78 Problem With For Loop in PSM ...... 79 OUTER JOIN With DISTINCT In Views (V9.3.7E)...... 79 Precompiled Statement Problem (V9.3.6C) ...... 79 Scrollable Cursor for Result-set Procedures (V9.3.6C)...... 79 Invalid Path When Creating Statements (V9.3.6C)...... 79 Problem Using Precompiled Statements (V9.3.6C) ...... 79 ORDER BY Indexed Column Not In SELECT List (V9.3.6C) ...... 79 FETCH LAST Returns NO DATA (V9.3.6C) ...... 80 COUNT DISTINCT in JOIN (V9.3.6C) ...... 80 Insert Using Boolean Variable (V9.3.5)...... 80 Self Referencing Foreign Keys (V9.3.3) ...... 80 Date Arithmetics (V9.2.5)...... 80 UPDATE WHERE CURRENT and Primary Key Duplicates (V9.2.4) ...... 80 Compound SQL Statements and Large Objects (V9.2.4) ...... 80 LOB Values Incorrectly Returned as NULL (V9.2.3B) ...... 81 LIKE Predicate in Functions or Procedures (V9.2.2H)...... 81 CAST From Timestamp to Time (V9.2.2G)...... 81 Defining Foreign Keys With On Delete (V9.2.2G) ...... 81 Numeric Collations (V9.2.2G)...... 81 MAX/MIN on Variable Length Columns (V9.2.2E) ...... 81 MAX/MIN on NCHAR Column Included in Index (V9.2.2E) ...... 82 Varchar Function in SELECT (V9.2.2E)...... 82 UPDATE With LOCALTIMESTAMP and NULL (V9.2.2E) ...... 82 Error When Updating Foreign Keys (V9.2.2E)...... 82 Multiple Column Indexes (V9.2.2E)...... 82 UPDATE With Subquery (V9.2.2E) ...... 82 Temporary Storage Areas in PSM (V9.2.2E)...... 82 Case Statement in Continue Handler (V9.2.2E)...... 82 Multi Statement SQL With Triggers (V9.2.2E) ...... 83 Missing Cascade Effects (V9.2.2E)...... 83 Scrollable Cursor and WCHAR Host Variables (V9.2.2D) ...... 83 LEFT JOIN and Descending Index (V9.2.2D)...... 83 Declare Cursor WHERE CURRENT Mismatch in PSM (V9.2.2C)...... 83 Invalid Argument Allowed for ASCII_CODE in PSM (V9.2.2C) ...... 83 Table Lookup Problem in PSM (V9.2.2C) ...... 83 Type Resolution Problem for COALESCE in PSM (V9.2.2C)...... 84 Date Arithmetic Problem in PSM (V9.2.2C) ...... 84 On-line Backup (V9.2.1F) ...... 84 Integrity Constraints and Triggers (V9.2.1C)...... 84 Remaining Triggers (V9.2.1C) ...... 84 Incorrect SQLSTATE in PSM (V9.2.1C)...... 84 CASE Statement in Scope of Continue Handler (V9.2.1C)...... 84 Dropping VARYING Length Column Using ALTER TABLE (V9.2.1B) ...... 85 Scalar String Functions and Parameter Markers (V9.2.1)...... 85 SUM Combined With GROUP (V9.2.1) ...... 85 x Contents

UPPER/LOWER and the German Character ß (V9.2.1)...... 85 Dropping Idents (V8.2.4) ...... 85 Domains, Check Clauses and UPDATE STATISTICS (V8.2.4) ...... 85 Function SUBSTRING in PSMs (V8.2.4) ...... 86 LEAVE LABEL and Atomic Compound Statement (V8.2.4)...... 86 Qualified Function Reference in Set Statement (V8.2.4)...... 86 PSM Routines and Triggers (V8.2.4)...... 86 Updating Using Next Value of Sequence (V8.2.4)...... 86 ALTER TABLE and Constraints (V8.2.4) ...... 86 Columns and the WITH GRANT OPTION (V8.2.1) ...... 86 Longer Character-string Literals (V8.2.1)...... 86 Using DISTINCT in Views (V8.2.1)...... 87 ALTER TABLE and Dropping Columns (V8.2.1) ...... 87 Value of USER in Stored Procedure (V8.2.1) ...... 87 Support for GET DIAGNOSTICS (V8.2.1) ...... 87 View with Subquery and Check Option (V8.2.1)...... 87 ABS Function for Interval (V8.2.1) ...... 87 Non-deterministic Check Constraint (V8.2.1) ...... 87 Grant on Added Columns (V8.2.1)...... 87 Deallocating Statements in a Transaction (V8.2.1) ...... 87 Logical Expressions in PSM (V8.2.1) ...... 88 Loss of Significance PSM (V8.2.1) ...... 88 Scrollable Cursor and Union (V8.2.1)...... 88 Like Patterns in PSM (V8.2.1) ...... 88 Unique Constraints (V8.2.1) ...... 88 Time Problems (V7.3.x)...... 88 Mimer ESQL Embedded SQL ...... 88 WHERE CURRENT Internal Error (V9.3.7F)...... 88 Commits in Procedures Not Closing Cursors (V9.3.7)...... 89 Fetching Using a Reopened Scrollable Cursor (V9.3.7)...... 89 External Character Set Support (V9.3.5) ...... 89 Scrollable Cursor (V9.2.5)...... 89 Setting Binary Descriptors With Character Data (V9.2.2E) ...... 89 Too Many Host Variables (V9.2.2D)...... 90 Mimer ODBC – Open Database Connectivity ...... 90 Malformed Cancel Requests (V9.3.8B)...... 90 SQL_DESC_LENGTH for Binary Columns (V9.3.8B)...... 90 SQL_ATTR_PARAM_OPERATION_PTR Array (V9.3.7)...... 90 SQL_ATTR_PARAM_STATUS_PTR Array Not Filled Properly (V9.3.7)...... 90 External Character Set Support (V9.3.5) ...... 91 Access Violation When Too Many Handles (V9.3.5)...... 91 SQLNativeSql With Truncated Destination Strings (V9.3.5) ...... 91 Conversion of Character Data to SQL_C_DOUBLE (V9.3.5) ...... 91 Truncating a Datetime or Interval (V9.3.5)...... 91 Default Conversion for the SQL BIGINT Data Type Unavailable (V9.2.4) ...... 91 Unknown Request Code in Network Package when Closing Cursors Against a Mimer 8.2.6 Server. (V9.2.3) ...... 92 Conversion From Wide Character Parameter (V9.2.2G)...... 92 ODBC Stand-alone Installation (V9.2.2E)...... 92 Disconnect Failure (V9.2.2E)...... 92 Statement Increasing in Size Problem (V9.2.1C) ...... 92 Mimer SQL xi Features and Functionality History

Support of SQL_ATTR_FETCH_BOOKMARK_PTR (V9.2.1B) ...... 93 Incorrect Capability Information for Forward Only Cursors (V9.2.1B) ...... 93 Transaction That Lives On in Autocommit Mode When a BLOB, CLOB or NCLOB Operation Fails (V9.2.1)...... 93 Transaction That Lives On in Autocommit Mode When a Forward Only Cursor is Lim- ited by the SQL_ATTR_MAX_ROWS Attribute (V9.2.1) ...... 93 Auto-Commit of Read-Only Cursors (V9.2.1)...... 93 MFC and Mimer ODBC Include Files (V9.1.3)...... 94 MINODBC.H and MFC (V9.1.3)...... 94 SQLColAttributes driver specific attributes (V8.2.4D)...... 94 SQL_DESC_NAME and SQL_DESC_LABEL Regarded as Equal (V8.2.4) ...... 94 Problem with V8.2.1– 8.2.3 Clients (V8.2.4) ...... 94 Arrayed Procedure Calls in Auto-commit Mode (V8.2.4)...... 95 Time and Timestamp Column Truncation (V8.2.1) ...... 95 Auto-commit Behavior (V8.2.1)...... 95 REMARKS Column in Result Sets (V8.2.1) ...... 95 Truncation of Date/Time Values (V8.2.1) ...... 95 Fetching Rowsets (V8.2.1) ...... 95 Interval Data Types (V8.2.1)...... 95 SQLForeignKeys (V8.2.1)...... 96 CALL with Qualified Procedure Names (V8.2.1) ...... 96 SQLColAttribute and Intervals (V8.2.1)...... 96 Commit Affects Executed But Not Fetched Cursors (V8.2.1) ...... 96 SQLMoreResults Causes a Premature Autocommit (V8.2.1)...... 96 TINYINT not Supported by CONVERT (V8.2.1)...... 96 Mimer BSQL ...... 96 Duplicated Output in Readlog (V9.3.8B)...... 96 Altered Tables in Readlog (V9.3.8B)...... 96 Incorrect Privilege Description (V9.3.8B)...... 96 Tables Not Found in Readlog (V9.3.8) ...... 97 Operations Not Shown in Readlog (V9.3.8) ...... 97 Describe View Problem (V9.2.5)...... 97 Read Input (V9.2.5) ...... 97 Describe Result in Wrong Order (V9.2.2E) ...... 97 Using in Load Statement (V9.2.2E)...... 97 Failed Procedure Calls With Input Followed by Output Parameters (V9.2.1)...... 97 String Literal Usage (V9.2.1)...... 98 Describe Functions – New Client/Old Server (V9.1.2)...... 98 Describe Table (V8.2.1) ...... 98 Log Files (V8.2.1)...... 98 Transactions and Connections (V8.2.1)...... 98 DbVisualizer ...... 98 Overloaded Function and Procedure Names (V9.3.7E) ...... 98 Mimer Utilities ...... 98 Interrupted Display of Users List (miminfo –u) (V9.3.8B) ...... 98 MIMLOAD and Stopping Server (V9.3.8) ...... 99 DBC Long File Names (V9.3.7F)...... 99 REPSERVER Missing Transactions (V9.3.7) ...... 99 Upgrading From V9.3.5 Replication ...... 99 MIMSYNC Multi-column Primary Key Problem (V9.3.7) ...... 99 MIMSYNC Comparison Problem (V9.3.7)...... 99 xii Contents

MIMLOAD Error Message Problem (V9.2.5)...... 100 DBC Giving Errors for SQLDB After Crash (V9.2.4)...... 100 Comments Causing Misplaced Breakpoints (V9.2.2E) ...... 100 DBC Program Not Fulfilling Databank Control (V9.2.2E) ...... 100 MIMLOAD and Views Using Sequences (V9.2.2E)...... 100 MIMLOAD and LOB Data (V9.1.3)...... 100 Mimer UTIL ...... 100 Importing Files (V8.2.3) ...... 100 Upgrading...... 100 Default NULL (V9.2.2)...... 100 Invalid Record Length for Index Tables with Character Varying Columns (V9.1.3) 101 CREATE TABLE and Check Clauses (V8.2.4) ...... 101 Database Inconsistencies (V8.2.4)...... 101 Missing Column Privileges (V8.2.4) ...... 101 Unrecognized Keywords from V 7 (V8.2.3) ...... 101 VMS Specific Features...... 102 Login Delay Problem (V9.3.7) ...... 102 Using MIMINFO with DCL Command Qualifiers (V9.2.3C)...... 102 Error Messages in MIMER.LOG From Disconnected Clients (V9.2.1) ...... 102 Hang When Waiting for I/O Completion (V9.1.3)...... 102 Stopping a Database Server with Local Users Connected (V8.2.4)...... 102 Stopping a Database Server with Users Connected via TCP/IP (V8.2.4) ...... 103 MIMTCP Keeping a Connection Open (V8.2.4)...... 103 UNIX Specific Features ...... 103 miminfo -u and Crashing Server (V9.2.4) ...... 103 Undeleted Files Under /var/tmp (V9.2.1)...... 103 Error Messages in mimer.log From Disconnected Clients (V9.2.1) ...... 103 Connection Handshake Using /var/tmp (V9.2.1)...... 103 Logging Out Local Connections by mimcontrol -l (V9.2.1) ...... 104 Named Pipes in /var/tmp (8.2.4F)...... 104 mimlicense Usage in miminstall (V8.2.4F)...... 104 mimunlink and man-pages (V8.2.4F) ...... 104 TMPDIR Verification in Shell Scripts (V8.2.4F)...... 104 Pathlist with Repeated Paths (V8.2.4)...... 105 Relocated Documentation Index (V8.2.4)...... 105 The Compatability Library (V8.2.4) ...... 105 The mimadmin Tool (V8.2.4) ...... 105 The dbinstall Tool (V8.2.4)...... 105 The mimstatln Program (V8.2.4)...... 105 The mimdbfiles Tool (V8.2.4)...... 105 The mimautoset Tool (V8.2.4)...... 106 Updated Error Messages (V8.2.4) ...... 106 Problem with Long Pathnames in mimhosts (V8.2.3) ...... 106 Unexpected Line Wrap (V8.1.3B) ...... 106 Wrong Error Message (V8.1.3) ...... 106 Automatic inetd Daemon Re-start (V8.1.3)...... 106 Single-user Mode Databank Pathlist (V8.1.3) ...... 106 Windows Specific Features...... 107 Mimtrace Manifest (V9.3.8C)...... 107 Long Database Names (V9.3.8)...... 107 Uninstalling on Windows Vista (V9.3.8) ...... 107 Mimer SQL xiii Features and Functionality History

Output Text File Problem (V9.3.7F)...... 107 Mimcontrol Hang on Windows Vista (V9.3.7E)...... 107 Unicode Installation Directory (V9.3.5) ...... 107 XA Library Registration (V9.2.5) ...... 108 PSM Debugger Shortcut (V9.2.5)...... 108 Checking SYSDB Using Databank Check Utility (V9.2.2E) ...... 108 Using the NT Performance Monitor on Older Servers (V8.2.4) ...... 108 Default License Key during Reboot (V8.2.4)...... 108 Event Log Registry Entries during Uninstall (V8.2.4)...... 108 Uninstalling Default Data Source (V8.2.1)...... 108 Parallel MIMCONTROL Operations (V8.2.1) ...... 109 Mimer SQL Mobile Specific Features...... 109 Create Example Environment (V9.3.3) ...... 109 Export to Handheld Wizard Command Line Options (V9.3.2) ...... 109 TCP Server Process on Pocket PC (V9.2.5)...... 109 Delimited Identifiers in the Mimer Explorer (V9.2.1)...... 109 Statement Types in Mimer Explorer (V9.2.1)...... 109 Chapter 4 Deprecated Features and Functions...... 111 Mimer SQL Structured Query Language...... 111 PSM: JOIN Without SELECT (V9.3.7) ...... 111 Unqualified Column Name in ORDER BY When Duplicated (V9.2.4)...... 111 MIMER Views (V8.2.1)...... 112 SET TRANSACTION CHANGES (V8.1.1) ...... 112 Mimer ESQL Embedded SQL...... 112 Windows: SQLCA and SQLDA Removed (V9.3.8) ...... 112 JOIN Without SELECT (V9.3.7)...... 112 Vendor Specific SQL Removed (V9.2.1) ...... 112 INCLUDE SQLCA (V7.x.x) ...... 113 SQLCODE (V7.x.x)...... 113 SQLDA (V7.x.x)...... 113 BSQL...... 113 Mimini Initiation File (V9.3.5) ...... 113 Load/Unload Deprecated (V9.1.1)...... 113 Mimer Utilities ...... 114 Mimer UTIL (V9.2.1) ...... 114 Windows Specific Features...... 114 Level2 Database API (V9.3.8)...... 114 xiv Contents Mimer SQL 1 Features and Functionality History Chapter 1 New Features and Functions

This chapter describes new features and functionality introduced into Mimer SQL in previous versions.

The Mimer SQL Database Server

Internal Databank Identifier Invalid (V9.3.8B) A problem has been corrected that under rare circumstances would cause COMMIT to fail with an –16185 error code (internal databank identifier invalid). The error message occurs because the problem allows an accessed databank to close before the transaction is completed. A backup operation is expected to have been concurrent with the failing transaction when an error occurred.

Background Dbcheck Hang (V9.3.8) In extremely rare circumstances the database server would hang when performing a background databank check of the data pages in a databank. For the situation to occur other request must be updating data and the background check must be checking a table with collations. This is now corrected.

LOGDB Restart (V9.3.8) The restart of large objects in LOGDB could at times reference large objects from the user databank. This caused an incorrect LOGDB corrupt message to be returned. This has now been corrected.

Improved Control of LOB References Outside Databank End-of-file (V9.3.8) The control of large object references when doing implicit verification or when applying a restart set to a databank has been changed. Previously this was signalled as an I/O error (end of file) in the log and almost ignored. Now the databank is considered as corrupt and is disabled for further use. 2 New Features and Functions The Mimer SQL Database Server

Both mentioned operations occur the first time a databank is opened after a database server start. (Implicit databank verification is only run if the database server is not correctly stopped.)

LOB’s In Databank Created By an Old Mimer Version (V9.3.7G) Storage of large objects (LOB’s) has been slightly changed in version 9.3. This led to an introduction of an error when deleting records or updating a column with LOB data in tables held in a databank upgraded from an earlier Mimer version. The error is now corrected.

Problem With Large SQL Statements (V9.3.7F) In some cases, compiling large SQL statements via ODBC caused a server crash. The problem occurred if the connection attribute SQL_NOSCAN was set to off. One way to avoid this problem in versions prior to 9.3.7F is to set the attribute to on by the call: rc = SQLSetConnectOption(Connection(ConnectionIdx).hdbc, SQL_NOSCAN, SQL_NOSCAN_ON);

Anyhow, the problem is now corrected.

Table Control Area Exhausted (V9.3.7F) In cases where there was a large bufferpool and the application performed a large number of changes in a databank with WORK option it was possible that the system used an excessive number of table control blocks. In this version the system will not use more than half the table control blocks in these cases. In addition, it will only report table control area exhausted a few times rather than filling the mimer.log with these messages.

SQLPool Exhausted During Restore (V9.3.7E) When performing restore of a databank the system, at times, reported that the space in the SQLPOOL was exhausted, while in fact it was not. This has now been corrected.

Recompilation of Views Closing Cursors (V9.3.7) If internal recompilation of views were needed (e.g. when performing UPDATE STATISTICS) and the amount of open tables were above a certain level, recompilation of views erroneously closed all open cursors when the internal view recompilation committed its changes. This has been corrected in the database server.

Online Backup (V9.3.7) When performing online backups the system would in very rare circumstances stop with an internal inconsistency logged in the mimer.log file. When this happened the backup was complete and the system could be restarted with no special actions. The cause of the shutdown has now been corrected. Mimer SQL 3 Features and Functionality History

Large Object Restart (V9.3.7) During long restart sequences involving large object columns the system at times incorrectly reported the databank to be corrupt. This has now been corrected.

Write Set Corrupt when Automatic Refresh (V9.3.6) Creating an index or some other statement that caused an automatic refresh of precompiled statements could give the error -16206, “Write set corrupt”. This is now corrected.

Server Hangs when Less than Seven 16K Pages (V9.3.6) When running a server with less than seven 16K pages the server may hang. Previously, the absolute minimum number of 16K pages was specified to be 4. For physical reasons, the absolute limit is now 4 only if there are 64K buffer pool pages in the system. If there are no 64K buffer pool pages, the lower limit is 5 pages. Also, a problem has been corrected that will now indeed allow five and six 16K buffer pool pages.

Read-only Transactions (V9.3.3) A problem introduced in v9.3.1 has been corrected that could cause the SET TRANSACTION READ ONLY statement to be ignored. The problem would typically occur if the transaction was the very first transaction for the user.

-19078 Warning on the Error Log (V9.3.3) A problem has been corrected that could cause “Invalid MOS parameter” warning messages on MIMER.LOG. The warnings could occur during very high load with very complex SQL statements.

ALTER DATABANK’S FILESIZE Option (V9.3.2) Support for the SET FILESIZE and DROP FILESIZE in the ALTER DATABANK statement is now implemented.

ALTER DATABANK To READ ONLY (V9.3.2) In version v9.3.1 it was possible to change the option for a databank to READ ONLY even though the databank contained tables that were defined as using a current collation. This is not allowed in version 9.3.2 and later.

CAST Boolean AS Varchar (V9.3.2) Using the construction CAST( AS varchar(5)) could cause memory corruption. This is now corrected. 4 New Features and Functions The Mimer SQL Database Server

Update Statistics (V9.3.1) A problem with the dictionary cache not being updated after an UPDATE or DELETE STATISTICS statement has now been corrected.

Performance (V9.2.1) A large number of performance improvements have been made in this version. The improvements include the introduction of a compilation information cache which significantly reduces compilation time.

LOAD/UNLOAD (V9.1.1) New commands, LOAD and UNLOAD, have been implemented to facilitate transferring data to and from . LOAD and UNLOAD can be used with Mimer SQL from any ODBC- based SQL command interpreter. For more information, see the Mimer SQL System Management Handbook.

PSM Debugger (V8.2.4) A Java-based graphic debugger for PSM routines has been added. The PSM Debugger has support for watching variables, step-wise execution and setting breakpoints. You can debug procedures, functions and triggers. The PSM Debugger requires a Java 2 (version 1.2 or later) compatible Java runtime environment. For more information, see the Mimer SQL Programmer’s Manual.

Start the debugger with this command:

java -jar psmdebug.jar

The syntax for the database URL in the login dialog box is: hostname[:port]/database

If the database resides on your local machine, specify localhost as the host name.

Examples:

localhost/testdb

my_node.mimer.se/supplier

my_node.mimer.se:1365/supplier_temp Mimer SQL 5 Features and Functionality History

Mimer SQL Structured Query Language

Sub-queries Returning Lob’s (V10.1.3A) Sub-queries can now return lob data (i.e. clob, nclob and blob data type columns).

Examples

update t2 set c2 = (select lobcol from t1);

insert into t2 values (1, (select lobcol from t1));

select c, (select lobcol from t1 where c = c1) from system.manyrows where c < 50;

Spatial Data Types and Functionality (V10.1.0) The spatial data types are used to store and index coordinates in the database. The spatial data types are based on the user-defined types framework. See the Mimer SQL Programmer’s Manual, Appendix B - Spatial Data for information.

User-Defined Types and Methods (V10.1.0) User-defined types provides a mechanism for defining new data types that can be used in table definitions and stored procedures. For a user-defined type it is possible to create methods belonging to the type. See the Methods Chapter in Programmer’s Manual for more details. There are two categories of user-defined types - distinct types and structured types.

Support For FOR Loop in PSM (V9.3.7) The FOR statement in PSM provides a simple way of iterating through all records in a result set and performing some operations for each record.

Example

for SELECT forname, surname FROM customers DO CALL editNames(forename,surname); END for

Within the for loop the columns of the result set are available as variables. It is also possible to call a result set procedure instead of a select statement.

BEGINS Function (V9.3.7) LIKE predicates, addressing the “begins with” functionality, are very common. However, when a parameter marker is used for the LIKE pattern, the SQL compiler cannot determine the LIKE pattern characteristics, and possible optimizations will not be applied. To overcome this issue, the built-in function BEGINS has been implemented. The BEGINS function has the following equivalence: BEGINS(column,'AB') <==> column LIKE 'AB%'

BEGINS(column,?) will be optimized for “begins with” performance. 6 New Features and Functions Mimer SQL Structured Query Language

Example Return all customers whose surname begins with ’Pe’: SELECT * FROM customers WHERE BEGINS(surname, 'Pe');

Automatic Refresh of Precompiled Statements (V9.3.6) Precompiled statements will be recompiled when a dependent object is changed. I.e. if a column is added to a table, all statements using this table, directly or indirectly, will be refreshed implicitly. Other operations that will cause an automatic refresh of precompiled statements are UPDATE STATISTICS, CREATE INDEX, and DROP INDEX.

Removable Databanks (V9.3.4) It is possible to specify that a databank should be removable, using either the CREATE DATABANK statement or the ALTER DATABANK statement. This functionality is useful, for example, if the databank is located on a flash memory card.

ALTER DATABASE SET AUTOUPGRADE (V9.3.4) The AUTOUPGRADE functionality makes the database system keep track of changes to tables. Then it’s possible to distribute an upgraded version of the system databank, to be integrated into existing customer installations, where the same table changes will be performed. The database’s autoupgrade mode is currently found in the system table SYSTEM.SERVER_INFO, where AUTOUPGRADE_ENABLED indicates if the autoupgrade attribute is set or not. See Mimer SQL Reference Manual, ALTER DATABASE for more information.

Specifying Size Limits for Databank Files (V9.3.3) When creating a databank it is possible to specify that the size of the physical file should be within certain limits. E.g. CREATE DATABANK mimer_store SET MINSIZE 10 M, GOALSIZE 20 M, MAXSIZE 30 M;

This means that the file size will be between 10 and 30 mega bytes and that the system will try to keep the size as close to 20 mega bytes as possible. The size can be specified using the suffixes K, M or G which stands for kilo bytes, mega bytes and giga bytes respectively. These limits can also be specified in an ALTER DATABANK statement. ALTER DATABANK mimer_store SET MAXSIZE 2 G;

Another new feature is the possibility to set the actual size for a file. ALTER DATABANK mimer_store SET FILESIZE 20 K;

If the file size is less than the currently allocated size, the system will release unused file blocks in order to shrink the file and if the file size is larger than the current size, new blocks will be allocated. Mimer SQL 7 Features and Functionality History

There is also an option for dropping size limitations for a databank. ALTER DATABANK mimer_store DROP MAXSIZE;

Dropping the FILESIZE for databank means that the file will be made as small as possible (but not smaller than minsize, if specified).

Read Only Databanks (V9.3.3) It is possible to specify that a databank should be read-only with the alter databank statement ALTER DATABANK mimer_store SET OPTION READ ONLY;

This means that no write operations on tables located in this databank are allowed. It is also not possible to create tables or indexes in the databank.

Parameter Overloading (V9.3.0) By parameter overloading it is possible to create multiple routines with the same name. The routines must either have a different number of parameters or parameters with different data types. create function f(c1 smallint) returns int return …

create function f(c1 date) returns char(10) return …

It is not possible to overload functions with regard to the returned data type.

Specific Names (V9.3.0) A specific name can be assigned to all routines (functions and procedures) when created. If no specific name is given a unique name is generated by the system. A specific name must be unique within a schema. The specific name can be used to identify a (overloaded) routine in GRANT, REVOKE and DROP statements instead of having to supply a list of data types for parameters. CREATE PROCEDURE p(out p1 int, in p2 varchar(10)) SPECIFIC p_int_varchar BEGIN … END

CREATE PROCEDURE p(out p1 varchar(10), in p2 int) SPECIFIC p_varchar_int BEGIN … END

To drop an overloaded procedure you can either specify a data type list, e.g. DROP PROCEDURE p(int,varchar)

or use the specific name, e.g. DROP SPECIFIC PROCEDURE p_varchar_int

Boolean Data Type (V9.3.0) Support for a boolean data type has been added. It can be used throughout Mimer SQL, e.g. as data type for columns or as return type for a user defined function. 8 New Features and Functions Mimer SQL Structured Query Language

Compound Statement (V9.3.0) A compound statement may now be used outside routines. I.e. it is possible to use a statement as BEGIN DECLARE x INT; SET x = 1; WHILE x < 1000 DO INSERT INTO numberTable VALUES(x); SET x = x + 1; END WHILE; END

in BSQL or any other query tool. In BSQL a line with an alone @ can be used to start a compound statement, together with another line with an alone @ to end it.

SUBSTRING on CLOB and NCLOB Columns (V9.2.5) The SUBSTRING function can now be used on columns with data type CHARACTER LARGE OBJECT or NATIONAL CHARACTER LARGE OBJECT.

Example:

SELECT column1, SUBSTRING(clobcolumn FROM 1 FOR 50) AS intro FROM sometable;

Using LIKE Predicate for CLOB and NCLOB Columns (V9.2.4) The LIKE predicate can now be used to search the contents of columns with data type CHARACTER LARGE OBJECT or NATIONAL CHARACTER LARGE OBJECT.

Example:

SELECT * FROM tab1 WHERE clobcol LIKE '%Mimer%Uppsala%';

ORDER BY on Expressions (V9.2.4) The ORDER BY clause can now contain expressions. An expression in the ORDER BY specification must contain at least one column reference to a table in the query.

Examples:

SELECT column1 FROM sometable ORDER BY column2; SELECT column1 FROM sometable ORDER BY ABS(column1); SELECT column1 FROM sometable ORDER BY CASE WHEN column1 < column2 THEN column1 ELSE column2 END; table1 JOIN table2 USING (column1) ORDER BY somefunction(column1);

See Mimer SQL Reference Manual, Chapter 12 for more information. Mimer SQL 9 Features and Functionality History

INSERT Large Object Column With a Subselect (V9.2.3) A column with a Large Object data type can now participate in INSERT statements with subselect, i.e. the values to be inserted can be fetched from another table in the database.

Example:

INSERT INTO tab2 SELECT c1, lobcol FROM tab1 WHERE c1 < 10;

However, a Large Object can still not be used in an UPDATE with subselect statement

Extended Support for Collations (V9.2.1) Collations for all European languages are supported. (See list in Mimer SQL Reference Manual, Chapter 4.) It is also possible to create new collations based on existing collations for specific purposes. See the updated CREATE COLLATION statement in the reference manual.

New Scalar Functions (V9.2.1) Two new functions for converting between a Unicode character and a numerical value has been introduced. The function UNICODE_CODE will given a Unicode character return the corresponding numerical value and the UNICODE_CHAR function returns a Unicode character.

Examples:

SET uc = UNICODE_CHAR(4711); SET i = UNICODE_CODE(n'Ö');

New Views in INFORMATION_SCHEMA (V9.2.1) The new views are INFORMATION_SCHEMA.SQL_FEATURES, INFORMATION_SCHEMA.SQL_SIZING, and INFORMATION_SCHEMA.EXT_COLLATION_DEFINITIONS. See Mimer SQL Reference Manual, Chapter 13 for more information on these views.

Support for Scalar Subqueries (V9.2.1) A scalar subquery can be used in a DML statement wherever an expression can be used.

Examples:

CREATE FUNCTION f() RETURNS int READS SQL DATA RETURN (SELECT count(*) FROM mimer_store.music)

SELECT title, (SELECT title FROM tracks WHERE albumID = a.albumID AND seqno = 1) AS track FROM album AS a 10 New Features and Functions Mimer SQL Structured Query Language

WITH HOLD (V9.2.1) Support for WITH HOLD cursors have been added. Cursors opened WITH HOLD are not implicitly closed by COMMIT. For more information, see the Mimer SQL Reference Manual.

NCLOB Data Type (V9.2.1) The NCLOB (NATIONAL CHARACTER LARGE OBJECT) data type is now supported.

ALTER STATEMENT (V9.2.1) The ALTER STATEMENT command can be used to get a new execution plan for a precompiled statement. This is useful when, for instance, an index has been added or the statistics data has been updated.

Example

ALTER STATEMENT book_statement_stmt REFRESH;

Triggers (V8.2.1) A trigger is a stored procedure that is executed every time a data manipulation statement is executed. A trigger is associated with an INSERT, UPDATE or DELETE operation on a certain table. In the trigger almost all PSM statements may be used. In a trigger, it is possible to reject the operation that caused the trigger to execute. The trigger is executed once for each statement, either before or after the statement is executed. For a complete description of this concept, see the Mimer SQL Reference Manual.

Instead-of Triggers (V8.2.1) An instead-of trigger is a trigger that is executed instead of performing the actual operation. Instead-of triggers are used with views only. It is possible to make join-views ‘updateable’ by using instead-of triggers for the different operations. In such cases, it is expected that the view will modify one or more other tables to simulate the data manipulation function on the view. For a complete description of this command, see the Mimer SQL Reference Manual.

PSM Functions (V8.2.1) PSM functions are particularly useful because they can be referenced from an SQL statement. This allows procedural code to be activated within an SQL statement. All parameters to a function are input and the function value is the only value returned from the function. A deterministic function always returns the same value for a given set of input parameters. Otherwise, it is a non-deterministic function. Non-deterministic functions are used by the optimizer to determine possible evaluation orders. In the future, it will be possible to build secondary indexes on deterministic functions. Mimer SQL 11 Features and Functionality History

Schema Support (V8.2.1) It is now possible to have an object owner without having a corresponding USER or PROGRAM. The term used is schema. To use the CREATE SCHEMA statement the ident must have SCHEMA or IDENT privilege. SYSADM is given SCHEMA privilege with grant option. A user may have zero, one or more schemas. By default, a schema with the same name as the user is created when the ident is created. Objects are created in a schema by specifying the schema name in the CREATE statement: Example: As user SYSADM: GRANT SCHEMA TO LOKADM;

As user LOKADM: CREATE SCHEMA LOKUS; CREATE TABLE LOKUS.CUSTOMER(CUSTID INTEGER,CUST_NAME CHAR(30)); CREATE VIEW LOKUS.MAJOR_CUSTOMER AS ...

DROP SCHEMA LOKUS CASCADE;

Sequences (V8.2.1) A new construct called a SEQUENCE has been implemented. A SEQUENCE returns unique integer values regardless of concurrent access to the system. It is also possible to retrieve the previous value returned to the application. A SEQUENCE can be defined as being unique or not. If the database server is improperly shut down, there may be a gap in the SEQUENCE. That is, the system will always return unique values for a unique SEQUENCE, but after an improper system stop a set of values may be skipped. A SEQUENCE can be used as a default value of a column or domain. For example: CREATE UNIQUE SEQUENCE SEQ3;

CREATE TABLE TAB3(C1 INT DEFAULT NEXT_VALUE OF SEQ3);

Relaxed Rules for Views (V8.2.1) It is now permitted to have a query-expression in a view. This makes it possible to create views that use UNION and/or UNION ALL. Furthermore, it is now permitted to use views that contain GROUP BY and/or HAVING (so called grouped views) in any manner. For example, it is possible to perform a second grouping in the query if wanted.

Updateable Primary Keys (V8.2.1) The system now allows primary keys to be updated. Previously, the application did not have privilege to update primary keys. These privileges have now been given to the user. The operation is only allowed if the table is located in a databank with TRANS or LOG option. 12 New Features and Functions Mimer SQL Structured Query Language

Named Constraints (V8.2.1) Constraints may now be given a name. If no name is given the system will generate a name. Constraint names can be viewed using the following INFORMATION_SCHEMA views: • TABLE_CONSTRAINTS • REFERENTIAL_CONSTRAINTS • CHECK_CONSTRAINTS Examples: CREATE TABLE ACCOUNT( AMOUNT DECIMAL(15,2) CONSTRAINT ZERO_CHECK CHECK(AMOUNT <> 0))

ALTER TABLE ACCOUNT DROP CONSTRAINT ZERO_CHECK

Recursive Procedures (V8.2.1) Procedures and functions may now be called recursively. The currently permitted nesting level is 42.

Record Data Type (V8.2.1) A new record data type, for use in PSM, has been introduced. Example: DECLARE VAR3 ROW(FIELD1 INT, FIELD2 VARCHAR(22)); DECLARE TTYP1 ROW AS (TAB1); DECLARE TTYP2 ROW AS (TAB1(COL2, COL3));

SET TTYP1.COL3 = TTYP2.COL3;

ATOMIC (V8.2.1) The ATOMIC declaration statement allows a number of PSM statements to be grouped together. If a statement in the group fails, statements that affect the database are undone. An atomic may also be combined with an UNDO exception handler. See the next section.

UNDO (V8.2.1) An exception handler in a compound statement can be declared as having the type undo. This means that if the handler is chosen as the most appropriate handler for a certain exception, all database operations that are done in the compound statement that contains the handler declaration will be undone before the handler code is executed.

128 Character Names (V8.2.1) The maximum length of identifiers in Mimer SQL has been changed from 18 to 128 characters. Objects such as idents, table names, etc. can be up to 128 characters. Passwords are limited to 18 characters. Mimer SQL 13 Features and Functionality History

System View Support (V8.2.1) Four new schemas are available for looking up information about the system. INFORMATION_SCHEMA – This is the new set of standard system views in Mimer SQL. They contain a set of views that are implemented in accordance with the SQL92 standard and a set that can be used for retrieving information about Mimer SQL specific objects e.g. databanks and sequences. INFO_SCHEM – This is a variant of the INFORMATION_SCHEMA view which uses only 18 character column names in the views. Whenever possible, the INFORMATION_SCHEMA views should be used instead. FIPS_DOCUMENTATION – These views document Mimer SQL's conformance to the SQL2 standard. The schema also includes a view which provides a number of limits which may be tested for at runtime. OLD_INFO_SCHEMA – The views in OLD_INFO_SCHEMA replaces the X/Open 1992 standard tables according to X/Open SQL standard for 1995. They should only be used if you have previously used the INFORMATION_SCHEMA views from X/Open 1992. These views are not created automatically when the system is created but can be defined manually. The Reference manual contains descriptions of the views that are present in each schema. Currently this information is somewhat outdated. To see which views that are defined and which columns they contain, the views information_schema.views and information_schema.columns can be used.

Like Expression (V8.2.1) A like pattern may now be an expression. For example: SELECT * FROM TAB1 WHERE COL1 LIKE ? || '%';

In the example, the question mark is a host variable supplied by the application. The query effectively implements a begins with predicate (assuming the host variable contains no percent or underscore characters).

Soundex Function (V8.2.1) The soundex function returns a string expression that is the same for strings that have the same pronunciation. This is, of course, language dependent. Check how the current algorithm works for your language, and send feedback to your Mimer SQL distributor. Example: SELECT * FROM TAB1 WHERE SOUNDEX(NAME) = SOUNDEX('Karlson'); 14 New Features and Functions Mimer SQL Structured Query Language

New Reserved Words (V8.2.1) The following keywords have been added to the list of reserved words: ARE, AT, AUTHORIZATION, CASCADED, CAST, CHARACTER, CHECK, COLLATE, COLUMN, CONSTRAINT, CORRESPONDING, CROSS, CURRENT_PATH, CURRENT_USER, DAY, DEFAULT, EACH, EXCEPT, FALSE, FOREIGN, FULL, FUNCTION, GLOBAL, HOLD, HOUR, IDENTITY, INDICATOR, INTERSECT, LARGE, LOCAL, LOCALTIME, LOCALTIMESTAMP, MATCH, MINUTE, MONTH, NATIONAL, NEW, OLD, ONLY, OVERLAPS, PRECISION, PRIMARY, REFERENCING, RELEASE, ROW, SECOND, SESSION_USER, SPECIFIC, SYSTEM_USER, TABLE, TIMEZONE_HOUR, TIMEZONE_MINUTE, TRANSLATION, TRUE, UNIQUE, UNKNOWN, VALUE, VARYING, WITHOUT, YEAR.

The following word is no longer reserved: KEY

SESSION_USER (V8.2.1) The SESSION_USER function returns the name that was used when connecting to Mimer. In most cases, the value of CURRENT_USER will be the same as SESSION_USER. The only difference is that when used in a routine or trigger, the value of CURRENT_USER will be the name of the ident that created the routine or trigger being executed.

UNIQUE Columns May Be NULL (V8.2.1) Previously, columns that were part of a UNIQUE key were required to be declared as NOT NULL. This restriction has been removed. If any value of a UNIQUE contains a NULL value, the value is accepted. That is, duplicate values may exist as long as at least one of the columns contains a NULL value. This is different from a UNIQUE INDEX which only allows a single NULL to exist.

OVERLAPS (V8.2.1) An overlap predicate tests two ranges of dates and times to see if the ranges overlap. Example SELECT * FROM BOOK_GUEST WHERE (ARRIVE,DEPART) OVERLAPS (date'2001-02-01',interval '10' day);

GRANT/REVOKE on Individual Column (V8.2.1) The system now allows GRANT and REVOKE on individual columns. This is allowed for INSERT, UPDATE and REFERENCES privileges. For example: GRANT REFERENCES(COL1,COL2) ON TABLE T TO USER1,USER2 WITH GRANT OPTION;

REVOKE INSERT(ORDER_NUMBER) ON ACCOUNT FROM MANAGER;

Revoke GRANT OPTION (V8.2.1) It is now possible to only remove the GRANT OPTION without revoking the access privilege. Continuing the example from the previous section: REVOKE GRANT OPTION FOR REFERENCES(COL2) ON TABLE T FROM USER1; Mimer SQL 15 Features and Functionality History

COMMENT ON New Objects (V8.2.1) COMMENT ON now supports the following object types: • FUNCTION • SEQUENCE • TRIGGER • SCHEMA

Optional AS in Select List (V8.2.1) The keyword AS is no longer mandatory in the select list. For clarity, it is recommended that the keyword AS be retained. For example: SELECT COL1 + COL2 AS CCSUM, COL3 FROM T; SELECT COL1 + COL2 CCSUM, COL3 FROM T;

Explicit Defaults (V8.2.1) The keyword DEFAULT may be used in INSERT and UPDATE statements to force the system to store the current default value for the column. For example: INSERT INTO TAB2(C1,C2) VALUES (DEFAULT, 'ABC'); UPDATE TAB2 SET C2 = DEFAULT WHERE C1 = 10;

LOCALTIME, LOCALTIMESTAMP (V8.2.1) Support for the functions LOCALTIME and LOCALTIMESTAMP has been added. These functions return the CURRENT_TIME and CURRENT_TIMESTAMP without time zone displacement. For example: CREATE TABLE LOG_ATTEMPTS(USER_NAME VARCHAR(128), LOG_TIMESTAMP TIMESTAMP DEFAULT LOCALTIMESTAMP, …

Currently, these functions have the same functionality as the CURRENT_TIME and CURRENT_TIMESTAMP functions. It is preferable that the new functions are used, as CURRENT_TIME and CURRENT_TIMESTAMP will, in future versions, include a time zone displacement.

SET Statement (V8.2.1) The SET statement, for assigning a value to a variable, can now be used outside of routines. For example: SET ? = 100*378.50+1800*178+285*177+584*126;

Binary Data Type (V8.2.1) A binary data type is supported. See the Mimer SQL Reference Manual for a more information. 16 New Features and Functions Mimer SQL Structured Query Language

Alter Table (V8.2.1) It is possible to add and drop constraints from a table. For example: ALTER TABLE ACCOUNT DROP CONSTRAINT CUSTOMER_NUMBER;

ALTER TABLE ACCOUNT ADD CONSTRAINT CUSTOMER_LOOKUP FOREIGN KEY(CUSTOMER_NUMBER) REFERENCES CUSTOMER;

The data type of a column may be changed as long as the new type is assignment compatible with the previous data type. E.g. it is possible to change from integer to decimal and also from character to character varying. For example: ALTER TABLE ORDER_LINE ALTER COLUMN AMOUNT DECIMAL(15,2);

ALTER TABLE CUSTOMER ALTER COLUMN CUSTOMER_NAME VARCHAR(40);

On Delete Rule (V8.2.1) When defining a foreign key reference, it is possible to declare a delete rule that defines what action will take place when a row in the referenced table is deleted. The following actions can be specified: NO ACTION, SET NULL, SET DEFAULT and CASCADE. For example: ALTER TABLE ACCOUNT ADD CONSTRAINT CUSTOMER_LOOKUP FOREIGN KEY(CUSTOMER_NUMBER) REFERENCES CUSTOMER ON DELETE CASCADE;

See the Mimer SQL Reference Manual for a description of the different actions.

Get Diagnostics in PSM (V8.2.1) It is now possible to use all variants of the GET DIAGNOSTICS statement in routines and triggers.

Compiler Directives (V8.2.1) An SQL statement may contain directives to the SQL compiler. With these directives, it is possible to affect the access path for a query or whether an index should be used for the evaluation of a query. For example: SELECT * FROM {ORDER} TAB3,TAB2,TAB1 WHERE …

SELECT * FROM TAB3 {INDEX INDEX1} WHERE …

The first query will access the tables in the order they are specified in the from clause. The order directive can be placed after the keyword from in a subselect as well. The second query will make use of index index1, if such an index or constraint is defined for tab3, when evaluating the query.

New Scalar Functions (V8.2.1) Support for the scalar function bit_length, current_program and irand has been added. The bit_length function returns the number of bits in a character or binary expression. The current_program function returns the name of an entered program and null if no program is entered. Mimer SQL 17 Features and Functionality History

The irand function returns a random integer value and may take an optional parameter, which is used as a seed for a random sequence. Used in this way, as shown in the example, it is possible to generate the same random sequence on separate occasions. For example: SET SEED = 32767; SET INITIAL_VALUE = IRAND(SEED); LOOP SET RANDOM_VALUE = IRAND(); … END LOOP;

SELECT BIT_LENGTH(C1) FROM TAB3 WHERE C1 like … INSERT INTO EVENT_LOG values(coalesce(current_program(),current_user)),…

Online Backup (V8.2.1) Support for online backup, has been added. With this new functionality it is possible to take a consistent backup while the system is accessible for read and write operations to other users. All databanks, including the system databanks, may be backed up this way. A backup copy of the LOGDB databank, can be used as an incremental backup for all databanks in the system. See the Mimer SQL Reference Manual for more details, especially the START BACKUP, CREATE ONLINE BACKUP and COMMIT BACKUP statements.

Mimer ESQL Embedded SQL

Support for L""-style String Literals in C (V9.3.8) Embedded SQL/C now supports wchar_t (NCHAR) initialization using L""-style string literals.

Example:

exec BEGIN DECLARE SECTION; wchar_t wstr[20] = L"Unicode data"; exec sql END DECLARE SECTION;

GET DIAGNOSTICS Option TRANSACTION_ACTIVE (V9.3.3) The GET DIAGNOSTICS option TRANSACTION_ACTIVE is now supported.

Example:

exec sql GET DIAGNOSTICS :tr_stat = TRANSACTION_ACTIVE;

where tr_stat will be set to 1 if there is an active transaction, otherwise tr_stat will be set to 0.

Support for Embedded Fortran (V9.2.4B)

Linux: The ESQL program now supports the -for option for embedded Fortran. The currently supported Fortran compiler is Intel (R) Fortran Compiler Version 8. 18 New Features and Functions Mimer ESQL Embedded SQL

Support for long long Data Type in C (V9.2.1) Embedded SQL/C now supports the C data type long long. This data type is an integer which always is 64 bits, regardless of architecture and platform.

Support for NCLOB struct in C (V9.2.1) Embedded SQL/C now supports the C data type nclob, which is recognized by the ESQL/ C preprocessor and converted to a struct. See Programmer’s Manual, Appendix A, Host Language Dependent Aspects.

Support for NATIONAL CHARACTER LARGE OBJECT (NCLOB) type (V9.2.1) Mimer ESQL now supports the SQL data type NCLOB. The client may use host variables of any character string data type. However non-Latin1 data may only be accessed using the wide character host variable data types WCHAR_T and VARWCHAR_T. If an NCLOB containing non-Latin1 characters is fetched into a host variable of type CHARACTER, CHARACTER VARYING or CLOB, an error exception is raised.

WITH HOLD Cursors (V9.2.1) From version 9.2 onwards, cursors may be kept open during transaction commits. This behavior is accomplished using the WITH HOLD clause within the cursor specification.

Examples:

exec sql DECLARE CRS CURSOR WITH HOLD FOR ... ;

exec sql ALLOCATE 'CRS' CURSOR WITH HOLD FOR ... ;

Block Fetching of Result Sets (V9.1.4) ESQL applications will now, whenever possible, fetch result rows in blocks from the server. In effect this means that ESQL will, whenever the application want to fetch more data, get a number of rows from the server at once and store these in an internal buffer. Future fetches will read directly from the internal buffer until it is exhausted, when a new block of rows are requested from the server. In most cases, this has a positive effect on performance, applications will communicate less with the server and thus improving its scalability. Communication overheads are also reduced. There are, however, a few cases when this might be detrimental to performance. One situation might be when one want the first result row as fast as possible, while there can take some time for the server to complete an entire block request. In these situations ESQL programmers may change the block fetch behavior with the session attribute FETCH SIZE. This attribute will provide a hint about a suitable fetch size, that is the number of rows to fetch in each block, to ESQL. ESQL, will whenever possible try to use the specified fetch size, but it may in practice use a fetch size smaller than specified. If the value is zero, the hint is ignored.

Example 1 (ensures that rows are transferred one at a time from the server):

EXEC SQL SET SESSION FETCH SIZE 1; Mimer SQL 19 Features and Functionality History

Example 2 (using a host variable):

EXEC SQL BEGIN DECLARE SECTION; long fetch_size = 24; EXEC SQL END DECLARE SECTION; ... EXEC SQL SET SESSION FETCH SIZE :fetch_size;

Support for New SQL Statements (V8.2.1) ESQL has full support for the new SQL statements introduced in Mimer SQL 8.2. For a description of the new syntax, see the Mimer SQL Reference Manual.

SQL Statement Classification (V8.2.1) ESQL now writes a classification note after each pre-processed statement. For a description of the different classifications, see the Mimer SQL Reference Manual. A flagger switch has also been introduced. A warning message will be returned for any SQL statement having a higher classification level than requested in the switch.

Full SQL92 Support (V8.2.1) ESQL has full SQL92 support, including PSM (SQL/PSM-96) and triggers (SQL99). ESQL is thereby able to handle all the classification levels.

Character Pointer Support (V8.2.1) ESQL now supports char-pointers and varchar-pointers in the DECLARE SECTION. For a description and examples, see the Mimer SQL Programmer's Manual.

Mimer ODBC – Open Database Connectivity

Indicator Variables Support SQL_DEFAULT_PARAM (V9.2.3) Applications may now use the SQL_DEFAULT_PARAM value in indicator variables. The indicator variable is a word defined in the last parameter to SQLBindParameter or using the descriptor attribute SQL_DESC_INDICATOR_PTR. However, the SQL-2003 standard does not include the notion of a default value for parameters, and neither do Mimer SQL servers. The Mimer SQL server will therefore treat all default parameter values as being SQL NULL values.

Mimer Specific Keywords to SQLDriverConnect (V9.2.2) To allow an application to connect without specifying a data source in the connection string, the following driver-specific keywords have been added for the Mimer ODBC Driver: • PROTOCOL • NODE • SERVICE 20 New Features and Functions Mimer ODBC – Open Database Connectivity

• INTERFACE See the ODBC chapter in SQL Programmer’s Manual for a detailed description.

Connection Attribute SQL_ATTR_CONNECTION_DEAD (V9.2.1) The connection attribute SQL_ATTR_CONNECTION_DEAD to poll connection status is now supported. By calling SQLGetConnectAttr with this attribute, the driver will return SQL_CD_TRUE if the connection has become unusable. SQL_CD_FALSE is returned if the driver believes the connection is alive and well. The driver won't try to diagnose the connection status, it merely returns what it has learned so far. Calling SQLGetConnectAttr with this attribute is therefore very cheap, but connection changes since the last network request will go by unnoticed.

Internal Array Fetching (V9.2.1) The ODBC driver is now doing internal array fetches whenever possible. In most situations this will improve performance, but there may be some situations where it is important to get the first few rows returned to the application fast. In these situations, setting the row array size (SQL_ATTR_ROW_ARRAY_SIZE statement attribute) to anything, for instance one, will disable internal array fetching.

Mimer Specific Descriptor Fields (V9.2.1) Mimer SQL supports large objects of up to 8 terabytes. This poses a problem to ODBC applications since the ODBC API specifies length fields to be 32 bits. An ODBC compliant application is therefore unable to work with any objects larger than 2 gigabytes. The SQL/CLI standard has the same problem, so we won’t get much help there. To remedy this situation, the Mimer ODBC driver has four vendor specific descriptor attributes. Each attribute mimics the behavior of an existing attribute, the only difference is that the existing attribute is working with a 32-bit integer while ours use 64-bit integers. These descriptor attributes are: SQL_DESC_DISPLAY_SIZE_64, SQL_DESC_LENGTH_64, SQL_DESC_OCTET_LENGTH_64, and SQL_DESC_OCTET_LENGTH_PTR_64. See the ODBC chapter in SQL Programmer’s Manual for a detailed description.

Support for NATIONAL CHARACTER LARGE OBJECT (NCLOB) type (V9.2.1) ODBC now supports the SQL NCLOB type. The client may use any character string data type, but non-Latin1 data may only be accessed using the wide character client type SQL_C_WCHAR. If an NCLOB containing non-Latin1 characters is fetched into a SQL_C_CHAR an error exception is raised. Mimer SQL 21 Features and Functionality History

Parameter Arrays in Conjunction With Data at Execution Parameters (V9.1.3) Prior to version 9.1.3, Mimer ODBC did not support the usage of parameter arrays in conjunction with data at execution parameters. Data at execution parameters are specified by setting the word pointed to by SQL_ATTR_OCTET_LENGTH_PTR to SQL_DATA_AT_EXEC, or to a value defined by the SQL_LEN_DATA_AT_EXEC(n) macro. In these situations, the driver tells the application to supply parameter data by having the SQLExecute call returning SQL_NEED_DATA. In these situations the application should call SQLParamData to obtain the parameter requested by the driver. The data should then be supplied by calling the SQLPutData function. In Mimer ODBC version 9.1.3 and onwards, after the call to SQLParamData, the word pointed to by the statement attribute SQL_ATTR_PARAM_PROCESSED_PTR will contain information on which row the driver expects data to. The parameter is recognized by using the SQLParamData parameter *ValutPtrPtr, as before.

Unicode API (V9.1.1) On systems, Mimer ODBC fully supports the wide character API used by the Microsoft ODBC Driver Manager. Whenever drivers export these functions (like SQLConnectW), the driver manager will use them with Unicode (UTF-16) arguments. If the application has been compiled to use ASCII strings (UNICODE=0 define) the Driver Manager will convert the string to Unicode before calling the driver.

National Character Data Types (V9.1.1) The SQL_WCHAR data type is now fully supported. Applications may now use the SQL_WCHAR data type to store and retrieve Unicode data. Exactly which Unicode format is used depends on the platform. Microsoft Windows uses 16-bit characters while most other platforms use 32-bit characters.

Large OBject Support (V9.1.1) The SQL data types SQL_LONGVARBINARY and SQL_LONGVARCHAR are now fully supported. Each data type supports large character and binary objects of sizes up to 8 TB. 32-bit platforms have a smaller size limit of 2 GB.

ODBC Version 3 Support (V8.2.1) Mimer ODBC driver for version 8.2 now supports ODBC 3.51.

New ODBC Data Types (V8.2.1) The following SQL data types have been added: • SQL_BIGINT • SQL_VARBINARY • SQL_BINARY 22 New Features and Functions Mimer ODBC – Open Database Connectivity

• SQL_BIT • SQL_GUID A binary column currently has a maximum length of 15 000 octets. The information about the maximum length of the data type is available in SQLGetTypeInfo. A number of application program data types are now also supported: • SQL_C_BINARY • SQL_C_INTERVAL • SQL_C_NUMERIC • SQL_C_SBIGINT • SQL_C_UBIGINT • SQL_C_GUID The preceding data types may be used freely in an ODBC application. SQL_C_BINARY on any other data type than SQL_BINARY will return the Mimer SQL internal representation of the data type and can only be used to store values in a column with the exact same data type.

New ODBC Data Types (V8.2.1) The following SQL data types have been added: • SQL_BIT • SQL_GUID • SQL_TINYINT One new application program data type is now also supported: • SQL_C_BIT The preceding data types may be used freely in an ODBC application.

New ODBC Routines (V8.2.1) Many new routines have been implemented. This enables an application to use ODBC 3 or ODBC 2 mode when accessing the Mimer database handler. The new routines are: • SQLAllocHandle • SQLSetConnectAttr • SQLGetConnectAttr • SQLSetStmtAttr • SQLGetStmtAttr • SQLSetEnvAttr • SQLGetEnvAttr • SQLSetDescField • SQLGetDescField • SQLSetDescRec • SQLGetDescRec • SQLCopyDesc • SQLColAttribute • SQLFetchScroll • SQLGetDiagField • SQLGetDiagRec Mimer SQL 23 Features and Functionality History

• SQLCloseCursor • SQLEndTran • SQLFreeHandle Please refer to the ODBC documentation for specific information about the above routines.

ODBC Escape Clause Enhancements (V8.2.1) A number of new escape clause constructions are now supported. These are: • Intervals: {INTERVAL …} • User defined functions: {? = func(par1, par2,…)} • Guid escape clauses: {guid '…'} • String functions: {fn BIT_LENGTH …} {fn CHAR_LENGTH …} {fn CHARACTER_LENGTH ...} {fn DIFFERENCE …} {fn OCTET_LENGTH …} {fn POSITION …} {fn SOUNDEX …} • Date/time functions: {fn CURRENT_DATE …} {fn CURRENT_TIME …} {fn CURRENT_TIMESTAMP …} {fn EXTRACT …}

Row Wise Parameter Binding (V8.2.1) Row-wise parameter binding is now available through the statement attribute SQL_ATTR_PARAM_BIND_TYPE. Previously, this was only supported for fetch operations.

New Statement Options (V8.2.1) The statement option SQL_QUERY_TIMEOUT is now supported.

Mimer BSQL

New List and Describe Functionality (V9.3.0) BSQL has support for list and describe function for all objects in version 9.3 of Mimer. List and describe support for precompiled statements has been added.

SET EXECUTE ON/OFF Statement (V9.2.2) When EXECUTE is set to OFF, statements will be compiled but not executed. This can be useful when checking statements for errors or when using the explain facility. 24 New Features and Functions Mimer BSQL

SET EXPLAIN ON/OFF Statement (V9.2.2) When EXPLAIN is active, a query plan will be shown. This plan shows in which order tables are accessed and if any indexes are used when executing the query. Example: SQL>set explain on; SQL>set execute off; SQL>select * from orders as o, order_items as oi SQL& where o.order_id = 12 SQL& and o.order_id = oi.order_id;

L1: Sequential read MIMER_STORE.ORDERS , end of table goto end compare, no hit goto L1 L2: Sequential read MIMER_STORE.ORDER_ITEMS , end of table goto L1 compare, no hit goto L2 Record found, resume at L2 end:

See Mimer SQL User’s Manual for more details.

Additional Parameters for BSQL Command (V9.2.1) When starting BSQL it is now possible to supply username and password to the command to facilitate an automatic login.

Example VMS:

BSQL /USERNAME="MIMER_STORE" /PASSWORD="GoodiesRUs"

Example Unix:

bsql -u MIMER_STORE -p GoodiesRUs

It is also possible to give a command as argument in which case BSQL executes the query and then quits.

Example:

bsql -q"select * from music_store" -uMUSIC_STORE -pGoodiesRUs

This command can be any valid SQL/BSQL statement.

List/Describe Functions for Collations (V9.2.1) It is possible to get information about collations. This can be obtained by using the menus or commands directly.

Example:

SQL> describe collation information_schema.albanian_1; Mimer SQL 25 Features and Functionality History

UTIL Functionality (V9.2.1) Some of the functionality formerly found in UTIL has been moved to BSQL. This includes the readlog functionality and logic for recreating system databanks at startup. The menu for readlog is invoked by using the statement READLOG, see Mimer SQL User Manual.

New Data Type NCLOB (V9.2.1) The new data type NATIONAL CHARACTER LARGE OBJECT (i.e. NCLOB) can be used in BSQL.

Enhanced File I/O (V9.1.1) Mimer BSQL can now handle files in UTF8, UTF16, UTF16BE, UTF16LE, UTF32, UTF32BE and UTF32LE formats. For example: LOG OUTPUT ON 'sales' AS UTF16;

For more information, see the LOG and READ commands in the Mimer SQL User’s Manual.

Limiting the Amount of Data Displayed (V9.1.1) Two new BSQL commands have been introduced. These are: SET MAX_CHARACTER_LENGTH value

SET MAX_BINARY_LENGTH value

The keywords MAX_CHARACTER_LENGTH and MAX_BINARY_LENGTH can be abbreviated to MC and MB respectively.

Example:

SET MC 20; SELECT * FROM INFORMATION_SCHEMA.COLUMNS;

In the example above, only the first 20 characters of all (character type) columns will be displayed.

Support for New SQL Syntax (V8.2.1) BSQL has full support for the new SQL functionality introduced in Mimer SQL 8.2. For a complete description of how to use BSQL, see the Mimer SQL User's Manual.

Delimited Data in LOAD/UNLOAD (V8.2.1) BSQL now supports the capability to load and unload data delimited by a specific character rather than the fixed formats previously supported. Example: LOAD FROM 'ACCOUNT_DATA' INTO ACCOUNT DELIMITER ';'; 26 New Features and Functions DbVisualizer

DbVisualizer

Overloaded Function Names (V9.3.7E) Support for function and procedure names with overloaded parameters, i.e. where several instances of a procedure with the same name is present.

New Version of DbVisualizer (V9.3.5) A new version of DbVisualizer called 5.1 is now bundled with Mimer SQL. It contains numerous enhancements for constructing SQL statements for all different Mimer SQL commands. In the new version of DbVisualizer the Mimer driver is pre-loaded which means that new users do not have to locate the Mimer JDBC jar files manually. Win: On the Windows platform the default has changed from Alloy to Windows look and feel. Win: The new version requires at least version 1.5 of Java Runtime. This is verified when DbVisualizer is started.

DbVisualizer (V9.2.4D) The SQL tool DbVisualizer is bundled with Mimer SQL.

Mimer Utilities

Miminfo SQLPOOL Information Extended (V9.3.7F) When showing information about SQLPOOL statistics, the system now shows the number of statements and active transactions per connection to the server. This information may be used to track leaks in applications that, for example, forget to close handles. The number of statements typically correspond to the number of SQL statements open by the application. In some cases, such as when a procedure is called, more than one statement may be needed by the system to keep track of all referenced objects. The number of transactions include both explicitly started transactions as well as statement transactions started when a statement is opened and autocommit is on. In addition internal database server transactions performed on behalf of the user may show up briefly in the statistics.

MIMLOAD UNLOAD To Two Files (V9.3.7E) The UNLOAD command can now optionally take two files as arguments, where the first file will contain the definitions and the second file will contain data. This makes it easier to merge several data files.

Example:

mimload -uSYSADM -p"pwd" "unload to 'def.dat', 'data.dat' from current user" Mimer SQL 27 Features and Functionality History

MIMLOAD Performance Improvement (V9.3.7) MIMLOAD’s load performance has been improved significantly with the use of array operations.

MIMLOAD File Size Reduction (V9.3.7) When MIMLOAD unloads fixed character data (CHAR and NCHAR data types), trailing spaces are now removed before the column is written to the output file. This may reduce the size of the output file.

MIMLOAD Support For NCLOB (V9.3.7) MIMLOAD can now load and unload NCLOB data.

Updated DBC Syntax (V9.2.1) The DBC program has a new, optional parameter for sysdb filename. This filename is required if any tables are using collations. If not specified, the correct sort order for such tables is unknown.

DBOPEN Command Line Arguments (V9.2.1) The DBOPEN program now accepts username and passwords as command line arguments.

Example (Unix)

dbopen -u SYSADM -p GoddiesRUs server1

Example (VMS)

dbopen /username=SYSADM /password=GoodiesRUs server1

EXPTOLOAD (V9.2.1) Since UTIL has been removed from version 9.2 of Mimer SQL, an Exptoload program is available for conversion of old UTIL export files to files that can be loaded by the LOAD/ UNLOAD functionality.

Mimer UTIL

New Functions The following sections document new functions.

128 Character Object Name Length (V8.2.1) The Export/Import utility now supports object names with up to 128 characters.

Binary Data Type Support (V8.2.1) The Export/Import utility now supports the data types BINARY and BINARY VARYING. 28 New Features and Functions VMS Specific Features

Load/Unload with User Defined Delimiter (V8.2.1) The Export/Import utility now supports load/unload with a user-defined delimiter.

VMS Specific Features

Long Form Switches (V9.3.4) Command line arguments do now support long form switches (e.g. --start). The following programs now accept command line switches with a long or a short form: •bsql • dbc • dbopen •esql •mimcontrol •mimload • mimversion The longnames are prefixed by -- while the short switches use a single - (minus) character. Use program --help for more information about the individual arguments for the programs.

bsql example bsql has a switch to specify the username to use when logging in: Short form: bsql -m -u SYSADM -p SYSPSW DB1

Long form: bsql --multi --username=SYSADM --password=SYSPSW DB1

The command will log in as SYSADM with the password SYSPSW to the database DB1 using multiuser mode.

The TCPCONTROL Command Procedure (V9.2.1) The TCPCONTROL command procedure can now be used to start, stop and check the MIMTCP processes. Please see the Mimer SQL Open VMS Guide for further information. Mimer SQL 29 Features and Functionality History

UNIX Specific Features

Unicode and Long Form Switches (V9.3.4) Command line arguments do now support long form switches (e.g. --start), and Unicode characters. The following programs now accept command line switches with a long or a short form: •bsql •dbc • dbopen •esql • mimcontrol •mimload • mimversion The longnames are prefixed by -- while the short switches use a single - (minus) character. Arguments that contain filename specifications or SQL statements may now contain Unicode characters. (esql does not yet support Unicode arguments.) Use program --help for more information about the individual arguments for the programs.

bsql example bsql has a switch to specify the username to use when logging in: Short form: bsql -m -u SYSADM -p SYSPSW DB1

Long form: bsql --multi --username=SYSADM --password=SYSPSW DB1

The command will log in as SYSADM with the password SYSPSW to the database DB1 using multiuser mode.

DbVisualizer (V9.2.4F) The DbVisualizer SQL tool is now bundled with Mimer SQL. For details on DbVisualizer, please see http://www.dbvis.com/products/dbvis/. DbVisualizer must be started from the File Manager or from the Application Manager in the desktop. If using the File Manager, /usr/local/bin/dbvis-mimer can be opened. In the Application Manager “DbVisualizer (Mimer-SQL)” is found under the Applications tab.

.dumper.sh Script (V9.2.1) When dbinstall is executed, a .dumper.sh script is generated in the database server home directory. This script is defined as the DumpScript parameter in the multidefs file, which will cause it to be run if the system fails. The .dumper.sh script executes some commands to verify system resource allocation. 30 New Features and Functions UNIX Specific Features

New Method For Local Communication (V9.1.4) The “local” communication method has been redesigned. This communication method is used by Mimer SQL clients that are on the same node as the database server. Previous versions used a pipe to send control messages between the client and the server. The new version will mainly use a System V semaphore to perform the communication; when a client or a thread in the server needs to wait for each other, they can do so by waiting for a semaphore to be set. By using semaphores rather than pipes, applications that communicate much (i.e. don't use array fetches or procedures) can get a significant performance boost. Whenever a client connects to the database server, the server creates a new System V semaphore set to be used for communication purposes. Since most Unix systems have a limit on the number of such sets that can be created, this operation can fail. If this happens, and error message will be returned to the client, and a message will also be written in the mimer.log file. The OS error message will contain the text: semget: [ENOSPC] No space left on device

(This message will only be displayed on the client side if the application is programmed to look up error messages and display them fully.) The command ipcs can be used to list all semaphore sets in the system. The semaphore sets created by a Mimer SQL server will have a key of 0x00000000 or 0xffffffff (depending on Unix platform), access mode of 0600 and have 2 semaphores in the set. The semaphore set is created by the user that is running the dbserver process and is owned by the user that runs the client process. The database server is responsible for removing the semaphores it allocates. Semaphores are removed whenever: • A client disconnects normally. • When the server detects that a client has disappeared without disconnecting. • When the server is shut down. • If the server should crash it will remove all used semaphores after it has created a dump directory. • When a server is started, it will remove any old semaphores. • Whenever the command mimcontrol -k is given. Note that some Unix systems have system limits that control the number of semaphores that can be created. These limits include:

SEMMNI Maximum number of semaphore sets. One semaphore set is needed per local connection SEMMNS Maximum number of semaphores. Should be twice the value of SEMMNI for Mimer SQL purposes. SEMMSL Maximum number of semaphores per semid. Mimer SQL uses two semaphores in each semaphore set. For Mimer SQL usage, SEMMSL must be at least 2.

Please consult the manuals for your for more information about how these limits are used. Mimer SQL 31 Features and Functionality History

Large Files Support (V8.2.4)

Linux: Large files are now supported on Linux.

Automatic Startup (V8.2.2) Automatic database server start and stop functionality is provided. The new utility programs mimautoset and mimservers are used for this purpose.

Man Pages (V8.2.2) UNIX man pages for Mimer SQL are distributed and installed when installing the server. On some UNIX versions, the -F option is required when using the man command to read the man pages.

RPM Support (V8.2.2)

Linux: RPM as an installation tool is supported on Linux platforms.

JDBC Driver (V8.2.2) The Mimer JDBC driver is included in the distribution. The driver is found in the lib directory and is named mimjdbc-x_x.jar. An example program, example.java, is included in the examples directory. There will be further development of the JDBC driver which will not require a new server release. New versions of the JDBC driver will be made available on the Mimer SQL developer site.

New Utilities – Version 8.2 (V8.2.2) The following table shows all new utility programs that are supplied with Mimer SQL version 8.2.

Utility Function dbfiles Lists the databank files for a server, as stored in the data dictionary. mimautoset Switches on/off the automatic server start and stop functionality or gives the current state. mimdbfiles Lists the databank file names for a server, as stored in the UNIX file system. Can also be used to change the ownership of the databank files. The new owner should be the one that is dedicated to manage the database server. mimhome Displays home directory for the effective user. mimlicense Administrates the license keys. mimowner Displays name of user that is dedicated to manage a specific server. mimservers Starts/stops all version 8.2 dbservers defined in /etc/sqlhosts. 32 New Features and Functions UNIX Specific Features

I/O Threads (V8.1.3)

Linux: To support parallel I/O execution on Linux, specific threads performing I/O requests are implemented. The number of I/O threads used by a database server is configurable from the multidefs file, where an additional parameter IOThreads is available for Linux.

POSIX Threads (V8.1.1) Mimer SQL version 8 is based upon POSIX threads. When using threads, only one process is seen for an executing database server.

Linux: Currently on Linux, each thread is given a unique process ID that can be seen in a process status report.

New Utilities – Version 8.1 (V8.1.1) The following table shows all new utility programs that are supplied with Mimer SQL version 8.1.

Program Short explanation Used by asctoexpc Program used for export file conversion. Replaces the old mimchop program. dbinstall Command used to install a new database. dbserver The database server program. You start mimcontrol dbserver using the mimcontrol. exptoasc Program used for export file conversion. Replaces the old mimunchop program. mimadmin Menu based database server administration utility. mimcontrol Program to manage database servers. mimadmin mimdevenv Command used to create a beginner’s dbinstall development environment. mimexampldb Command used to create an example dbinstall database environment. mimhosts Program to manage the /etc/sqlhosts dbinstall, file. See Managing /etc/sqlhosts Using mimadmin mimhosts (V8.1.1) on page 33 for more information. miminfo Program to monitor database servers. mimadmin Replaces the old mimserv program. Mimer SQL 33 Features and Functionality History

Program Short explanation Used by mimlink Command used to link Mimer SQL libraries dbinstall and executables to /usr/lib and /usr/bin, respectively. See Symbolic Links to Mimer (V8.1.1) on page 34 for more information. mimlistdb Command used to list started database mimadmin servers. mimpath Command used to get the path to databank mimadmin, locations. mimlink, mimunlink mimsdbgen Command used to create initial system dbinstall databanks (starts the sdbgen program with default parameters). mimstatln Command used to follow a symbolic link. dbinstall, mimlink, mimunlink mimtcp Program to manage TCP port dispatching, i.e. distributing incoming connect-attempts to the requested database server. See Managing Client Connects Using mimtcp (V8.1.1) on page 34 for more information. mimuninstall Command to uninstall Mimer SQL version 8. mimunlink Command used to remove symbolic links mimuninstall from /usr/bin and /usr/lib, previously created by the mimlink command. mimversion Command used to get the installed Mimer mimadmin, SQL version. mimlink, mimunlink

Managing /etc/sqlhosts Using mimhosts (V8.1.1) The database server registration file, /etc/sqlhosts, can be administered by using the new administration utility called mimhosts. The utility can do the following tasks: • Automatically create the /etc/sqlhosts file if it does not exist • Display the complete /etc/sqlhosts file • Add or delete an entry for a local or remote database • List registered local or remote databases • List or change the default database 34 New Features and Functions Windows Specific Features

The mimadmin program presents a menu based user interface to the mimhosts program. The mimhosts program is automatically invoked when the dbinstall program is used to add a database.

Managing Client Connects Using mimtcp (V8.1.1) The mimtcp program is a TCP/IP port number dispatcher that recognizes Mimer SQL client requests. It can only act as a dispatcher for Mimer SQL version 8 database servers. The program listens to the TCP/IP port number 1360 that is assigned for Mimer SQL use. It reads the handshake message and forwards the connection to the desired database server on the node. The use of the mimtcp program is encouraged and the default installation enables the feature. This means that the /etc/inetd.conf file is updated to automatically start the mimtcp program when a connection request is received on the Mimer port.

Symbolic Links to Mimer (V8.1.1) When installing Mimer SQL, symbolic links are created that link Mimer SQL executables, libraries and man pages to /usr/bin, /usr/lib and /usr/man, respectively. The symbolic links are created by using the command mimlink (invoked by the miminstall command). A corresponding mimunlink command is available to remove the links.

Windows Specific Features

Configurable Extend Size (V9.3.8) It is now possible to control the default extend size when a databank file needs to grow. The size is stored in the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Mimer\Mimer SQL\9.3\DefaultExtendSize The size is specified in 2K blocks. It is recommended that the size is a multiple of 32 to allow for less fragmentation of the 64k blocks used internally by Mimer SQL. The default size is 256.

Mimer Administrator Enhancements (V9.3.8) The Mimer Administrator can now be used to start many of the other utilities provided with Mimer SQL, such as Databank Check, SQL PSM debugger, and Mimer Info. New support for opening an explorer prompt at a database home directory and also support for starting the Windows Event viewer and Performance Monitor has been added.

Export of Shadowing Database (V9.3.8) It is now supported to export a database that is using shadowing. The shadows are not exported to the device and are removed from the system databank in the process. Mimer SQL 35 Features and Functionality History

SQLConfig Support on Device (V9.3.8) A new library for calling SQLConfigDriverW, SQLConfigDataSourceW, and SQLInstallerErrorW on the device has been added together with the corresponding link libraries.

Authenticode Signatures (V9.3.7) The Mimer executables are now signed with a digital certificate. On Windows Vista this is seen when additional privileges are granted through User Account Control prompts.

PDACOPYW Compression Control (V9.3.6C) It is now possible to control which tables are compressed when a database is exported. For example: pdacopyw --reclencompress=120 ...

or pdacopyw -r 120 ...

This command will compress all tables where the total record length is larger than 120 bytes. The default is to compress all tables. This feature is only available as a command line argument only and thus cannot be changed in the Wizard steps.

SQLConfig Support on Device (V9.2.5E, V9.3.5) A new library for calling SQLConfigDriverW, SQLConfigDataSourceW, and SQLInstallerErrorW on the device has been added together with the corresponding link libraries.

Expanded Unicode Support (V9.3.5) Since v9.2.5 it is possible to store database files in a home directory that contains Unicode characters. In addition, descriptions for all types of object (Local Database, Remote Database, System Data Source, and User Data Source) may also contain Unicode characters. From version 9.3.5 filenames may also be specified using Unicode characters. This means that utilities, such as Databank Check, and others that take a databank filename now also support Unicode characters.

Windows Mobile 5.0 Support (V9.2.5E, V9.3.5) Mimer SQL Mobile has added support for Windows Mobile 5.0 devices and emulators. It is possible to develop applications with: • SDK for Windows Mobile 2003-based Pocket PCs • SDK for Windows Mobile 2003-based Smartphones • Windows Mobile 5.0 SDK for Pocket PC • Windows Mobile 5.0 SDK for Smartphone 36 New Features and Functions Windows Specific Features

Unicode and Long Form Switches (V9.3.4) The following programs now accept command line switches with a long or a short form: •bsql • dbc • dbopen •esql •mimcontrol •mimload • mimversion • exloadw •mimctrl •miminfow • pdacopyw • sdbgenw The long names are prefixed by -- while the short switches use a single - (minus) character. Arguments that contain filename specifications or SQL statements may now contain Unicode characters. (esql does not yet support Unicode arguments.) Use program --help for more information about the individual arguments for the programs.

bsql example bsql has a switch to specify the username to use when logging in: Short form: bsql -m -u SYSADM -p SYSPSW DB1

Long form: bsql --multi --username=SYSADM --password=SYSPSW DB1

The command will log in as SYSADM with the password SYSPSW to the database DB1 using multiuser mode.

Running BSQL Without Installing (V9.3.0) Setting the environment variable MIMER_MODE to the value STANDALONE will allow the program bsql.exe to be executed without having installed a Mimer product. The SYSDB databank file (SYSDB93.DBF) must be located in the current directory.

Home Directory Path (V9.2.5) The home directory for a database may now contain a list of directories separated with semicolons. When the server searches for an unqualified filename (a name with drive and directory specification), the directories in the path are tried in order to find the databank file. When a new file with an unqualified filename is created it is created in the first directory in the path. Mimer SQL 37 Features and Functionality History

Service Descriptions (V9.2.5) On Windows XP systems the Mimer SQL Database and network services now includes a description that is shown in the Services panel of the Control Panel.

Mimer ODBC Trace (V9.2.2) Mimer ODBC Trace is a tool for getting the details out of an ODBC session. It can for example be used for debugging, monitoring and analyzing purposes. For each ODBC statement the tool can trace: • the elapsed time in server • the SQL statement used (if applicable) • the ODBC function used • the timestamp for the ODBC call • the ODBC handle used • the calling application process ID and name • the return code for the ODBC call The software consists of two parts, the Mimer ODBC Trace Administration tool and the Mimer ODBC Trace DLL (that substitutes the standard Microsoft ODBC Trace DLL). The Mimer ODBC Trace Administration tool has two main functions: • Configuration - to setup prerequisites for the trace logging and to start/stop logging • Presentation - to select and display the records from a logging file. The Mimer ODBC Trace DLL is activated from the administration tool. See the Getting Started on Windows guide for a more complete description of Mimer ODBC Trace. Note: Before using the Mimer ODBC Trace tool, please see the following notes: • When changing any settings using the administration tool, you should restart any application for which you want the changes to be used. The reason for this is that the settings will only be read when the DLL is loaded by the application, and thus the DLL has to be reloaded for any changes to take effect. • The administration tool changes the registry entries in HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC. If there is any problem look there in order to see if your changes are applied. • The Windows default ODBC Administrator may also change those registry entries. Currently there is a problem concerning the cooperating use between these two administration tools. Watch out which DLL is selected, as both administrators may start or stop tracing with anyone of the DLL’s.

Automatic Database Server Memory Configuration (V9.2.1) When a new local database definition is made in the Mimer Administrator, the size of the database server cache, the bufferpool, is now determined by examining the amount of memory present in a machine configuration. There are three different page sizes in the cache: 2K, 16K, and 64K. The 2K buffers are assigned 12.5%, 16K buffers 8.33%, and 64K buffer 5% of the available memory. 38 New Features and Functions Mac OS Specific Features

Getting Started after Reboot (V8.2.4) If a reboot is needed for a first-time install, the Getting Started guide and Mimer Administrator may be activated by a dialog box displayed during the reboot sequence.

Automatic Server Restart (V8.2.1) The database server can now restart itself automatically after an internal failure. This option is enabled by default, but may be turned off in the Local database configuration dialog's Server tab in the Mimer Administrator.

New File Extensions (V8.2.1) Two new file extensions (mdmp and mcfg) are registered when the software is installed. Mcfg is used for license keys and other Mimer Administrator related configurations. Mdmp is used for dump files that can be examined using the Mimer Info utility.

New Routines for ODBC Driver Configuration (V8.2.1) Support has been added for the ODBC routines SQLConfigDataSource and SQLConfigDriver. See the Mimer SQL Packaging Guide for further information.

Mac OS Specific Features

The Mac OS X Documentation (V9.2.4) Currently, if nothing else is stated, the Mimer SQL documentation should be read and used as if the Mac OS X platform is equal to Unix/Linux. The applications Mimer SQL database Install and Mimer SQL database Admin have both built-in help libraries.

DbVisualizer (V9.2.4D) The SQL tool DbVisualizer is bundled with Mimer SQL.

Mimer SQL Mobile Specific Features

J2ME/CDC Support (V9.3.5) The Mimer SQL product now includes a JDBC driver suitable for J2ME/CDC environments. There is an official document specifying what such a driver should support. The actual specification is called ‘JDBC for CDC/FP Optional Package Specification’, and can be found at the official Sun web site (http://java.sun.com/javame/ reference/apis/jsr169/). The driver can be found in the Mimer installation directory, with the name minjdbc3.jar. For further information, see the JDBC Guide in the Mimer SQL manual set. Mimer SQL 39 Features and Functionality History

Running the Export to Handheld Wizard Without Installing (V9.3.1) The Export to Handheld Wizard (pdacopyw) may now be executed in standalone mode. Standalone mode is enabled by setting the environment variable MIMER_MODE to the value "STANDALONE". Standalone mode implies that the wizard disables features and behavior that requires an installed Mimer SQL product, such as referring to databases by their name. Details on standalone mode and the Export to Handheld Wizard may be found in the wizard online help.

Mimer SQL Engine Support on Pocket PC (V9.2.5) The complete Mimer SQL Engine database server is now supported on Pocket PC. This means that the entire range of SQL commands are supported on Pocket PC including ALTER, CREATE and so on. The server type can be specified in the Server tab for local database definitions. Note that you may have to minimize the keyboard on the device to see this setting in the dialog.

Pocket PC Memory (V9.2.5) It is now possible to use larger bufferpools in the Pocket PC environment. This was previously limited to 12 MB, but is now, instead, limited by the amount of memory available.

Databank Size Reduction (V9.2.2H) When packaging Mimer databanks for deployment, unnecessary system views, collations and system tables are now removed. The views eligible for removal are the views in the INFORMATION_SCHEMA and MIMER schemas). Note that the views are only removed if they are not accessed or required by the statements created before deployment. Thus, this operation resembles the obfuscation phase MIDP Java programmers frequently execute in the sense that unused code is omitted from the deployed product. Similarly, collations not used by the application schema are also removed. The views in the FIPS_DOCUMENTATION and INFO_SCHEM schemas are deprecated and they are never accessible on the mobile device.

Import Database From Handheld Device (V9.2.1) With the new version it is possible to import an entire database and all related files from the handheld device or the emulation environment. Right-click on the local database you want to import to in the Mimer Administrator to start the Database Import Wizard.

New Server Type on Desktop (V9.2.1) The database server on the desktop can now emulate a Mimer SQL database server. By using the mobile server you can easily verify that your applications work well with a Mimer SQL database server. 40 New Features and Functions Mimer SQL Mobile Specific Features

You can select server type in the database administration dialog for local databases under the tab “Server”. Please note, that the server must be restarted before the setting becomes active.

Mobile Server on Desktop (V9.2.1) To make it easier to test a Mimer SQL database configuration it is now possible to start a Mobile server on the PC. This is done by setting server type to Mobile in the Server tab of a local database configuration. This is further described in the Mimer Administrator help. Mimer SQL 41 Features and Functionality History Chapter 2 Changed Features and Functions

This chapter describes changed features and functionality introduced into Mimer SQL in previous versions.

The Mimer SQL Database Server

Improved UNION ALL Optimization For Views (V9.3.2) The UNION ALL optimization for views has been improved. As a result of this, the result- set may now be returned in a different order than before (when ORDER BY is not specified.)

Smaller Page Sizes Used at End of LOB Storage (V9.2.5) The strategy for storing large objects (LOB’s) in pages is changed, so the use of disk space is made more economic.

Example: Previously if a LOB required between 2K and up to 16K, one 16K page was always allocated. Now if the LOB is between 2K and 12K, instead so many 2K pages as required are allocated. Also the writing of LOB pages is now more efficient as only the occupied part of a page is written to disk.

Compressed Commit Set (V9.2.5) The commit set is used to secure transaction data at commit. This data is now stored using compression which can decrease the space needed in TRANSDB. It may also allow for more cases where group commit may be used (i.e. several transactions can be secured on disk in a single I/O operation). 42 Changed Features and Functions The Mimer SQL Database Server

More Efficient Bitmap Handling (V9.2.5) The system no longer has to write bitmap pages to disk when a databank file size has changed. This allows the system to operate even more efficiently when dynamic allocation of file space is needed. In addition the internal algorithm for finding free pages within the bitmaps has been improved.

New Compressed Form for Data Storage (V9.2.5) A new compress algorithm is now used. This new algorithm is more efficient especially for records containing Unicode data (NATIONAL CHARACTER data types in Mimer). Tables using the new algorithm can be seen by using the DBC program, which displays those tables with the information “Mimer LZU compression”.

Performance Enhancements (V8.2.4) A number of significant performance enhancements have been implemented in version 8.2. Some performance enhancements are described in the ODBC chapter, as these are specific for ODBC clients.

Faster Access with Long Read-only Transactions (V8.2.4) When the transaction cache grows large due to long transactions the response time in the system decreases somewhat. In the new version, the system can access the transaction cache much faster if the long running transactions are read-only transactions. Therefore, it is important to, whenever possible, set transactions read-only when they are expected to run over a longer period of time. This will improve performance for both the read-only transaction, as well as other concurrent transactions. Long running transactions that are read/write are not recommended and should be split into several smaller transactions. This will also minimize the impact if the transaction is aborted and must be re-executed.

Index Lookup Only (V8.2.1) When accessing secondary indexes in Mimer SQL the system has previously always performed a lookup in the base table as well. From version 8.2 the system will only look in the secondary index table when the following conditions are true: • The query only references columns in the index. An index contains the columns defined as the index and the primary key (unless the table does not have a primary key). It may therefore be beneficial to add columns to an index if this allows the optimizer to skip the base table. The cost is, of course, increased storage usage and an additional overhead in secondary index handling. • The index is consistent. An index may be inconsistent if the base table is: stored in a NULL databank; or the index has been converted from an earlier version of Mimer SQL and UPDATE STATISTICS has not been run; or if the system databank TRANSDB is recreated. An index can be made consistent by updating the statistics for the table on which the index is defined. The cost based optimizer in Mimer SQL has been updated to take into consideration the lowered cost of accessing secondary indexes. Mimer SQL 43 Features and Functionality History

New Reorganization Algorithm (V8.2.1) The algorithm for reorganizing b*-trees has been revised. The change allows the system to accumulate several reorganizations before actually writing the changes to disk. The new algorithm still maintains the properties for careful replacement, i.e. the database is always consistent both on disk and in memory. The number of I/Os done by the system is significantly lower than before. This is particularly evident for tables that make many changes to a small part of the b*-tree. For tables located in NULL databanks, this change results in the table being flushed to disk less often. That is, if the machine crashes, the number of changes that are lost may now be greater than before. For tables under transaction control (i.e. TRANS or LOG databank), the change has no impact except the system works faster than before.

Bitmap Lookup (V8.2.1) For databanks with many bitmaps (files larger than 32 Mb), the system will remember which bitmap to allocate pages in. Previously a sequential scan of the bitmaps was performed. The system is also more efficient when finding free bits within the bitmap.

Databank Check in Background (V8.2.1) After an improper shutdown of the system, a consistency check of all databank files is automatically performed when the system is restarted. This operation has now been moved to the background threads. For large databanks, the restart time is significantly reduced. While the background check is being performed, small local checks are made when accessing tables in the databank. Thus, there is no danger in accessing the database even though the background check is not complete. If the database server is shut down while a check is ongoing, the check is aborted and subsequently restarted the next time the databank is accessed.

Block Pre-fetch (V8.2.1) Whenever the system is going to do a sequential scan of all or part of a table it will request pre-fetch. Pre-fetch allows read I/Os to be performed before a block is actually needed. When the block is later referenced it may either be in memory already, or the amount of time to wait for the read to complete will be reduced.

Caching of Compiled Queries (V8.2.1) In version 8.1, the compiled procedure or SQL statement was released as soon as there were no references to it. In version 8.2 the system will cache compiled procedures and SQL statements. This will allow for faster database access, particularly in systems with few users and heavy use of dynamic SQL (ODBC for example).

Optimized Sort/Load Operations (V8.2.1) A number of improvements have been made in the sort/load/merge steps. Among the improvements are: larger block sizes, use of pre-fetch, and more parallel merge steps where each merge is allowed more pages than before. This affects many operations that internally use the load facility. 44 Changed Features and Functions Mimer SQL Structured Query Language

Enhanced Work Table Management (V8.2.1) Performance for queries, using a temporary table for storing intermediate results, has in many cases, been improved. In earlier versions, an index tree was built for the temporary table. This is unnecessary in most cases, as the data only needs to be accessed sequentially.

Optimized Aggregate Functions Expressions (V8.2.1) The performance of expressions such as select max(column) + 1 has been improved.

Group by Optimization (V8.2.1) Group by queries now uses the new worktable mechanism described in 2.2.1.9, if the columns in the group by clause are retrieved in sorting order.

New Licensing System (V8.2.1) The licensing system is now called Mimer SQL License Key. The old term MRS is no longer used. The major changes are as follows: • The licensing system in version 8.2 is completely server based. That is, no keys are required for the database clients. • Several database servers on the same machine can share the available number of concurrent users defined by the key. • Several keys may be combined. For example, if two applications with Mimer SQL bundled are installed on a machine, the keys provided by both applications form a combined key used by the system. • The system can handle licenses for applications distributed with Mimer SQL. • The format of the key is less strict than before, and may contain comments, blanks and new lines.

Mimer SQL Structured Query Language

MIMER_ROWID Pseudo-key For Trigger’s OLD/NEW Tables (V10.1.1B) Mimer SQL Engine does now support the mimer_rowid pseudo-key in triggers for tables declared with a primary key.

Scrollable Cursors and WHERE CURRENT (V9.3.7) An UPDATE WHERE CURRENT on a scrollable cursor will now also update column values in its own result-set. (I.e. after a row has been updated using UPDATE WHERE CURRENT and the same row is re-fetched, the new value is returned.) A FETCH returning a column value that has been updated by an UPDATE WHERE CURRENT on its own scrollable cursor (without an intermediate close and open) will return a warning with the SQLSTATE value 01998. Mimer SQL 45 Features and Functionality History

Note that plain column values are updated, but not expressions. A fetch of a row deleted by a DELETE WHERE CURRENT on its own scrollable cursor will still return the row, but also a warning with the SQLSTATE value 01999. Clients from older versions will return updated result-set rows, but will not return the warnings.

New Columns in INFORMATION_SCHEMA Views (V9.3.3) The view INFORMATION_SCHEMA.EXT_DATABANKS have some additional columns. These columns contain information about size limitations for a databank.

Changed Data Types in INFORMATION_SCHEMA View (V9.3.3) The data type for the numerical columns in the view INFORMATION_SCHEMA.EXT_SEQUENCES has been changed from INTEGER to BIGINT.

Improved UNION ALL Optimization For Views (V9.3.2) The UNION ALL optimization for views has been improved. As a result of this, the result- set may now be returned in a different order than before (when ORDER BY is not specified.)

CREATE and ALTER DATABANK Syntax (V9.3.1) A new set clause has been added to the CREATE and ALTER DATABANK statements.Instead of having different clauses for different attributes, all attributes can be given as a comma separated list in a single set clause. E.g. CREATE DATABANK mimer_store SET OPTION LOG, FILE 'disk_4:mimer_store.dbf', FILESIZE 20 M;

and ALTER DATABANK mimer_store SET OPTION TRANSACTION, FILESIZE 30 M;

Note that some databank options have been renamed (this is when using the set syntax, the old syntax still uses the old option names.) TRANS is now TRANSACTION and NULL is now WORK.

New Reserved Words (V9.3.1) The following keywords are now reserved: LANGUAGE, METHOD, RESULT, STATIC 46 Changed Features and Functions Mimer SQL Structured Query Language

Specification of ISOLATION LEVEL READ UNCOMMITTED (V9.3.0) If SET SESSION ISOLATION LEVEL READ UNCOMMITTED is specified, then a default transaction access mode of READ ONLY is now implicit. I.e. transactions performing updates are not allowed unless a SET TRANSACTION statement changing this default is specified before doing such a transaction. If SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED is specified, then a transaction access mode of READ ONLY is now implicit for the single next transaction.

Changed Date and Time Arithmetic (V9.3.0) In earlier versions of Mimer an expression such as date '2008-01-31' + interval '1' month

would cause an exception since the result would be an invalid date, i.e. February 31. This has now been changed so the result will always be a valid date. If the day value is larger than the last date for the actual month the day value will be set to the latest day for the month. In the example above the result will be February 29.

Using Tables With LOB Columns in Triggers (V9.2.4) In earlier versions of Mimer SQL it was not allowed to define a trigger on a table with a column defined with a lob type. This has now been changed. For example it is possible to write triggers to log all operations on a table, e.g. CREATE TABLE master (pnr VARCHAR(10), image BLOB, PRIMARY KEY(pnr));

CREATE TABLE masterCopy (byWhom VARCHAR(128), action VARCHAR(10), pnr VARCHAR(10), image BLOB, whatTime TIMESTAMP, PRIMARY KEY(byWhom, action, whatTime));

CREATE TRIGGER copyMaster AFTER INSERT ON master REFERENCING NEW TABLE AS n BEGIN ATOMIC INSERT INTO masterCopy SELECT SESSION_USER, 'INSERT', pnr, image, LOCALTIMESTAMP FROM n; END

The only restriction remaining is that it is not possible to refer to LOB columns in the NEW TABLE in an INSTEAD OF trigger.

Collations and NCHAR (V9.2.1) Collations now support the national character data types.

New Columns in INFORMATION_SCHEMA Views (V9.2.1) The view INFORMATION_SCHEMA.EXT_IDENTS has an additional column IDENT_SCHEMA. Mimer SQL 47 Features and Functionality History

The view INFORMATION_SCHEMA.EXT_STATEMENTS has two additional columns, IS_SCROLLABLE and IS_FORWARD_ONLY. See Mimer SQL Reference Manual, Chapter 13 for more information on these views.

Changed Privilege Check in Views (V9.2.1) The views INFORMATION_SCHEMA.TABLE_CONSTRAINTS and INFORMATION_SCHEMA.KEY_COLUMN_USAGE now show information on tables where the current user has some privilege other than select. Earlier it only showed information if the current user was the creator of the table. The view INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS now shows data if the current user has some privilege, other than select, on the referenced table.

Cascade/Restrict (V8.2.1) The default for CASCADE and RESTRICT for all DROP and REVOKE commands has been changed. Previously, the default was CASCADE. This has now been changed to RESTRICT. The reason for this change is that the dependencies are more complex, now that procedures, functions and triggers reference objects. When CASCADE is in effect, any procedure, function, and/or trigger is automatically dropped. By changing the default, the risk of inadvertently removing objects that should be kept is reduced.

Privilege Changes (V8.2.1) Previously, the right to perform certain commands was controlled by EXECUTE privilege on three system defined PROGRAM idents. These programs have now been replaced by system privileges:

Old PROGRAM ident New privilege

MIMER_BR BACKUP

MIMER_SC STATISTICS

MIMER_SW SHADOW

The command to grant or revoke the privilege has changed accordingly:

Old command New command

grant EXECUTE on MIMER_BR to ident grant BACKUP to ident revoke EXECUTE on MIMER_BR from ident revoke BACKUP from ident

grant EXECUTE on MIMER_SC to ident grant STATISTICS to ident revoke EXECUTE on MIMER_SC from ident revoke STATISTICS from ident

grant EXECUTE on MIMER_SW to ident grant SHADOW to ident revoke EXECUTE on MIMER_SW from ident revoke SHADOW from ident 48 Changed Features and Functions Mimer SQL Structured Query Language

No Duplicate Privileges (V8.2.1) The system no longer maintains duplicate privileges granted from one ident to another. The algorithm for recursively revoking privileges has, because of this, been simplified. If grant option for a privilege is revoked from ident A, and A no longer has grant option from any other source, then the privilege is recursively revoked from other idents who have been granted the privilege by A. The old algorithm considered the set of privileges A had at the time the privilege was granted (rather than the current privileges).

Update Statistics Cleans Indexes (V8.2.1) Secondary indexes in databanks with option TRANS or LOG are always kept consistent with the base table. However, in a NULL databank it may be possible for a secondary index to contain more rows than the base table. When a databank changes from NULL to TRANS or LOG, the indexes are still marked as inconsistent. Indexes may also be inconsistent when upgrading from earlier versions of Mimer SQL. By running an UPDATE STATISTICS command the indexes will be made consistent. This can be done concurrently with any other activity in the system. When the index is consistent the SQL optimizer does not have to visit the base table when the index contains all the requested columns. The speedup is significant when this occurs (more than twice as fast!). To find out if an index is inconsistent or not, use the following select statement: SELECT OBJECT_SCHEMA,OBJECT_NAME,IS_CONSISTENT FROM SYSTEM.OBJECTS, SYSTEM.TABLE_CONSTRAINTS WHERE OBJECT_TYPE = 'INDEX' AND OBJECT_SYSID = CONSTRAINT_SYSID;

This will show the consistency for all indexes. The OBJECT_SCHEMA column contains the schema name for the index and the OBJECT_NAME column contains the index name. The column IS_CONSISTENT has the value 'YES' when the index is consistent. The select statement can normally only be executed by the system administrator (SYSADM). Other users can execute the statement if granted SELECT access to the involved tables.

Representation of DOUBLE PRECISION and FLOAT (V8.2.1) Values declared as DOUBLE PRECISION or FLOAT need to be able to represent one additional bit. Therefore, the data types use more space than before.

CREATE IDENT Changes (V8.2.1) When creating a user or program ident, the system will automatically create a schema for the user. Consequently, the user is allowed to create domains, synonyms, sequences, procedures, functions and views in the schema. For the user to be able to create other objects, appropriate privileges are needed. This retains compatibility with earlier versions. It is also possible to create an ident without a schema. This ident may not, without additional grants, create any type of objects. For example: CREATE IDENT ADAM AS USER USING `ADAMPASSWORD` WITHOUT SCHEMA; Mimer SQL 49 Features and Functionality History

CREATE DATABANK Changes (V8.2.1) When creating a databank, it is no longer required to specify initial size, file name and databank option. For example: CREATE DATABANK D;

CREATE DATABANK D WITH LOG OPTION; The default initial databank size is 1000 pages, the default file name is the same as the databank name, and the default databank option is TRANS.

Hex-constants (V8.2.1) A hexadecimal constant (e.g. x'204C6172732042657267') is typed as a bit string and not a character literal. A bit string is not comparable nor assignment compatible with a character value, without an explicit cast expression. A hexadecimal constant can be used in conjunction with binary columns without explicit conversion.

DDL-statements in Transactions (V8.2.1) In earlier versions of Mimer SQL, a Data Definition statement was not allowed if a transaction was started. This has now been changed so DDL statements may be rolled- back or committed as other statements. There are some restrictions on the use of DDL statements, though. In this version only one DDL statement is allowed in a transaction. If a transaction is started and a DML statement has been executed, the execution of a DDL statement will cause an error. If a DDL-statement has been executed within a still active transaction and a new statement is executed, the previous DDL-statement is committed. In the future it will be possible to have multiple DDL statements in one transaction. Thus, giving an explicit commit statement after each DDL-statement will be forward compatible.

Mimer ESQL Embedded SQL

ESQL Command-Line Arguments (V9.3.4) The short form switch -cob(ol) has been replaced with the short form switch -b. The long form switch --cobol has also been introduced. The short form switch -for(tran) has been replaced with the short form switch -f. The long form switch --fortran has also been introduced. The short form switch -s has been replaced with the short form switch -n. The long form switch --nologo has also been introduced. The VMS switch /SILENT has been replaced with /NOLOGO.

New SQL Descriptor Code for BIGINT (V.9.3.3) The SQL descriptor type code for BIGINT is now 25, as defined by the SQL-2003 standard. (The old Mimer SQL specific value -5 is still supported, to ensure backward compatibility.) 50 Changed Features and Functions Mimer ODBC – Open Database Connectivity

Mimer ODBC – Open Database Connectivity

SQLGetDiagField Returns Row Value for SQL_DIAG_ROW_NUMBER (V9.3.7) The SQL_DIAG_ROW_NUMBER diagnostic field is supposed to be used by applications to determine which row of a parameter set a certain error occurred on. Previously, the Mimer ODBC driver returned this value only for errors that was detected by the client. The row number for errors detected by the server was SQL_ROW_NUMBER_UNKNOWN (-2). Now, the ODBC driver returns the row number for server related errors as well. Note that SQL_ROW_NUMBER_UNKNOWN may still be returned for errors that are unrelated the row of the parameter set, such as a network failure.

Indicator Variables Return SQL_NO_TOTAL (V9.3.6) Indicator variables, for example as specified in the last argument to SQLBindCol, may now return the value SQL_NO_TOTAL (-4) if the actual size of the column data to be returned cannot be calculated at the time of the call to SQLFetch. This may occur only if the SQL data type is CLOB or NCLOB, and the host variable data type is SQLCHAR or SQLWCHAR. If the SQL_NO_TOTAL is returned, the server does not know the exact length of the text object, so it must call SQLGetData consecutive times until SQL_SUCCESS is returned.

Need Data State Now Handled at Statement Handle Level (V9.3.5) Earlier versions of Mimer ODBC handled the Need data state entirely at the connection level. This had the effect that once one statement handle entered the Need data state, other statement handles attempting to perform many operations would return with a Function sequence error. Now, whenever a statement is needing more data, such as a call to SQLExecute or SQLExecDirect has returned SQL_NEED_DATA, only that statement goes into need data mode. Other statements on the same connection handle may continue doing their business as usual. The connection related Need data state, which may be entered after a call to SQLBrowseConnect, are still handled at the connection handle level. This has the effect that it is now possible to have two or more simultaneous SQLExecute/ SQLParamData/SQLPutData-session ongoing at the same time, which was not possible before.

SQLBrowseConnect and SQLDriverConnect (V9.2.2) The ODBC Mimer Driver behavior for the DSN, DRIVER and DATABASE keywords found in a connection string has been changed. Previously, when DATABASE was specified, the database name was always used for lookup even though a DSN was specified first. If only DSN was specified, the data source name was first tried to be found as a data source and if not found a second try was made by using it as a database name. Mimer SQL 51 Features and Functionality History

Now, if the DSN and DRIVER keywords are included in the same connection string, the driver use whichever keyword appears first (and the other is ignored). If DRIVER is used then the DATABASE keyword is also required.

Mimer Product Name (V9.2.1) The Mimer product name has changed from ‘MIMER/DB’ to ‘Mimer SQL’. This reflects error messages as well as some information items returned by SQLGetInfo, such as SQL_DBMS_NAME and SQL_DBMS_VER.

Performance Enhancements (V8.2.1) The performance enhancements described are specific for ODBC. A number of general performance improvements are also described in the Database Server chapter.

Less Server Communication with ODBC (V8.2.1) The version 8.2 database server now handles auto-commit. Previously, the client had to perform the auto-commit, resulting in one extra communication for each auto-commit. In addition, when using SQLExecDirect without any host variables, the server immediately executes the request without an additional server communication. Example: SQLExecDirect(hStmt, "INSERT INTO TAB1(C1,C2) VALUES ('A', 22)", SQL_NTS);

The above example required 3 communications (compile, execute and auto-commit) in version 8.1 and requires only 1 communication in version 8.2.

Automatic Read-only Cursors with Auto-commit (V8.2.1) The database server is especially fast when it knows that no write operations will be performed. In this case, no read set will be constructed (which keeps track of all rows seen by the application). Previously, this could only be done when the connection attribute SQL_ATTR_ACCESS_MODE was set to SQL_MODE_READ_ONLY. When auto-commit is enabled, the database server knows that the only statement in the transaction will be the SELECT. Therefore, it can, temporarily, set the connection read-only. This gives the same effect as if SQL_MODE_READ_ONLY had been specified.

SELECT FOR UPDATE (V8.2.1) If a SELECT FOR UPDATE statement is executed while the value of SQL_ATTR_CONCURRENCY is set to SQL_CONCUR_READ_ONLY, an error will now be returned. Note: SQL_CONCUR_READ_ONLY is the default value. This behavior is in accordance with ODBC 3. 52 Changed Features and Functions Mimer ODBC – Open Database Connectivity

SQLSTATE Changes (V8.2.1) The driver works in two modes depending on if the application expects ODBC 2 SQLSTATEs or ODBC 3 values. ODBC 2 SQLSTATEs are used when either SQLAllocEnv is called, or SQLSetEnvAttr is called with SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC2.

Changes to ODBC Routines (V8.2.1) • SQLFetch now supports block cursors according to ODBC 3. • SQLGetInfo. All information items, according to ODBC 3, are supported by the Mimer ODBC driver. All in all, 129 information items are supported. • SQLGetFunctions now returns all new routines. Support is also added for a new mode where information about all supported routines is returned in one call. • SQLColumns returns a result set with the following columns added: COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE. • SQLGetTypeInfo returns a result set with the following columns added: SQL_DATATYPE, SQL_DATETIME_SUB. • SQLPrimaryKeys returns a result set with the following column added: DEFERRABILITY. • SQLProcedureColumns returns a result set with the following columns added: COLUMN_DEF, SQL_DATA_TYPE. All catalog functions support the SQL_ATTR_METADATA_ID attribute.

Truncate Without Warning by SQLFetch (V8.2.1) SQLFetch will no longer return a warning when blanks are truncated from a character value or nulls are truncated from a binary value.

Mimer SQL Data Type FLOAT (V8.2.1) The Mimer SQL data type FLOAT with precision is no longer associated with different ODBC SQL data types depending on precision. It is now always associated with SQL_FLOAT.

Extended SQLGetData Functionality (V8.2.1) SQLGetData now supports block cursors and also allows getting unbound columns in any order. Use SQLGetInfo(…, SQL_GETDATA_EXTENSIONS, …) to obtain information on extended SQLGetData support. Mimer SQL 53 Features and Functionality History

Mimer BSQL

BSQL Command-line Arguments (V9.3.4) The BSQL command-line switches for username and password must now include a value. To connect as OS_USER, specify "" as username, i.e: bsql --username=""

The CONNECT Statement (V8.2.4) The BSQL CONNECT statement will now use any database name supplied when starting BSQL. For example: $bsql lokdb

BSQL>connect; User: LOKADM Password: secret

This will connect to the database lokdb, whereas in earlier versions the connection would be attempted with the default database. The CONNECT TO default and CONNECT TO '' … statements are not affected.

List and Describe (V8.2.1) List and describe functions for all objects introduced in version 8.2, have been added. Example: LIST SEQUENCES; DESCRIBE FUNCTION TANGO.SQRT;

Show Settings (V8.2.1) The show settings command now includes information about transaction isolation level and transaction read write mode.

Mimer Utilities

Replication Subscription Table Limit Removed (V9.3.7) There was a limit of 500 tables in a replication subscription. This has been changed and the internal structures are now dynamically allocated and the number of tables in a subscription is now only limited by available memory.

Unimportant REPSERVER Logging Removed (V9.3.7) REPSERVER writes on the log output the number of rows deleted during and after purge of the log tables. It used to write on the log even when 0 rows were deleted. This caused a lot of unnecessary text in the log output. Now output is only written when changes has been made to a table. 54 Changed Features and Functions Mimer Utilities

MIMLOAD Command-line Arguments (V9.3.4) The -d (Unix, Windows) or /DATABASE (VMS) switch has been removed. Database is now an optional argument, which must be specified as the last argument. The password to the program ident switch has been removed. Now a subsequent switch is used to specify the password. Short form switch -i, long form switch --using, VMS style switch /USING.

Examples:

mimload -u Usr -p UsrPwd -e Pgm -i PgmPwd ... mimload --username=Usr --password=UsrPwd --program=Pgm --using=PgmPwd ... MIMLOAD /USERNAME="Usr" /PASSWORD="UsrPwd" /PROGRAM="Pgm" /USING="PgmPwd" ...

DBOPEN Command-line Arguments (V9.3.4) The DBOPEN command-line switches for username and password must now include a value. To connect as OS_USER, specify "" as username, i.e: dbopen --username=""

MIMLOAD (V9.1.1) A new program, MIMLOAD, for loading definitions and data to and from databases has been implemented. For more information, see the Mimer SQL System Management Handbook.

Mimer UTIL

Load/Unload Menu (V8.2.1) The Load/Unload menu in the Export/Import utility has been updated. Now, it contains two additional options where load/unload can be made with a user-defined delimiter. These new menu options had to be added in the existing context of the menu and some other options had to be moved to new menu positions. Thus, the old menu options for unload now have other numbers.

Using UTIL in a Script (V8.2.1) If the UTIL program fails, it will return a return-code to the calling environment. Therefore, it is possible to test for failures when using UTIL in scripts by using the standard mechanisms in the script language.

Using INFORMATION_SCHEMA (V8.2.1) Previously, the Export/Import utility gathered information about objects to export by using the MIMER-views. In Mimer SQL version 8.2, standard INFORMATION_SCHEMA dictionary views are supported. This gives slightly different access to objects and their relations. As the INFORMATION_SCHEMA views are more restrictive, compared to the MIMER system views, it is only possible to export objects that are created by the currently connected ident. Mimer SQL 55 Features and Functionality History

VMS Specific Features

ESQL Command-Line Arguments (V9.3.4) The ESQL command-line switch /SILENT has been replaced with the switch /NOLOGO. The command-line switch /OUTPUT has been removed. The output file name is now an optional argument. If specified it should be placed at the end of the command, e.g. ESQL /C very_very_very_long_name.ec shorter.c

BSQL Command-line Argument (V9.3.4) The BSQL command-line switch /USER has been replaced with the switch /USERNAME.

MIMLICENSE Command-line Argument (V9.3.4) The MIMLICENSE command-line switch /MIMSERV has been replaced with the switch /PERFORMANCE.

MIMLOAD Command-line Argument (V9.3.4) The MIMLOAD command-line switch /ENTER has been replaced with the switch / PROGRAM. A new, subsequent switch /USING is used to specify the program ident’s password.

MININFO Command-line Argument (V9.3.4) The MIMINFO command-line switch /SILENT has been replaced with the switch / NOLOGO.

Dump Files and MIMER.LOG (V8.2.4) When a server creates dump files in a dump directory, it will also create a directory entry for the MIMER.LOG file if the dump directory is on the same disk as the MIMER.LOG file.

MIMINFO Command Syntax for Selecting a Database (V8.2.4) In previous versions, the MIMINFO command had a /DATABASE switch that had to be used to select a database. For example: $ MIMINFO/DATABASE=ORDER/USERS

The command syntax has been changed so that the database is specified as a command parameter. The /DATABASE switch has been removed. This makes the syntax more like the other Mimer commands such as MIMCONTROL. The previous example becomes: $ MIMINFO/USERS ORDER 56 Changed Features and Functions VMS Specific Features

MIMTCP Process (V8.2.2) In Mimer SQL version 7, a network server (NETSRVM) was installed so that it started when connection requests were received on the MIMER port (usually port number 1360). In Mimer SQL version 8, these installation steps are not required. A MIMTCP process is started for each TCP/IP port that a Mimer SQL database is listening to. This process will accept new connections from TCP/IP clients and hand over the connections to the appropriate database server. This allows several database servers to share a TCP/IP port number.

Installation is Pre-linked (V8.1.1) Before version 8 of Mimer SQL, the executable files were linked in the installation procedure by running the MIMBUILD command procedure. In version 8, the installation is completely built and is ready to use after installing the directory tree. The MIMBUILD command procedure is removed. The MIMBUILD configuration file (CONFIG.DAT) is also removed. All configuration parameters have been moved to the MULTIDEFS and SINGLEDEFS parameter files (see the Mimer SQL VMS Guide).

No Single-user Mode Libraries (V8.1.1) In previous versions of Mimer SQL, applications (and Mimer SQL programs such as BSQL) could be linked in both single-user and multi-user mode. An application linked in single-user mode would access all LOCAL databases directly, and multi-user mode programs would access those databases by connecting to a database server. In Mimer SQL version 8, there is only one Mimer SQL database library to link to. Normally, all applications execute as if they were linked in multi-user mode. However, by defining the logical name MIMER_MODE to SINGLE, the single-user mode library (MIMLIB8:MIMDBS_xxx.EXE) will be loaded dynamically. Thus, all Mimer SQL programs have the capacity to run in both single-user and multi-user mode depending on how the logical name MIMER_MODE is set. The S or M suffix is dropped from the executable programs found in MIMEXE8 so that programs such as BSQLM or UTILS now have the names BSQL and UTIL.

New SINGLEDEFS.DAT Parameter (V8.1.1) In previous versions of Mimer SQL, some single-user mode database parameters such as the size of the bufferpool was controlled in the CONFIG.DAT file. In Mimer SQL version 8, all parameters for single-user systems are found in the SINGLEDEFS.DAT file, which must be located in the home directory of the database (the directory where the SYSDB8 file is found). If the file is absent, the single-user mode library will use default values for all parameters. An example file for SINGLEDEFS.DAT containing the default values used by the system can be found in the example directory (MIMEXAMPLES8). Always make a copy of this file to a database home directory and change the copy. Mimer SQL 57 Features and Functionality History

Changed Directory Structure (V8.1.1) The directory structure has changed slightly from the ‘run-time tree’ found in older Mimer SQL versions. (The distribution tree ([MIMAXP7]) is no longer distributed.) A new sub-directory ([.EXAMPLES]) contains all code examples that are distributed. The name of the top directory contains the version number of the Mimer SQL distribution. This simplifies future upgrades since those distributions will have new unique names. By using the MIMSETUP8 command procedure, it is easy to switch between Mimer SQL versions. Old Mimer SQL versions can be deleted by simply removing the distribution tree. (No Mimer SQL files are placed on SYS$SHARE.) The directory structure is fully explained in the Mimer SQL VMS Guide.

Multi-vendor TCP/IP Support (V8.1.1) In Mimer SQL version 8, all TCP/IP access is performed by using $QIO primitives to the BG device driver. Most TCP/IP vendors for VMS (including Digital UCX, TCPware and Multinet) support this device driver. No special actions have to be performed during the Mimer SQL installation to support these vendors.

Changed MIMSETUP8 Parameters (V8.1.1) The MIMSETUP8 command procedure defines logical names and installs shared images so that a specific Mimer SQL version can be used. The command procedure is similar to the old MIMSETUP7 procedure, but the parameter specifying the run-time tree has been removed. This information is retrieved by the MIMSETUP8 command procedure by examining the location of the MIMSETUP8.COM file. (The MIMSETUP8 procedure will not work if the file is moved away from the distribution tree.) The MIMSETUP8 procedure can now also remove defined logical names and de-install images. More information about the MIMSETUP8 procedure is found in the Mimer SQL VMS Guide.

DECNET Object Name is the Database Name (V8.1.1) In Mimer SQL version 7, a network object named MIMER had to be declared, by using the NCP command, to allow clients to connect to a database server using DECNET. When a connection request was received, the DECNET software started a process that executed the NETSRVM program. NETSRVM could then connect to the desired database. In Mimer SQL version 8, all DECNET clients connects directly to the database server. When the database server starts, it automatically listens for new DECNET connections, so no manual DECNET installation is necessary. However, each database server started on a machine needs to define a unique network object that it can listen on. The object name chosen is the same name as the database that the server operates on. If the DECNET client is running Mimer SQL version 7, the default service name (object name) for DECNET was MIMER. If a version 7 installation is to connect to a version 8 server, the service name should be changed in SQLHOSTS.DAT to be the same as the database name. If the DECNET client is running Mimer SQL version 8, the default service name for DECNET is the same name as the database name. If a version 8 client is to connect to a version 7 server using DECNET, the service name should be changed to MIMER. 58 Changed Features and Functions UNIX Specific Features

No Files on SYS$SHARE (V8.1.1) Mimer SQL version 7 placed a number of files on the system directories. These included files for shareable images, and section files for mapped shared data areas. Mimer SQL version 8 does not place any file in the system directories. Shareable image files reside in the library directory (MIMLIB8). All shared memory resources use the page files as backing storage.

MULTIDEFS.DAT (V8.1.1) The contents of the MULTIDEFS.DAT file has changed since Mimer SQL version 7. It is recommended that the contents of this file is revised when upgrading to Mimer SQL version 8. All parameters in MULTIDEFS.DAT now have a default value. The default value for a parameter is used when the parameter is absent from the file. This means that it is possible (but not necessarily desirable) to have a completely empty MULTIDEFS.DAT file. The MULTIDEFS.DAT file is described in the Mimer SQL VMS Guide.

UNIX Specific Features

Added Sudo Support (V9.3.8B) Some Mimer SQL administrative task must currently be performed by root. Earlier these commands had to be executed by the root user explicitly. Now this is changed so that sudo can be used, which is automatically asked for when needed. The affected commands are:

dbinstall Install a Mimer SQL database dbuninstall Remove a Mimer SQL database mimadmin Manage Mimer SQL databases mimautoset Manage Mimer SQL database autostart/autostop mimdbfiles Manage files for a Mimer SQL database mimdbvis Manage DbVisualizer installation mimdesktop Manage Mimer SQL availability in the desktop miminetd Manage Mimer SQL adaptation to internet services daemons. miminstall Install Mimer SQL mimlink Link Mimer SQL installation to system locations, e.g. /usr/bin mimlistdb List started Mimer SQL database servers mimodbcadmin Administer ODBC drivers and ODBC data sources mimowner Manage Mimer SQL database owner mimuninstall Uninstall Mimer SQL Mimer SQL 59 Features and Functionality History

mimunlink Unlink Mimer SQL from system locations

In addition, for this matter the following new commands are added together with corresponding man pages:

mimdbserver Control a Mimer SQL database, e.g. start/stop mimodbcdm Manage iODBC environment mimsqlhosts Manage the Mimer SQL database registration file dbinstall Execution (V9.2.1) The dbinstall program is now changed so that it can be executed towards an already existing database. If used this way, missing objects for the database can be recreated. For example, if the .dumper.sh script is missing, it will be recreated.

New I/O Primitives Used on Solaris (V9.2.1)

Solaris: Earlier the Solaris Asynchronous I/O package was used, but since there were problems detected (especially when using third party disk management products) the I/O system has been replaced. Now there are dedicated I/O- threads in the Mimer SQL configuration that perform all I/O.

The DumpScript Parameter in the multidefs File (V8.2.4F) Using the DumpScript parameter, you can specify a command that will execute if a database server crashes. This command will be executed in a separate process (the database server uses the system() call). The following string substitutions will be performed before the command is used: %p – The pid of the aborting database server process %% – Insert a single % character We recommend that you don't change the value of this parameter, unless you are directed to do so by Mimer SQL support staff.

Automatic Server Dump Facility (V8.2.4) The database server’s dump facility which automatically creates a dump directory containing information useful for Mimer SQL support personnel, now creates dumps when the SIGBUS signal is encountered.

Updated Error Tracing (V8.2.4) If the Mimer SQL database server is aborted due to a signal reception, detailed information about the cause of the interruption is written to the database server log file, i.e. mimer.log. This information is mainly for helping Mimer SQL support personnel in tracing possible errors. 60 Changed Features and Functions UNIX Specific Features

By using the multidefs parameter DumpScript, see The DumpScript Parameter in the multidefs File (V8.2.4F) on page 59, additional information can be gathered from an aborted database server. Once all dump files are generated, the server will attempt to create a core file. Note that the core file will only be created if the database server process has the appropriate process limits. You should set the process limits for the process that starts the database server (runs the mimcontrol -s command) since the process limits are inherited by the database server process.

Linux: On Linux, you can check what process limits you have by using the command: $ ulimit -a

To set a limit for the core files use the -c switch, for example: $ ulimit -c 999999

If you set the limit to zero (0), no core file will be generated.

Root Not Required (V8.2.2) When creating a database by executing the dbinstall command, any user, not only root, can be defined to manage the dbserver.

Example makefile Version 8.2 (V8.2.2) The example makefile no longer needs the MIMER_HOME environment variable to be defined.

Licensing System (V8.2.2) The license system has been changed. All software keys are stored in one file: /etc/mimerkey. This file is administrated using the mimlicense utility.

SDBGEN (V8.2.2) Previous versions of the SDBGEN program always created the database in the current directory. In this version of SDBGEN, it is possible to supply a database name which will be used when looking up the directory in which the database files should be created. The database name can be supplied as a parameter to the SDBGEN program. If no parameter is given the value of MIMER_DATABASE is used and if this variable is undefined the default database in /etc/sqlhosts is used. The SDBGEN program is also used to upgrade the database from earlier versions. The mimsdbgen program is no longer included in the distribution as it is possible to supply parameters to the SDBGEN program. For more information on SDBGEN, see the Mimer SQL System Management Handbook. Mimer SQL 61 Features and Functionality History

Default Number of Users (V8.2.2) The default license key included in the distribution allows 10 simultaneous users for test and development. This license key is installed when the system is installed and is subject to the license agreement. tmp Not Used (V8.2.2) The /tmp directory is no longer used for storage of temporary files. Instead, the directory defined by the environment variable TMPDIR is used for such storage. If this variable is not set, the directory .mimer_tmp is created in the users home directory for such storage. For log file storage, the directory .mimer_log is created in the user’s home directory.

Client Channel Limit (V8.1.3D) Previously, there was a hard limit (50) on the number of client channels, i.e. connections, a client process could do. Now this limit is adjustable up to 2000 by setting the environment variable MIMER_MAXCLIENTCHAN. If not set, the default is 50. The environment variable assignment should be made for the client process accessing the database server. When the limit is reached, an error message like the following will be displayed: SQL>CONNECT TO 'CUSTOMERS' AS 'C1' USER 'SYSADM' USING 'MUDDY'; MIMER/DB fatal error -21024 in function CONNECT No available channel id number

Asynchronous I/O Limit (V8.1.3D) Previously, there was a hard limit (128) on the number of parallel asynchronous I/Os that could be started. On some systems, situations could arise where system limits or system resources could not cope with a specific amount of parallel I/O operations. Error messages like the following one could be displayed: aio_write: [EAGAIN] Resource temporarily unavailable

Now this limit is adjustable up to 128 by setting the environment variable MIMER_MAXASYNC. If not set, the default is 40. The environment variable assignment should be made for the user process starting the database server, i.e. root. If this limit is set too low it may, for example, not be possible to start a database server. Error messages like the one in the following example session may be displayed if the limit is set too low in comparison to the server configuration: # export MIMER_MAXASYNC=8 # mimcontrol -s customers MIMER/DB Startup Error Error when initializing bufferpool (DKSTA9) Too many kernel and shadow servers specified: 5+2, max = 5

2000-05-04 16:28:12.26 Database server not operational

# 62 Changed Features and Functions UNIX Specific Features

MemLock Default in multidefs (V8.1.3D) Previously, the default value for the MemLock parameter in the database server multidefs file was 1, i.e. enabled. This is now changed to 0 (disabled). (The default value is generated when the multidefs file is created, i.e. when the database server is started and no multidefs file exists).

Menu System, mimadmin (V8.1.3) The mimadmin interface is updated so that more information is showed by default: Target database server: customers Database server state: Stopped Database server home: /d1/customers MIMER installation used: /opt/mimer813A

mimunlink (V8.1.3) The mimunlink command is updated so that it now can remove links for an installation that is not of the same version as the mimunlink command itself. This can be useful in situations where installations are moved or removed without first removing these links to /usr/lib and /usr/bin. If the versions differ, there is no guarantee that everything is unlinked since mimunlink only knows about links for the set of files included in the current version.

MIMER_HOME Not Required (V8.1.3) Previously in version 8 the MIMER_HOME environment variable was required to be set to point out the Mimer SQL installation used. If not set, various error situation could arise.

Single-user Shared Library Lookup In the following case, the single-user shared library lookup failed: # bsql -s MIMER/DB fatal error -21040 in function CONNECT Could not map library for single-user mode, OS Error message: 'dlopen: ./lib/libmimdbs.so: cannot open shared object file: No such file' #

Now the common operating system shared library lookup is used. That is, when linking the Mimer SQL shared libraries to /usr/lib, they are automatically located by the runtime loader. If the libraries are not linked to /usr/lib the environment variable LD_LIBRARY_PATH (or corresponding) should be set to point out the library location.

HP-UX: For HP-UX, the MIMER_HOME environment variable setting is still required to locate the single-user shared library. Mimer SQL 63 Features and Functionality History

Database Server Startup The following example illustrates how a database server startup failed if MIMER_HOME was not defined correctly: # mimcontrol -s customers 1999-10-12 10:46:39.77 The environment variable MIMER_HOME must point to the MIMER distribution #

Now, the path used to find the mimcontrol program is also used to find the dbserver program.

Example makefile Version 8.1 (V8.1.3) The example makefile is updated, mainly for easier usage when creating ODBC applications. Note: The example makefile still needs the MIMER_HOME environment variable to be defined (machine specific compiler and loader options are included from the makeopt file found in the examples directory of the Mimer SQL installation).

Database Server Alert Messages (V8.1.2) In earlier versions, the MULTIADM user received an e-mail when fatal errors occurred. In Mimer SQL version 8, the UNIX syslog function is used which means that if a fatal error occurs, a message is printed on the console and the same message is written in a system log file. The Oper parameter in the multidefs parameter file can be used if you want to send an e-mail in fatal error situations. If Oper is defined, an e-mail containing the error message will be sent using the string assigned to Oper as the recipient(s).

Administration Environment (V8.1.1) In Mimer SQL version 8, the administration environment is simplified. The database server is now installed, executed and administered by the superuser, i.e. root. Previously, the users MIMERADM and MULTIADM were created for managing the installed software and the database server(s). These users are no longer needed. The Mimer SQL software is ready to use when installed. That is, shared libraries, programs, data files, etc. do not need any specific management or profiling. The databases can be managed by using the mimadmin command. This command presents a menu based system that invokes underlying standalone programs, such as mimcontrol, mimhosts, miminfo, etc.

No Single-user Mode Programs (V8.1.1) In previous versions of Mimer SQL, applications (and Mimer programs such as bsql) could be linked in single-user mode and multi-user mode. An application linked in single- user mode would access all LOCAL databases directly and multi-user mode programs would access those databases by connecting to a database server. 64 Changed Features and Functions UNIX Specific Features

In Mimer SQL version 8, there is only one Mimer SQL database library to link to. Normally, all applications execute as if they were linked in multi-user mode. However, by defining the environment variable MIMER_MODE to be SINGLE, the single-user mode library will be loaded dynamically. All Mimer SQL programs have the capacity to run in both single-user mode and multi- user mode by using command line switches or by defining the environment variable MIMER_MODE. The s or m suffix is dropped from the executable programs installed. Programs such as bsqlm or utils now have the names bsql and util and only exist in one form.

Changed Directory Structure (V8.1.1) The directory structure has changed slightly from the one found in older Mimer SQL versions. When installing Mimer SQL version 8, the miminstall command will prompt for the installation directory. A sub-directory named to reflect the actual Mimer SQL version, e.g. mimer811A, will be created relative to the installation directory. (This naming convention simplifies future upgrades since those distributions will have new unique names). Beneath this top directory the following sub-directories can be found: bin for executable files. doc for documentation, e.g. PDF-files and README files. examples for various examples. lib for libraries. man for man pages

DB Server Configuration File, multidefs (V8.1.1) The .multidefs file that existed for database servers in Mimer SQL version 7, is now renamed to multidefs (without a leading dot). Most of the parameters contained in it have also changed since Mimer SQL version 7. The multidefs file is automatically created for each database server if it does not exist at startup. Default values are specified for all the parameters. For detailed information on the multidefs file see the Mimer SQL System Management Handbook. Note: Old configuration files, i.e. from Mimer SQL version 7, should not be used in Mimer SQL version 8.

Database Registry File, /etc/sqlhosts (V8.1.1) When a database is installed using the dbinstall command, the database will be automatically registered in the /etc/sqlhosts file. If the sqlhosts file does not exist, it will be created with a default layout which is different to the sample sqlhosts file distributed in earlier Mimer SQL versions. If an existing Mimer SQL site wishes to use the new style sqlhosts file, simply rename the old one, execute the mimhosts command and use it to add the relevant databases to the new sqlhosts file which were defined in the old sqlhosts file. Mimer SQL 65 Features and Functionality History

If the dbinstall (or mimhosts) command is executed when an /etc/sqlhosts file from a previous Mimer SQL version exists, the new database entry will be added correctly and all existing entries in the file will be reformatted to fit the new sqlhosts database entry layout. Comments are left as is. For more information on the sqlhosts file see the Mimer SQL System Management Handbook.

TCP Ports for Database Servers (V8.1.1) In Mimer SQL version 7, a network server (netsrvm) was installed so that it started when connection requests were received on the Mimer port number (usually port 1360). In Mimer SQL version 8, these installation steps are not needed. Basically, database clients connect directly to the database server, using a unique TCP/IP port, which implies that each server on a node must be set up to listen to a different port. However, in the default installation, the mimtcp program is used which allows clients to always establish a connection to the port number 1360, no matter which Mimer SQL version 8 database server is targeted. The parameter TCPPort in the multidefs file (exists for each database server) determines the port number that the database server listens to. However, the default is inetd which indicates that the server uses the mimtcp program for client connects. If the mimtcp program is not used, a TCP/IP port number should be specified for the TCPPort parameter. If several database servers are started on the same machine, a unique TCP/IP port number has to be allocated for each. This means that the correct port number must be specified in the /etc/sqlhosts file on machine of each client wishing to connect to a particular database server. If a connection request for a specific database is made to the wrong database server, the server will refuse the connection.

Database Server Aliases (V8.1.1) In Mimer SQL version 7, a database could be given several names by adding several entries to the /etc/sqlhosts file that pointed to the same database. In Mimer SQL version 8 this is no longer possible. Each database should be given a name that is unique to avoid possible confusion.

Database Server Dump Directory (V8.1.1) As in earlier versions, the server placed dump files in a dump directory if it crashed. The name of this directory is changed and contains the current month, day and time, in the format MonDD_HHMM. The dump directory will normally be placed under the home directory of the database (where the sysdb8.dbf file resides). The location of the dump directory can be changed by using the DumpPath parameter in the multidefs parameter file.

ODBC Support (V8.1.1) Mimer includes an ODBC driver, but in the Mimer SQL version 8 distribution there is no ODBC Driver Manager provided. In Mimer SQL version 7, the runtime part of the Visigenic ODBC Driver Manager was bundled. Theoretically, any ODBC Driver Manager can be used. 66 Changed Features and Functions Windows Specific Features

Windows Specific Features

Embedded SQL Support (V9.3.8) The old interfaces in the ESQL processor which used SQLCA and SQLDA areas to access the database server are no longer supported. This functionality has been marked as deprecated for a period of 15 years. Applications using SQLDA must switch to the standardized SQL descriptor area. See command ALLOCATE DESCRIPTOR in the SQL Reference. Applications using SQLCA for error code checking should switch to SQLSTATE, SQLCODE and/or GET DIAGNOSTICS instead. For example references to sqlca.sqlcode is replaced with sqlcode. To access sqlcode it must be declared in the declare section. For example: exec sql include sqlca; ... void routine1() { ... open cursor1; if (sqlca.sqlcode < 0) {

is replaced by void routine1() { exec sql begin declare section; int sqlcode; exec sql end declare section; ... open cursor1; if (sqlcode < 0) {

If an application tries to use SQLDA or SQLCA, the error -18009, “Embedded SQL and MIMER/DB versions are incompatible, please preprocess source code” is returned.

Administrative Privileges (V9.3.7E) When running programs that require administrative privileges on Windows Vista the user will automatically be prompted for additional privileges when the application is started. This change is made in the Mimer Administrator and the Mimer Controller. These programs require privileges in order to start and stop Mimer database servers. The mimcontrol command line program also requires privileges. Because of this the program should be used from a command prompt with elevated privileges.

Protocol for Old Emulator Dropped (V9.3.5) The emulator used with Embedded Visual C++ version 3 is no longer supported. Due to this the protocol *tcp - emulator* has been removed.

SmartDevice Directory Structure (V9.2.5E, V9.3.5) The installation directory structure for Pocket PC and Smartphone has been updated to reflect the structure used in Visual Studio 2005. Mimer SQL 67 Features and Functionality History

C Runtime Library (V9.3.5) The Mimer distribution is now built with the C-runtime library that comes with Visual Studio 2005. The libraries are installed in the Mimer SQL installation folder.

Renamed Wizards (V9.3.4) The wizard sdbgen has been renamed to sdbgenw. The wizard pdacopy has been renamed to pdacopyw. The wizard exload has been renamed to exloadw. Both programs now support a new set of command-line arguments and switches. Use sdbgenw --help and pdacopyw --help for more information about available program arguments.

Mimer Administrator (V8.2.1) The Mimer Administrator now provides more information in the overview window. Details about the different objects are now displayed. The main window has been made re-sizable. Local database run-status is indicated by the color of the icon. Green means the database server is running, yellow means logins are disabled or shutting down, red means the database server is stopped, and finally, gray means status is unknown. It is possible to control a local database using a popup menu. Activate the menu by right- clicking on the database name. The Mimer Administrator has been enhanced to handle several concurrent license keys. This support is available under a separate tab in the Mimer Administrator's main window. The contents of an added key can be examined by double-clicking the corresponding entry. It is also possible to view the contents of a key in the dialog in order to update a key.

Mimer Info Enhancements (V8.2.1) The Mimer Info utility can now display information from the dump directories that are created when the database server malfunctions. It is also possible to select a new database without restarting the utility.

DB-check Enhancements (V8.2.1) The Windows based Databank (DB) Check utility has been enhanced so that it is now possible to view the output and navigate the output using the arrow keys while the DB- check is in progress. In addition, an ongoing check may now be cancelled. The open file dialog allows several files to be selected. 68 Changed Features and Functions Mimer SQL Mobile Specific Features

Mimer SQL Mobile Specific Features

PDACOPY Wizard Simplified (V9.3.5) The wizard to copy a database to a mobile device has been simplified. For example, the option to refresh statements has been removed as this is done automatically. All choices for picking the emulator environment has been removed as this is handled by selecting the emulator via ActiveSync. From the PDACOPY perspective the export or import is always done via ActiveSync whether an Emulator or actual device is used. The corresponding command line options for these features have been removed.

Filenames Altered During Export (V9.2.5) When databank files are exported to a PDA the system now removes any drive and directory specifications from the filenames in the data dictionary. This allows the new home directory path features (see Home Directory Path (V9.2.5) on page 36) to be used on the device. I.e. databank files can be placed in different locations such as memory sticks and so on.

Mimer Explorer Enhancements (V9.2.1) Mimer Explorer now displays information whether a statement is available as SCROLL, NO SCROLL, or both. This feature is only available when using a server of version 9.2 or later. Mimer SQL 69 Features and Functionality History Chapter 3 Corrected Features and Functions

This chapter describes corrected features and functionality introduced into Mimer SQL in previous versions.

The Mimer SQL Database Server

Internal Databank Identifier Invalid (V9.3.8B) A problem has been corrected that under rare circumstances would cause COMMIT to fail with an –16185 error code (internal databank identifier invalid). The error message occurs because the problem allows an accessed databank to close before the transaction is completed. A backup operation is expected to have been concurrent with the failing transaction when an error occurred.

Background Dbcheck Hang (V9.3.8) In extremely rare circumstances the database server would hang when performing a background databank check of the data pages in a databank. For the situation to occur other request must be updating data and the background check must be checking a table with collations. This is now corrected.

LOGDB Restart (V9.3.8) The restart of large objects in LOGDB could at times reference large objects from the user databank. This caused an incorrect LOGDB corrupt message to be returned. This has now been corrected.

Improved Control of LOB References Outside Databank End-of-file (V9.3.8) The control of large object references when doing implicit verification or when applying a restart set to a databank has been changed. Previously this was signalled as an I/O error (end of file) in the log and almost ignored. Now the databank is considered as corrupt and is disabled for further use. 70 Corrected Features and Functions The Mimer SQL Database Server

Both operations mentioned occur the first time a databank is opened after a database server start. (Implicit databank verification is only run if the database server is not correctly stopped.)

LOB’s In Databank Created By an Old Mimer Version (V9.3.7G) Storage of large objects (LOB’s) has been slightly changed in version 9.3. This led to an introduction of an error when deleting records or updating a column with LOB data in tables held in a databank upgraded from an earlier Mimer version. The error is now corrected.

Problem With Large SQL Statements (V9.3.7F) In some cases, compiling large SQL statements via ODBC caused a server crash. The problem occurred if the connection attribute SQL_NOSCAN was set to off. One way to avoid this problem in versions prior to 9.3.7F is to set the attribute to on by the call: rc = SQLSetConnectOption(Connection(ConnectionIdx).hdbc, SQL_NOSCAN, SQL_NOSCAN_ON);

Anyhow, the problem is now corrected.

Table Control Area Exhausted (V9.3.7F) In cases where there was a large bufferpool and the application performed a large number of changes in a databank with WORK option it was possible that the system used an excessive number of table control blocks. In this version the system will not use more than half the table control blocks in these cases. In addition, it will only report table control area exhausted a few times rather than filling the mimer.log with these messages.

SQLPool Exhausted During Restore (V9.3.7E) When performing restore of a databank the system, at times, reported that the space in the SQLPOOL was exhausted, while in fact it was not. This has now been corrected.

Recompilation of Views Closing Cursors (V9.3.7) If internal recompilation of views were needed (e.g. when performing UPDATE STATISTICS) and the amount of open tables were above a certain level, recompilation of views erroneously closed all open cursors when the internal view recompilation committed its changes. This has been corrected in the database server.

Online Backup (V9.3.7) When performing online backups the system would in very rare circumstances stop with an internal inconsistency logged in the mimer.log file. When this happened the backup was complete and the system could be restarted with no special actions. The cause of the shutdown has now been corrected. Mimer SQL 71 Features and Functionality History

Large Object Restart (V9.3.7) During long restart sequences involving large object columns the system at times incorrectly reported the databank to be corrupt. This has now been corrected.

Write Set Corrupt when Automatic Refresh (V9.3.6) Creating an index or some other statement that caused an automatic refresh of precompiled statements could give the error -16206, “Write set corrupt”. This is now corrected.

Server Hangs when Less than Seven 16K Pages (V9.3.6) When running a server with less than seven 16K pages the server may hang. Previously, the absolute minimum number of 16K pages was specified to be 4. For physical reasons, the absolute limit is now 4 only if there are 64K buffer pool pages in the system. If there are no 64K buffer pool pages, the lower limit is 5 pages. Also, a problem has been corrected that will now indeed allow five and six 16K buffer pool pages.

Read-only Transactions (V9.3.3) A problem introduced in v9.3.1 has been corrected that could cause the SET TRANSACTION READ ONLY statement to be ignored. The problem would typically occur if the transaction was the very first transaction for the user.

-19078 Warning on the Error Log (V9.3.3) A problem has been corrected that could cause “Invalid MOS parameter” warning messages on MIMER.LOG. The warnings could occur during very high load with very complex SQL statements.

ALTER DATABANK’S FILESIZE Option (V9.3.2) Support for the SET FILESIZE and DROP FILESIZE in the ALTER DATABANK statement is now implemented.

ALTER DATABANK To READ ONLY (V9.3.2) In version v9.3.1 it was possible to change the option for a databank to READ ONLY even though the databank contained tables that were defined as using a current collation. This is not allowed in version 9.3.2 and later.

CAST Boolean AS Varchar (V9.3.2) Using the construction CAST( AS varchar(5)) could cause memory corruption. This is now corrected. 72 Corrected Features and Functions The Mimer SQL Database Server

Update Statistics (V9.3.1) A problem with the dictionary cache not being updated after an UPDATE or DELETE STATISTICS statement has now been corrected.

Execution Interrupted by Scheduler (V9.2.5) A problem has been corrected which sometimes could cause incomplete statements to terminate with an “Execution interrupted by scheduler” error. The problem would only occur for expensive statements that are both prepared and executed with the same client request (such as SQLExecDirect for ODBC clients) on a fully occupied database server.

Online Backup Improvements (V9.2.4) When an online backup was made the transaction cache was not released properly. This could cause degradation of performance for long online backup sequences. This has now been corrected. Occasionally the online backup would produce errors such as “Table identifier invalid” or “Internal inconsistency detected”. This was caused by a concurrent copying of TRANSDB content while applying changes to other backup databanks. This has now been corrected. A problem has also been corrected for databanks containing BLOB or CLOB data. The problem occasionally caused an inconsistent backup databank where some of the LOB data references were corrupt. The inconsistency can be detected by using the DBCHECK utility on the backup databank.

Recreating a Smaller LOGDB (V9.2.4) A problem has been corrected regarding recreation of LOGDB. The problem could occur under rare circumstances if the recreated LOGDB file was smaller than the preceding file. The problem would cause I/O errors to be logged when dropping the log next time or when restarting after a crash.

Improved Index Handling (V9.2.4) The SQL compiler’s index handling has been improved, as corrections have been done to the query optimizer.

ORDER BY With Many Indexes (V9.2.2G) SELECT with ORDER BY had problems when too many indexes were involved. This is now corrected.

More Than 32 Foreign Key References From a Table (V9.2.2) If a table was defined with more than 32 foreign key references the error message “Internal inconsistency detected” was signalled at insert or update. Mimer SQL 73 Features and Functionality History

Interrupted UPDATE STATISTICS (V9.2.2) If a databank was offline, or if a table was not accessible for any reason, updating statistics was interrupted and no statistic was gathered for the following tables. This is now changed, so those tables are ignored. A warning message would have been nice, but is not introduced.

Implicit Databank Verification Causing Loop (V9.2.2) If a databank has more than one rootpage (i.e. holding many tables) and there are tables with primary key columns using collation definition, the implicit databank verification could cause an infinite loop. Implicit databank verification will only be run if the database server is not correctly stopped.

Using Columns With Collations in Primary Keys or Indexes (V9.2.1C) There is a problem in version 9.2.1A and 9.2.1B which can cause a database server to hang when accessing a table where a primary key or index is sorted using a non-default collation. This problem is now corrected.

XA Transactions – Migrating Between Processes (V9.2.1) When distributed transactions were used with the XA protocol, it was possible for a transaction to be handled by one process and then subsequently handled by another process. When this was done, the ownership for the reference counts for underlying objects used by the transaction was not properly migrated to the other process. The effect could be that exclusive operations incorrectly were allowed or, in rare circumstances, the objects actually were closed before the transaction completes. This is now corrected.

XA Transactions – Object Reference After Restart (V9.2.1) When a machine crashes, any distributed transactions that were in the prepared state (and not yet committed), are activated upon restart of the server. However, reference counts for the objects used by the transaction were not set properly. The effect could be that exclusive operations may be incorrectly allowed or, in rare circumstances, the objects actually were closed before the transaction completed. This is now corrected.

Database Hang During Databank Verification (V9.2.1) The database server would previously hang during the internal verification, when the last page of the databank file was a bitmap page. This occurs rarely as only every 16256th block is a bitmap and the extension of the databank file occurs in chunks.

Next Values of Sequences (V8.2.4) In some cases, the next_value of sequence_name function would return previously used sequence numbers. This problem has now been corrected. 74 Corrected Features and Functions The Mimer SQL Database Server

Online Backup Problem (V8.2.4E) If the system ran out of transaction state table entries during an online backup which included TRANSDB, the server would display an error message and terminate. This occurred when one of the background threads accessed the TRANSDB backup incorrectly. This has now been corrected.

Background Thread Loop (V8.2.4E) If a reorganization of the commit set in TRANSDB occurred simultaneously with commit of transactions with more than 16K of data changes, the background threads would, in rare circumstances (due to timing conditions) enter an infinite loop. This has now been corrected.

Multiple Updates of Same Record with Secondary Index Access (V8.2.4E) If: the same row was updated more than once, and the index row was read from the index base table, and the table row from the transaction cache, and the statement was subsequently rolled back due to some other error, an inconsistency was found on the write and an error log entry with the text Write set corrupt was written. The write set is now handled properly in this case.

Invalid Timestamp Messages During online Backup (V8.2.4E) During an online backup which included LOGDB, error messages saying there was an invalid timestamp, were sometimes written to the mimer.log file. The error message was incorrect, and the backup was properly made. The code that produced the incorrect error log message has been corrected.

Creating Temporary Tables Using MIMER/PG (V8.2.4E) There was a problem with version 8 servers which, in some situations, could prevent MIMER/PG from creating temporary tables. This problem has now been corrected.

Many Request Threads and High Load (V8.2.4) In earlier versions of 8.2, the Mimer SQL database server could crash due to a problem with its scheduler. The problem could occur when every request thread was occupied with a large request and the server was configured for use of more than 10 request threads. This problem is now corrected.

Growing T-cache (V8.2.4) In previous versions, the transaction cache grew when inserting or updating rows that were not accessed any more, for example, when inserting rows in ascending primary key order. This caused SQLDB to grow. Mimer SQL 75 Features and Functionality History

In this latest version, the system detects when there are no active transactions at all in the system and, whenever this is the case, drops the entire transaction cache. This makes transaction cache handling more efficient than before. Further improvements have been made when long read-only transactions are active in the system. In this case, the transaction cache grows but all newly started transactions only access small parts of the transaction cache. Therefore, it is important to make sure that transactions are made read-only as often as possible This is now done automatically in the BSQL program.

Error Handling and Low Memory (V8.2.4) The error handling in the database server in low memory situations has been improved. In previous versions, connections could be dropped when the server memory pool was low.

DDL Statements and Older Clients (V8.2.4) Previously, when using a version 7.2 client, such as BSQL, with a version 8.2. database server, all DDL statements would fail. This has now been corrected.

Mimer ESQL Clients (V8.2.4) In earlier versions of 8.2, a Mimer ESQL client using SQL statements with more than 180 result columns and input parameters could cause the Mimer SQL database server to crash when several users were active on the server. This problem is now corrected.

Commit Set Problems (V8.2.4) When only very large transactions were made (larger than 3 megabytes), the commit set continued to grow, causing TRANSDB databank to grow. This has now been corrected. In rare circumstances, the system reported a corrupt commit set. A subsequent restart of the server cleared this problem. The cause of this problem has now been corrected.

Accessing Views in Read Only Transactions (V8.2.3) Previously, there was a problem when accessing views in read only transactions if the view had to be recompiled. For instance, a view has to be recompiled after using the UPDATE STATISTICS statement. Previously, this caused an infinite loop. This problem has been fixed. 76 Corrected Features and Functions Mimer SQL Structured Query Language

Mimer SQL Structured Query Language

Error Handling Mixing Set Functions and Column Expressions (V10.1.2B)

Mimer SQL Engine If a GROUP BY clause is not specified, the SELECT list must either be a list that does not include any set functions or a list of set functions and optional literal expressions. If both set functions and column expression are specified, an error is raised. Unfortunately Mimer SQL Engine did not detect the case when a set function is hidden in a CASE condition, e.g. select case when count(column1) > 10 then 1 else 0 end, column2 from tab1;

Previously, no error was raised in this case. This is now corrected, so that an error is raised. Queries like the one above need to be rewritten.

INSERT VALUES With Scalar Subquery (V10.0.8) Scalar subqueries can now be included in the values clause of an INSERT statement. Previously there were problems with aggregate functions and search conditions, and an error was raised (since v9.3.3D.)

Error Handling Mixing Set Functions and Column Expressions (V10.0.8) If a GROUP BY clause is not specified, the SELECT list must either be a list that does not include any set functions or a list of set functions and optional literal expressions. If both set functions and column expression are specified, an error is raised. Unfortunately Mimer SQL Engine did not detect the case when a set function is hidden in a CASE condition, e.g. select case when count(column1) > 10 then 1 else 0 end, column2 from tab1;

Previously, no error was raised in this case. This is now corrected, so that an error is raised. Queries like the one above need to be rewritten. Mimer SQL 77 Features and Functionality History

CASE With Different Collations (V10.0.3) When processing a CASE expression’s different results, no verification of collations was performed. This is now corrected, so that the use of one single collation is verified. A CASE expression containing results with different collations, e.g: SELECT CASE WHEN id > 10 THEN col_swe ELSE col_eng END FROM sometable

must now be re-written to use a specified collation, e.g: SELECT CASE WHEN id > 10 THEN col_swe COLLATE english_1 ELSE col_eng END FROM sometable

Scrollable Cursor For UNION ALL With Variable Length Columns (V10.0.3) If a scrollable cursor was used to read a result of a UNION ALL, where one or more columns in the result were variable length (e.g. NVARCHAR), an numeric error could occur when fetching data. This in now corrected.

Sub-query With Set Function as Argument to Function (V10.0.6J) If a sub-query contained a call to a user defined function with a set function as argument, the sub-query’s output wasn’t reliable. This could cause the top-level SQL statement to return too few rows (or too many). Example of query having the problem: SELECT * FROM sometable WHERE col1 = (SELECT func(MAX(col2) FROM sometable)

This is now corrected.

3.0.1 OUTER JOIN Optimization (V10.0.5C) The optimization of queries with many tables and at least one outer join has been improved.

Complex Old/New Table Query Out Of Memory (V9.3.8B) If a trigger included a rather complex query using the old (or new) table, the internal error -11002 “Internal DB dynamic storage area (SQLPOOL) exhausted” was sometimes returned. This problem is now corrected.

Outer Join With schema.table.* (V9.3.8B) In an outer join it was not possible to use an asterisk to return all columns of a qualified table. This is now corrected. 78 Corrected Features and Functions Mimer SQL Structured Query Language

Many Values in IN Clause (V9.3.8B) A query including a condition on an indexed column using an IN clause with very many values specified (typically more than 100), was not able to be executed on some specific platforms. This problem is now corrected.

Support for Clients Running version 7 (V9.3.8) A problem has been corrected which caused the server (version 9.3.7) to crash if it was used with database clients running version 7.

Recursive Stored Procedures (V9.3.8) A problem with recursive stored procedures has been corrected. The problem could under rare circumstances cause the server to crash.

BEGINS With Long Literal (V9.3.8) If the BEGINS function was applied on a NATIONAL CHARACTER type column, and the length of the literal was more than three times the column length, no rows were ever returned. E.g. SELECT * FROM sometable WHERE BEGINS(nchr8, N’abc’). This is now corrected.

SELECT DISTINCT on Part of Primary Key (V9.3.7G) If SELECT DISTINCT was used to read nothing but the first two or more columns of a primary key, but not the whole key, and at least one of the selected columns was VARCHAR, NATIONAL VARCHAR or VARBINARY, the result could contain duplicates. This is now corrected and no duplicated rows are returned.

Default NULL For Binary Columns (V9.3.7F) If a binary column was declared with NULL as default value, it was not possible to use that default value when inserting or updating data. This is now corrected.

Drop Filesize For System Databanks (V9.3.7E) In earlier versions, dropping the file size for a system databank, e.g. transdb, caused the error message “Databank transdb locked by another MIMER/DB user”. This has now been corrected so that it works as expected. Mimer SQL 79 Features and Functionality History

Problem With For Loop in PSM If an item from the select list in a for loop was used in an record literal this caused an spurious error message. E.g. FOR SELECT book_title,isbn FROM books WHERE book_title LIKE p_title DO RETURN (book_title,isbn); END FOR

resulted in the error “Out of memory”. This is now corrected.

OUTER JOIN With DISTINCT In Views (V9.3.7E) View definitions with an outer join in combination with distinct could in some cases return internal error -19225. The problem was introduced in v9.2.4, and has now been corrected.

Precompiled Statement Problem (V9.3.6C) Using precompiled statements which invokes routines containing multiple instances of identical DML statement on a table with triggers causes a database failure. There are also some other cases involving recursive invocations in statements that could cause a database failure as well. These problems are now corrected.

Scrollable Cursor for Result-set Procedures (V9.3.6C) It was not possible to open a scrollable cursor for a result set procedure more than once in an application. This is now corrected.

Invalid Path When Creating Statements (V9.3.6C) When creating a statement in a specific schema, the name of the current used was incorrectly used as a qualifier when doing look up for unqualified names. This is now corrected so that the schema name is used instead.

Problem Using Precompiled Statements (V9.3.6C) Executing a statement that contains multiple identical DML statements that in turn invokes PSM routines, causes a database failure. This is now corrected.

ORDER BY Indexed Column Not In SELECT List (V9.3.6C) If a primary key column was also included in an index specification, it was not possible to order a result-set by that column without also specifying the column in the SELECT list. This is now corrected. 80 Corrected Features and Functions Mimer SQL Structured Query Language

FETCH LAST Returns NO DATA (V9.3.6C) FETCH LAST related functionality did not work properly for scrollable cursors when two tables were joined using a unique key in the first accessed table. This is now corrected.

COUNT DISTINCT in JOIN (V9.3.6C) COUNT DISTINCT related functionality did not work properly for joins using a key in the first accessed table. This is now corrected.

Insert Using Boolean Variable (V9.3.5) In earlier versions it was not possible to insert a boolean value using a host/PSM variable. This functionality is now implemented.

Self Referencing Foreign Keys (V9.3.3) Given the following tables: SQL>CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT REFERENCES t1 ON DELETE CASCADE); SQL>CREATE TABLE t2(c1 INT REFERENCES t1 ON DELETE CASCADE);

it was not possible to create an precompiled statement containing a delete on table t2. This problem has been corrected.

Date Arithmetics (V9.2.5) When calculating an interval between two dates, days within a month was not considered. As an example SELECT (DATE '2005-04-23' - DATE '2004-04-24') YEAR FROM information_schema.ext_onerow;

will serve. In previous versions the result would be one year but this is now corrected in that the query will return the result zero years.

UPDATE WHERE CURRENT and Primary Key Duplicates (V9.2.4) An UPDATE WHERE CURRENT that updates the primary key was previously allowing the updated record to replace an existing record with the new primary key value. The corrected behavior is to return a primary key duplicate error.

Compound SQL Statements and Large Objects (V9.2.4) It is now allowed to use LOB columns in compound SQL.

Example:

DELETE FROM lobtab WHERE c1 = 2; INSERT INTO lobtab VALUES (99,?); Mimer SQL 81 Features and Functionality History

LOB Values Incorrectly Returned as NULL (V9.2.3B) There has been a problem where some inserted BLOB, CLOB or NCLOB values are treated and returned as NULL values by the database server. The problem can occur on systems where the database server has been started and stopped many times. This problem is now corrected and values that previously were returned incorrectly as NULL will now be returned correctly.

LIKE Predicate in Functions or Procedures (V9.2.2H) A problem has been corrected regarding use of the LIKE predicate in functions or procedures. The problem could cause a “Compiled LIKE pattern corrupt” error message or possibly terminate the database server. The problem would only occur when several users access a function or procedure where the character pattern in the LIKE predicate is specified using a variable.

CAST From Timestamp to Time (V9.2.2G) Using the following code: DECLARE ftime TIMESTAMP; DECLARE ntime TIME;

SET ftime = LOCALTIMESTAMP; SET ntime = CAST(ftime AS TIME);

in a PSM routine caused an unjustified internal error. This has now been corrected.

Defining Foreign Keys With On Delete (V9.2.2G) When defining a foreign key constraint with an ON DELETE action where the added length of the column names used in the constraint exceeded approximately 150 characters, the statement would fail or make it impossible to access the table at a later stage. This has now been corrected.

Numeric Collations (V9.2.2G) The [numeric on] option did not always work correctly in a collation, that contained a contraction. Swedish Å, Ä, and Ö are examples of contractions. A + digits and O + digits did not always sort as expected. This is now corrected.

MAX/MIN on Variable Length Columns (V9.2.2E) MAX and MIN did in some cases have problem with the length of variable length data types. This is now corrected. 82 Corrected Features and Functions Mimer SQL Structured Query Language

MAX/MIN on NCHAR Column Included in Index (V9.2.2E) Using the MAX or MIN functions on a column of NCHAR or NVARCHAR type, where the column is included in any type of index (primary key, unique constraint, etc.), raised the internal error “Invalid OPCODE”. This problem is now corrected.

Varchar Function in SELECT (V9.2.2E) If a function returning variable length data (VARCHAR, VARBINARY or NVARCHAR) was invoked from a SELECT, UPDATE or DELETE statement, the length value was not handled correctly. This problem is now corrected.

UPDATE With LOCALTIMESTAMP and NULL (V9.2.2E) Depending on the column order, an UPDATE with both LOCALTIMESTAMP and NULL could in some cases raise an “constraint violation” error. This has now been corrected.

Error When Updating Foreign Keys (V9.2.2E) There has been a problem where an update of a table could stop the database server if the table references or is referenced by a table that is inaccessible. This problem is now corrected.

Multiple Column Indexes (V9.2.2E) There has been a problem in previous 9.2 versions where an update of a table with an multiple column index could result in an “Internal inconsistency” error. This problem is now corrected.

UPDATE With Subquery (V9.2.2E) A problem with UPDATE, containing a correlated scalar subquery in a SET clause, has been corrected.

Temporary Storage Areas in PSM (V9.2.2E) PSM has some problems with handling of temporary storage areas used for intermediate results when evaluating complex expressions. This can cause the inappropriate error “Length error or incorrect value found during data type conversion”. This has now been corrected.

Case Statement in Continue Handler (V9.2.2E) Using case statements within a exception handler could cause the server to crash. This has now been corrected. Mimer SQL 83 Features and Functionality History

Multi Statement SQL With Triggers (V9.2.2E) Using a multi statement, e.g. DELETE FROM orders; INSERT INTO orders SELECT * FROM ind;

when there are triggers defined on the IND table could cause unpredictable behavior. This has now been corrected.

Missing Cascade Effects (V9.2.2E) The cascade effects of DROP SCHEMA/DROP TABLE did not drop all multiple triggers with references to the dropped table. This has now been corrected.

Scrollable Cursor and WCHAR Host Variables (V9.2.2D) A scrollable cursor for a SELECT statement with host variables for input values (in the WHERE clause), where those variables were used to provide variable length data, raised the error “Negative overflow for VARCHAR length”. This has now been corrected.

LEFT JOIN and Descending Index (V9.2.2D) LEFT JOIN in combination with a descending index read data from the index table instead of the base table. As a result of this, random data was returned. This has now been corrected.

Declare Cursor WHERE CURRENT Mismatch in PSM (V9.2.2C) In some cases when declaring a cursor with a subselect and then using that cursor in an UPDATE WHERE CURRENT could erroneously cause the error the table used in update where current is not the same as in the cursor declaration. This has now been corrected.

Invalid Argument Allowed for ASCII_CODE in PSM (V9.2.2C) When using the function ASCII_CODE in PSM it accepted nchar data as argument (with an invalid result). Such an attempt will now cause a semantical error saying that only character data can be used as arguments to the ASCII_CODE function. To get the code point for nchar data, the UNICODE_CODE function should be used.

Table Lookup Problem in PSM (V9.2.2C) Using a statement such as INSERT INTO t1(c1,c2) SELECT * FROM v1

in PSM where v1 is not updatable and v1 contains a column named c1 or c2 causes the unexpected error -12202 (i.e. Table V1 does not exist.) This will no longer happen. 84 Corrected Features and Functions Mimer SQL Structured Query Language

Type Resolution Problem for COALESCE in PSM (V9.2.2C) Using COALESCE(data,'') combined with concatenation in PSM could cause unpredictable behavior. This has now been corrected.

Date Arithmetic Problem in PSM (V9.2.2C) The construction (dateExpression1 - dateExpression2) intervalQualifier

could cause unpredictable behavior when used in PSM. This has now been corrected.

On-line Backup (V9.2.1F) A problem with collations and on-line backups have been corrected. The problem could sometimes prevent tables with collations to be accessed after an on-line backup.

Integrity Constraints and Triggers (V9.2.1C) A table having both triggers and either FOREIGN KEY or UNIQUE constraints could previously allow updates that violated the integrity constraint. This problem is now corrected.

Remaining Triggers (V9.2.1C) Due to a error in the implementation for DROP TABLE, triggers referencing the dropped table could be left in data dictionary or the DROP TABLE statement would cause an unwarranted error. This happened if there were more than one trigger referencing the table being dropped. This problem is now corrected.

Incorrect SQLSTATE in PSM (V9.2.1C) After a SELECT INTO in PSM, the SQLSTATE was erroneously set to 02000 (instead of the correct 00000) when a row was found. This is now corrected.

CASE Statement in Scope of Continue Handler (V9.2.1C) In some circumstances the presence of a continue handler and a CASE statement in a compound statement in PSM could cause unpredictable behavior. This is now corrected. Mimer SQL 85 Features and Functionality History

Dropping VARYING Length Column Using ALTER TABLE (V9.2.1B) An ALTER TABLE dropping a column could previously produce an inconsistent or corrupt table. The problem would only occur if the dropped column have a VARYING length data type and is followed by a NATIONAL CHARACTER VARYING column. This problem is now corrected.

Scalar String Functions and Parameter Markers (V9.2.1) When parameter markers were used for one or several arguments to a scalar string function, there were problems mixing arguments of the character data types with arguments of the national character data types. This is now corrected.

SUM Combined With GROUP (V9.2.1) The result of a complex GROUP BY statement could previously return an incorrect result. The error did only occur for statements including a join with a table having a multi- column index. The result of a SUM combined with a GROUP yields different results depending on which columns that are included in the select list. This is now corrected.

UPPER/LOWER and the German Character ß (V9.2.1) The German character ß was not translated by the UPPER and LOWER functions in version 9.1 of Mimer SQL. In version 9.2, ß is treated as ’ss’ and correctly translated.

Dropping Idents (V8.2.4) When an ident was dropped while one or more objects created by that ident were in use then some of those objects might remain in the data dictionary. This made it impossible to recreate those objects. This has now been corrected.

Domains, Check Clauses and UPDATE STATISTICS (V8.2.4) A domain with a check clause contained in a schema definition could not be used after an UPDATE STATISTICS statement. The following sequence of statements: create schema s create domain d int check(value <>0); create table t(c1 s.d); update statistics; insert into t values(1);

would cause the following error: Mimer/DB error -12504 Statement not allowed within transaction

The only way to avoid this was to drop the domain. This has been corrected. 86 Corrected Features and Functions Mimer SQL Structured Query Language

Function SUBSTRING in PSMs (V8.2.4) Use of the function substring in a PSM statement with an expression used as length yields an incorrect result. In some cases, some extra space characters were added to the result. This has now been corrected.

LEAVE LABEL and Atomic Compound Statement (V8.2.4) Use of a leave label statement in an atomic compound statement caused an implicit rollback statement. This has now been corrected.

Qualified Function Reference in Set Statement (V8.2.4) Use of a qualified function reference with a parameter marker in a set statement caused an internal inconsistency error. This has now been corrected.

PSM Routines and Triggers (V8.2.4) In some cases, when creating PSM routines or triggers, not all dependencies were stored. This meant that the DROP with CASCADE option did not remove all depending objects. This has now been corrected.

Updating Using Next Value of Sequence (V8.2.4) Using the next_value of sequence_name function in an update statement could cause data corruption or error messages such as ‘The rowid column can not be updated’. This has now been corrected

ALTER TABLE and Constraints (V8.2.4) In earlier versions of Mimer SQL 8.2, there was a problem when adding a foreign key or unique constraint using ALTER TABLE. This problem is now corrected. Two rows with the same unique key value will now be allowed if at least one of the column values in the unique key is null. Rows with NULL column values in foreign keys will no longer have to reference a valid key. In earlier versions of Mimer SQL 8.2, there was also a problem dropping a column that participated in a primary key constraint. The statement failed with an invalid record length error. This has now been corrected.

Columns and the WITH GRANT OPTION (V8.2.1) It is now permissible to use the WITH GRANT OPTION with the statement GRANT UPDATE with specific columns

Longer Character-string Literals (V8.2.1) The maximum length of a character-string literal is now increased to 15 000 characters. Mimer SQL 87 Features and Functionality History

Using DISTINCT in Views (V8.2.1) Previously a view defined using a SELECT DISTINCT statement could return incorrect result sets. This has now been corrected.

ALTER TABLE and Dropping Columns (V8.2.1) When dropping a column from a table, only views that actually use the dropped column will be dropped as a cascade effect. Previously, all views that used any column in the altered table would be dropped. This also applies to check constraints. It is now possible to drop a column that is part of the primary key. The primary key constraint will be dropped as well.

Value of USER in Stored Procedure (V8.2.1) During the execution of a stored procedure, the value of CURRENT_USER incorrectly was the same as SESSION_USER. It is now corrected so it is the name of the ident that created the procedure.

Support for GET DIAGNOSTICS (V8.2.1) The following fields in the get diagnostics statements are now supported: TRIGGER_CATALOG, TRIGGER_SCHEMA, TRIGGER_NAME, ROUTINE_CATALOG, ROUTINE_SCHEMA,ROUTINE_NAME, CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME,CATALOG_NAME, SCHEMA_NAME, TABLE_NAME, COLUMN_NAME, NATIVE_ERROR

View with Subquery and Check Option (V8.2.1) A view containing a subquery may now be specified with a WITH CHECK OPTION clause.

ABS Function for Interval (V8.2.1) The function ABS now accepts an interval expression as a parameter.

Non-deterministic Check Constraint (V8.2.1) A check constraint may not contain any reference to a possible non-deterministic expression, such as datetime value function and functions that are declared as not deterministic. This was previously not checked.

Grant on Added Columns (V8.2.1) If a user has been granted a privilege on a table, he will get this privilege on any column that is added to the table.

Deallocating Statements in a Transaction (V8.2.1) The server would previously hold all deallocated statements until the user's transaction was committed. This could require large amounts of SQLPOOL memory in large transactions, if many SQL statements were prepared and deallocated over and over again. The server no longer keeps more than a few deallocated statements. 88 Corrected Features and Functions Mimer ESQL Embedded SQL

Logical Expressions in PSM (V8.2.1) Logical expressions such as if not p or not q then were not evaluated properly in a procedural context. This is corrected.

Loss of Significance PSM (V8.2.1) In some cases with complex arithmetical expression using float data types, the error loss of significance would occur. This has now been corrected.

Scrollable Cursor and Union (V8.2.1) It is now possible to use a scrollable cursor for a statement that contains a union operator.

Like Patterns in PSM (V8.2.1) Procedures that used more than one like predicate (in PSM control statements) could crash the server. This has now been corrected.

Unique Constraints (V8.2.1) If two users tried to insert the same value simultaneously in a column with a unique constraint this would not cause any constraint violation. This has now been corrected.

Time Problems (V7.3.x) Certain time values (less than 10:00:00 that had been inserted using current_time) were not found when using an equal comparison. This problem has now been corrected.

Mimer ESQL Embedded SQL

WHERE CURRENT Internal Error (V9.3.7F) Whenever an application attempted to perform an UPDATE WHERE CURRENT or DELETE WHERE CURRENT on the last row of a result set, and the size of the result set equalled a multiple of the used fetch size plus one, a -19068 (“no matching record”) was returned from the server. The fetch size is the number of rows fetched from the server in each server call. Unless the application has specified a fetch size using the SET SESSION FETCH SIZE construct, the fetch size depends on the actual size of each row in the result set. For example, if the fetch size happens to be 10 rows, this error would occur when performing an UPDATE WHERE CURRENT or DELETE WHERE CURRENT on the last row of result sets whose total sizes equals 11, 21, 31, 41 rows etc. The problem appeared in v9.1.4. Mimer SQL 89 Features and Functionality History

Commits in Procedures Not Closing Cursors (V9.3.7) Embedded SQL clients did not close cursors correctly when a called procedure committed or rollbacked a transaction. The client did still believe, after the procedure call, that cursors were still open, and the client kept fetching from locally cached data, until a request for more data from the server found that the cursor had been closed. From version 9.3.7, this is corrected, and the client will know immediately that a cursor has been closed.

Fetching Using a Reopened Scrollable Cursor (V9.3.7) If a scrollable cursor was reopened and the first fetch returned an error or a row not found exception, the next fetch may produce the “kernel error -16183 in function DKFET1 Bad parameter, value = 100” on mimer.log, and the “internal error -16269 in DYNAMIC FETCH Unexpected duplicate row found in temporary table” is returned to the application. This is now corrected.

External Character Set Support (V9.3.5) The handling of the single byte character data types has been completely revised in this version. The system now follows the current locale setting on the machine to determine what characters are stored/retrieved when an embedded SQL application passes single- byte character strings to the Mimer client. This change in character set handling sorts out a number of problems that were present in previous versions of Mimer. Some applications may be dependent on the old incorrect handling. It is strongly recommended that these issues are dealt with in the applications to ensure correct data in the database and application, and also compatibility between platforms using different character sets. See the section External Character Set Support, in Chapter 4, Embedded SQL in SQL Programmer’s Manual for a detailed description.

Scrollable Cursor (V9.2.5) If a scrollable cursor wasn’t used directly after OPEN, so instead of a FETCH, another operation was performed, the exception “Invalid descriptor encountered on server” sometimes was raised. This is now corrected.

Setting Binary Descriptors With Character Data (V9.2.2E) When setting a binary type descriptor with a null-terminated character data type using SET DESCRIPTOR, the string length was erroneously calculated from the maximum field length rather than looking for the terminating null character. In most cases, the user would experience a -14312 “Input character string too long” error. This problem was related to the client component and is corrected in version 9.2.2E. 90 Corrected Features and Functions Mimer ODBC – Open Database Connectivity

Too Many Host Variables (V9.2.2D) Using a huge number of host variables in one single SQL statement did not work correctly in previous versions. This problem is now corrected.

Mimer ODBC – Open Database Connectivity

Malformed Cancel Requests (V9.3.8B) A cancel request issued by a ODBC client connected to a database server with a byte ordering different from the client would cause the server to drop the connection. In the Mimer log an “Illegal reentrant request on channel” message would be produced. E.g. if this problem occurs when a Mimer ODBC client on Windows is connected to a Mimer SQL server running on Solaris or AIX, the Mimer Windows client needs to be updated. This problem has been fixed in Mimer clients from version 9.3.8B and later.

SQL_DESC_LENGTH for Binary Columns (V9.3.8B) The Mimer ODBC driver returned the wrong SQL_DESC_LENGTH value for BINARY and BINARY VARYING columns. In all cases, the returned value was the correct length times two. The correct behavior is to return the length in bytes for binary columns. The problem appeared in 8.2.1.

SQL_ATTR_PARAM_OPERATION_PTR Array (V9.3.7) The array pointed to by the statement attribute SQL_ATTR_PARAM_OPERATION_PTR was incorrectly treated by the driver as a 32- bit integer array, while the correct behavior is to treat this array as a 16-bit integer array.

SQL_ATTR_PARAM_STATUS_PTR Array Not Filled Properly (V9.3.7) The array items pointed to by the statement attribute SQL_ATTR_PARAM_STATUS_PTR was not set properly after execute. Each array item, corresponding to each row in a parameter set (array of parameters) is now set to SQL_PARAM_SUCCESS, SQL_PARAM_ERROR or SQL_PARAM_UNUSED depending on the outcome of the array operation. Also, if parameter rows are set to be ignored using the SQL_PARAM_IGNORE parameter operation attribute (see the statement attribute SQL_ATTR_PARAM_OPERATION_PTR), the corresponding parameter status is now being set to SQL_PARAM_UNUSED, to indicate that this particular parameter row was not used. Mimer SQL 91 Features and Functionality History

External Character Set Support (V9.3.5) The handling of the data type SQL_C_CHAR has been completely revised in this version. The system now follows the current locale setting on the machine to determine what characters are stored/retrieved when an application passes single-byte character strings to ODBC. This change in character set handling sorts out a number of problems that were present in previous versions of Mimer. Some applications may be dependent on the old incorrect handling. It is strongly recommended that these issues are dealt with in the applications to ensure correct data in the database and application, and also compatibility between platforms using different character sets. See the ODBC chapter in SQL Programmer’s Manual for a detailed description.

Access Violation When Too Many Handles (V9.3.5) ODBC clients could experience an access violation during deallocation of handles when executing on Linux, OpenVMS, AIX, Mac OS X or Solaris and had a number of environment or connection handles open simultaneously. The problem appeared in Mimer ODBC clients v9.2.1 and was fixed in v9.3.5.

SQLNativeSql With Truncated Destination Strings (V9.3.5) Supplying a too short OutStatementText in calls to SQLNativeSql could destroy the stack causing an access violation within the Driver Manager. If a truncation occurred, the driver wrote too much of the converted SQL string to the intermediate buffer located in the Driver Manager. The problem appeared in v9.1.3 and was corrected in v9.3.5.

Conversion of Character Data to SQL_C_DOUBLE (V9.3.5) When a CHAR, VARCHAR, NCHAR or NVARCHAR string was used to hold a floating point number, with a larger exponent than 255 or smaller than -255, an incorrect value was returned in the SQL_C_DOUBLE. This problem appeared in v9.3.1 and is corrected in v9.3.5.

Truncating a Datetime or Interval (V9.3.5) When DATE, TIME, TIMESTAMP, or an INTERVAL with fractional seconds components was converted to a SQL_C_CHAR, or SQL_C_WCHAR and truncating only the decimal point, the call to SQLFetch, SQLFetchScroll or SQLGetData returned SQL_ERROR instead of the correct SQL_SUCCESS_WITH_INFO. This error appeared in v9.3.1 and is corrected in v9.3.5.

Default Conversion for the SQL BIGINT Data Type Unavailable (V9.2.4) The SQL data type BIGINT could not be fetched using the default C data type SQL_C_DEFAULT. Mimer ODBC clients prior to 9.2.4 encountered the error -109 “Invalid C data type” on such attempts. Fetching BIGINT columns using the SQL_C_DEFAULT data type will now correctly place the data in a 64 bit integer. In C this would correspond to a long long int or unsigned long long int. 92 Corrected Features and Functions Mimer ODBC – Open Database Connectivity

Unknown Request Code in Network Package when Closing Cursors Against a Mimer 8.2.6 Server. (V9.2.3) Applications opening cursors on a Mimer v8.2.6 server could experience the Mimer error -18551 error when closing the cursor (a call to SQLFreeStmt or SQLCloseCursor). The error text is “Unknown request code in network package”. This error could also be seen when the ODBC driver decided to close the cursor for some other reason than the application calling these functions. The consequence of this problem is that cursors remain open on the 8.2.6 server until the client disconnects. This problem is corrected in v9.2.3 clients.

Conversion From Wide Character Parameter (V9.2.2G) There has been a problem with conversions from SQL_C_WCHAR parameters to numeric data types. The problem can cause an “Invalid numeric value” error if the character string has several leading blanks. Note that the problem could occur when using Mimer SQL with external tools such as Microsoft Access. This problem is now corrected.

ODBC Stand-alone Installation (V9.2.2E) There has been a problem with Mimer ODBC stand-alone installations in previous versions of 9.2. The installed Mimer ODBC driver could erroneously require the server to have a beta test licence. Note that the ordinary Mimer Installations are not based on ODBC stand-alone installation (see Mimer Packaging Guide for further information about ODBC stand- alone installation). This problem is now corrected.

Disconnect Failure (V9.2.2E) There has been a problem where SQLDisconnect fails with an “invalid transaction state” error. The problem occurred when SQLDisconnect is preceded by a failing data definition statement and the connection attribute SQL_ATTR_AUTOCOMMIT is set to SQL_AUTOCOMMIT_OFF. This problem is now corrected.

Statement Increasing in Size Problem (V9.2.1C) SQL statements supplied to SQLPrepare or SQLExecDirect when the statement attribute SQL_ATTR_NOSCAN is set to SQL_NOSCAN_OFF and whose length is less than 400 characters, but as a result of the escape clause processing grows to a size larger than 400 characters may return a -16183 (bad parameter) error. This problem was introduced with the version 9.2.1 server and is corrected in version 9.2.1C and later. Mimer SQL 93 Features and Functionality History

Support of SQL_ATTR_FETCH_BOOKMARK_PTR (V9.2.1B) In earlier versions the attribute SQL_ATTR_FETCH_BOOKMARK_PTR was not supported by Mimer ODBC. Mimer ODBC does not currently support bookmarks at all, and any attempt to enable them returns an error. Nevertheless, from v9.2.1b onwards, the bookmark attribute SQL_ATTR_FETCH_BOOKMARK_PTR is itself supported, but the driver will not do anything useful with this. Also, when an application tries to enable bookmarks using SQLSetStmtAttr(..., SQL_USE_BOOKMARKS,...), earlier versions of the Mimer ODBC driver returned HY009 (invalid option value), rather than the more correct HYC00 (option value not supported). This is now corrected.

Incorrect Capability Information for Forward Only Cursors (V9.2.1B) Earlier versions of Mimer ODBC incorrectly reported that forward only cursor could do absolute and relative cursor positioning. This was incorrect. Forward only cursors can only move forward one row at a time in a result set. This problem applies only to applications coded and compiled according to the ODBC 3.0 specification.

Transaction That Lives On in Autocommit Mode When a BLOB, CLOB or NCLOB Operation Fails (V9.2.1) When in auto commit mode a BLOB, CLOB or NCLOB operation fails in some way (such as a truncation error) after the transaction was started, the transaction lived on causing problems such as “xxx cannot be dropped because it is in use”. This could also lead to that server resources in time become exhausted. The problem is now corrected when connecting to v9.1.3 servers or later.

Transaction That Lives On in Autocommit Mode When a Forward Only Cursor is Limited by the SQL_ATTR_MAX_ROWS Attribute (V9.2.1) When a forward only cursor was limited in size by the SQL_ATTR_MAX_ROWS attribute, the ODBC driver now closes the cursor immediately when the last row was read. Previously, the cursor was kept open until the statement was explicitly dropped. This led to unnecessary server resource use. The problem applied to 8.2 servers or later, and the problem is now corrected against all server versions.

Auto-Commit of Read-Only Cursors (V9.2.1) There has been a problem with server transaction resources associated with auto- committed read-only cursors. Previously, these resources could remain allocated after close cursor, until the cursor was opened again or the statement handle was freed. It could have a negative effect on server performance when such transaction resources remained allocated for a very long time. This problem is now corrected. 94 Corrected Features and Functions Mimer ODBC – Open Database Connectivity

MFC and Mimer ODBC Include Files (V9.1.3) When using Microsoft Foundation Classes (MFC) and the Mimer ODBC include file MINODBC.H compilation errors occurred. This was due to the fact that MFC defined certain symbols which interfered with the proper compilation of MINODBC.H. This has now been corrected.

MINODBC.H and MFC (V9.1.3) MINODBC.H included conditional checks for definitions of __SQLEXT and __SQLUCODE. MFC based applications include header files that explicitly #define __SQL and __SQLEXT and this excluded large parts of the contents of MINODBC.H. These checks have now been removed.

SQLColAttributes driver specific attributes (V8.2.4D) The Mimer ODBC driver returned an -119 (unknown internal data type, SQLSTATE S1000) error when the application called SQLColAttributes in ODBC 2.5 mode with a driver specific attribute. It now returns -151 (driver not capable, SQLSTATE S1C00) since applications may rely on that error code to determine if the attribute was supported or not.

SQL_DESC_NAME and SQL_DESC_LABEL Regarded as Equal (V8.2.4) Formerly, the descriptor attributes SQL_DESC_LABEL and SQL_DESC_NAME were always available to determine the column name and column labels of a statement. For example, a SELECT A AS B FROM C involves a column A and a label B. From an SQL standards point of view, a label may be used to replace a name of a column for use within the query. To comply with the SQL standard on this matter, the ODBC driver will now always regard SQL_DESC_NAME and SQL_DESC_LABEL as equal. If a label is not specified, both will contain the name of the column. If a label is specified, both will contain the name of the label.

Problem with V8.2.1– 8.2.3 Clients (V8.2.4) If the application called SQLGetData several times to get data into any other C-type than SQL_C_CHAR or SQL_C_BINARY, then the second call onward erroneously returned SQL_NO_DATA_FOUND. Now, it returns SQL_SUCCESS with the correct data. This was primarily a problem with version 8.2.1-8.2.3 clients. Earlier clients did not support getting columns in arbitrary order, only strictly ascending. Mimer SQL 95 Features and Functionality History

Arrayed Procedure Calls in Auto-commit Mode (V8.2.4) A problem with arrayed procedure calls in auto-commit mode has been corrected. Previously, when an arrayed procedure call terminated in an error, and auto-commit mode was on, the transaction was left in an active state. The transaction would normally terminate with the next statement, or SQLEndTran call.

Time and Timestamp Column Truncation (V8.2.1) When converting TIME and TIMESTAMP columns with decimals to character (SQL_C_CHAR) and the output is truncated, the terminating null byte is now handled properly. Furthermore, the length returned is the actual length and not the truncated length.

Auto-commit Behavior (V8.2.1) When Mimer ODBC is in auto-commit mode, each statement is executed as a separate transaction. When using a select cursor, however, the transaction is not committed until the cursor is closed. It is thus possible for a single client to have several active transactions in the server. This allows Mimer SQL to behave exactly as expected by an ODBC application. Please note that a server of version 8.2 or later must be used! The exact behavior with older server versions is described in the Mimer SQL 8.1 release notes.

REMARKS Column in Result Sets (V8.2.1) The REMARKS column, found in result sets returned by SQLTables and SQLColumns, now returns comments created with COMMENT ON.

Truncation of Date/Time Values (V8.2.1) SQL_ERROR is now returned if significant parts of a date/time value are truncated when converting to a character data type.

Fetching Rowsets (V8.2.1) SQLExtendedFetch now returns SQL_ERROR only when all rows in the returned rowset failed. If one or more rows are returned successfully, this routine returns SQL_SUCCESS_WITH_INFO. When all rows are returned successfully, these routines return SQL_SUCCESS. This information applies to SQLFetch and the new ODBC 3.0 function SQLFetchScroll. Note: SQLExtendedFetch is deprecated in ODBC 3.0. The Driver Manager will map SQLExtendedFetch calls to SQLFetchScroll.

Interval Data Types (V8.2.1) SQLColumns, SQLGetTypeInfo and SQLProcedureColumns now return correct values for all interval data types. 96 Corrected Features and Functions Mimer BSQL

SQLForeignKeys (V8.2.1) SQLForeignKeys will now correctly return information about all foreign keys. Previously, SQLForeignKeys would only return information about tables created by the current_user unless a PKTableOwner or FKTableOwner was explicitly specified.

CALL with Qualified Procedure Names (V8.2.1) The ODBC escape clause for CALL now supports qualified procedure names.

SQLColAttribute and Intervals (V8.2.1) SQLColAttributes will now set SQL_DESC_PRECISION and SQL_DESC_DATETIME_INTERVAL_PRECISION to default-values when SQL_DESC_TYPE is set to SQL_INTERVAL and SQL_DESC_INTERVAL_CODE is given a valid value.

Commit Affects Executed But Not Fetched Cursors (V8.2.1) Up until version 8.1 commit and rollbacks closed those cursors that no rows have been fetched from. This required an application to execute those statements again. This is no longer the case, commit and rollbacks affect only those cursors that the application has fetched at least one row from.

SQLMoreResults Causes a Premature Autocommit (V8.2.1) An SQLMoreResults which returned SQL_NO_DATA and was immediately followed by SQLFreeStmt(…, SQL_CLOSE) no longer causes a premature autocommit.

TINYINT not Supported by CONVERT (V8.2.1) The SQL_TINYINT data type is now supported by the scalar function CONVERT.

Mimer BSQL

Duplicated Output in Readlog (V9.3.8B) When listing operations done on a table, some data could in rare cases be written twice to the log file. This is now corrected.

Altered Tables in Readlog (V9.3.8B) If a table had been altered, readlog did not display operations on this table. This is now corrected.

Incorrect Privilege Description (V9.3.8B) When using the DESCRIBE TABLE command in BSQL, privileges granted on the table was not shown correctly. This is now corrected. Mimer SQL 97 Features and Functionality History

Tables Not Found in Readlog (V9.3.8) When using the readlog utility after an ENTER statement in BSQL, the procedure for verifying that the current user has some privilege on a table did not function properly. E.g. it claimed erroneously that tables did not exist. This problem is now corrected.

Operations Not Shown in Readlog (V9.3.8) When using the Readlog utility operations on some tables was not shown. This could happen for tables that have been altered or if the option for showing operation for specific tables was used repeatedly. This problem is now corrected.

Describe View Problem (V9.2.5) When describing a view in BSQL with a definition length > 400 characters the definition would not be displayed. This has now been corrected.

Read Input (V9.2.5) Starting BSQL with a query such as bsql - q "read 'file'"

where file contains a read input command would cause BSQL to crash. This have now been corrected.

Describe Result in Wrong Order (V9.2.2E) When describing a routine whose definition exceeds 800 character, the source definition would sometimes be mixed up. This has now been corrected.

Using in Load Statement (V9.2.2E) The use of white-space characters (, , ) in a LOAD/UNLOAD statement caused unwarranted syntax errors. This has now been corrected.

Failed Procedure Calls With Input Followed by Output Parameters (V9.2.1) When BSQL was used to call a procedure having input parameters before the output parameters in the parameter list, BSQL returned errors such as -10310 “invalid character value for cast” or -10203 “negative overflow occurred during data type conversion”. Only 9.1 BSQL versions are affected by this problem. Earlier versions worked well. 98 Corrected Features and Functions DbVisualizer

String Literal Usage (V9.2.1) When reading input containing character literals spanning multiple lines without a terminating apostrophe, it will not be a valid literal. If you wish to have a literal that spans multiple lines, you should use the string concatenation operator, e.g. INSERT INTO music_title VALUES(4711, 'The long and winding ' || 'character literal that spans ' || 'multiple lines')

Describe Functions – New Client/Old Server (V9.1.2) Previously, in some describe functions, there was a problem using a version 9.1 BSQL client against a version 8.2 database server. This is now corrected.

Describe Table (V8.2.1) The describe table command now returns information about tables that use the described table as a foreign key.

Log Files (V8.2.1) Using several log file commands during a session did not work correctly in so far as nothing was logged except in the first file. This has now been corrected.

Transactions and Connections (V8.2.1) Using several connections in BSQL and switching between these with active transactions caused BSQL to lose the ability to determine whether a transaction should be autocommitted or not. This has now been corrected.

DbVisualizer

Overloaded Function and Procedure Names (V9.3.7E) The commands for functions and procedures in DbVisualizer did not handle parameter overloading correctly when using a server with version 9.3. The commands are now changed to use specific names for procedures and functions. At the same time the views for Functions facts and Execute permissions are updated to display correct information. Previously, in some describe functions, there was a problem using a version 9.1 BSQL client against a version 8.2 database server. This is now corrected.

Mimer Utilities

Interrupted Display of Users List (miminfo –u) (V9.3.8B) There has been a problem that caused the miminfo program to interrupt the display of current users with a ”circular list” error message. This problem is now corrected. Mimer SQL 99 Features and Functionality History

MIMLOAD and Stopping Server (V9.3.8) There has been a problem which could cause loaded data from a completed MIMLOAD to disappear if the database server crashes afterwards. This problem has now been corrected.

DBC Long File Names (V9.3.7F) The databank check utility, DBC did not handle command line parameter output file names longer than 80 characters properly. The user may experience this, depending on platform, either as characters beyond the 80th are replaced by junk characters or that a exception is raised. Problem appeared in v8.2.1 and was corrected in v9.3.7F.

REPSERVER Missing Transactions (V9.3.7) REPSERVER could in some cases miss parallel transactions where short transactions start and commit within the scope of long transactions.

Upgrading From V9.3.5 Replication When upgrading a v9.3.5 system using replication, a few manual steps have to be done before starting the v9.3.7 replication. These are described here: • Before upgrading to V937 When still using v9.3.5, the table REPADM.REP_LOG and all source log tables (schema.REP_TABLE_name) must be emptied. Running repserver with the exit option (-e) on all subscriptions should empty all log tables. You can verify that the log tables are empty by doing a SELECT COUNT(*) FROM REP_LOG as user REPADM. • After the upgrade to V937 Log in as REPADM using BSQL and run the following statements: CREATE TABLE REP_LOG_PROCESSED ( SUBSCRIPTION_NAME VARCHAR(128), SYSTEM_STARTUP TIMESTAMP(2), TRANSNO INTEGER, PRIMARY KEY (SUBSCRIPTION_NAME, SYSTEM_STARTUP, TRANSNO) ) IN REPDB; GRANT ALL ON REP_LOG_PROCESSED TO REP_SOURCE_USER;

You can now start REPSERVER.

MIMSYNC Multi-column Primary Key Problem (V9.3.7) MIMSYNC did not work correctly in some cases when there were more than one column in the primary key of a table. This has been corrected.

MIMSYNC Comparison Problem (V9.3.7) MIMSYNC did not work correctly when primary key columns differed in the right-most parts of the column and a binary compare was done. This has been corrected. 100 Corrected Features and Functions Mimer Utilities

MIMLOAD Error Message Problem (V9.2.5) The Windows release of Mimer SQL v9.2.4C had an error in MIMLOAD, which meant error messages produced from MIMLOAD were not printed correctly. This has been corrected.

DBC Giving Errors for SQLDB After Crash (V9.2.4) A control of the SQLDB databank after a server crash may signal errors. SQLDB, which is considered as a work databank always indicates “properly closed”, which lead to the DBC program earlier was doing a bitmap control.

Comments Causing Misplaced Breakpoints (V9.2.2E) When trying to use the PSM debugger on a routine containing comments the icons indicating possible breakpoints were not set correctly. This problem also affected the STEP functionality and display of variable values.This has now been corrected.

DBC Program Not Fulfilling Databank Control (V9.2.2E) If the databank has more than one rootpage (happens when there are many tables) and the last table entry stored in a rootpage holds an empty table, the DBC program misses to verify tables in the rootpage following. This is now corrected.

MIMLOAD and Views Using Sequences (V9.2.2E) MIMLOAD did not include any sequence usage (NEXT_VALUE or CURRENT_VALUE) in the view definititions. This problem is now corrected.

MIMLOAD and LOB Data (V9.1.3) MIMLOAD can now load and unload LOBs correctly.

Mimer UTIL

Importing Files (V8.2.3) In versions earlier than 8.2.3, it was not possible to import files that had been exported by using version 8.1. This problem has now been corrected.

Upgrading

Default NULL (V9.2.2) At upgrade of databases from version 8.1 or earlier, default values explicitly specified as NULL were not handled correctly. Caused error message “Undefined value found during data type conversion” at describe table. This is now corrected. Mimer SQL 101 Features and Functionality History

Invalid Record Length for Index Tables with Character Varying Columns (V9.1.3) An error concerning recreation of ’index tables’ holding columns with data type VARCHAR has been detected in the upgrade program. If a VARCHAR column is defined as other than the first column participating in the “index table” (INDEX, UNIQUE or FOREIGN KEY) or in the primary key clause, the record length stored in dictionary is not calculated correctly. The error message “Table xxx has invalid record length” is encountered when the base table is to be opened. The error in the upgrade program is now corrected. If you have an old upgrade program and receive this error message a workaround afterwards is to use DROP INDEX and CREATE INDEX for an ordinary index. If it is a constraint of type unique or foreign key use ALTER TABLE DROP CONSTRAINT and ALTER TABLE ADD CONSTRAINT.

CREATE TABLE and Check Clauses (V8.2.4) Some problems detected when upgrading databases from earlier versions have been corrected in version 8.2.4. Previously, if there were several check clauses using the same column name in a CREATE TABLE statement, the upgrade program stopped. Previously, if an old CREATE TABLE statement had both check clauses and foreign key references, the upgrade program succeeded. However, after upgrading, when working with such a table, the following error was reported: Name XXX in check clause not recognized as a column name of current table definition. This is now corrected.

Database Inconsistencies (V8.2.4) If the old database had inconsistencies (parts of objects not dropped) due to earlier bugs when dropping objects the upgrade program stopped. This has now been corrected and the upgrade program now proceeds and ignores such parts.

Missing Column Privileges (V8.2.4) Old grants of privileges (update or references) to specified columns could be missing after upgrading. This is now corrected.

Unrecognized Keywords from V 7 (V8.2.3) When upgrading from Mimer SQL version 7, the upgrade would fail if one of the keywords listed below was used as a name in some create statements. This problem has now been corrected. The CREATE statements that were affected were: CREATE TABLE with a check clause, CREATE DOMAIN with a check clause, and CREATE VIEW. ALLOCATE ALTER BEGIN CALL CLOSE COMMIT CONNECT CREATE CURSOR DEALLOCATE DECLARE DESCRIBE DISCONNECT DO DROP ELSEIF EXECUTE FETCH GET GRANT IF INNER INOUT INTERVAL JOIN LEAVE LEFT LOOP MODULE ON OPEN OUT OUTER PREPARE PROCEDURE REPEAT RESIGNAL RETURN REVOKE RIGHT ROLLBACK SIGNAL SQLEXCEPTION SQLSTATE SQLWARNING START TO UNTIL USING WHILE 102 Corrected Features and Functions VMS Specific Features

VMS Specific Features

Login Delay Problem (V9.3.7) Under heavy load, a central VMS lock used for managing connections could be left in a permanently locked state. When this happened, logging in or out of the server would take a very long time (several seconds). If additional database servers were started on the machine, logging into and out of these servers would not work at all. This problem has been fixed.

Using MIMINFO with DCL Command Qualifiers (V9.2.3C) In version 9.2.3B, the MIMINFO command could not be used with DCL-style command qualifiers. Only the Unix-style command switches was supported. Version 9.2.3C supports both styles.

Error Messages in MIMER.LOG From Disconnected Clients (V9.2.1) An error message could sometimes be produced on the mimer.log file when a Windows client disconnected its Mimer session. Since this event was harmless, these messages are no longer produced in the log file.

Hang When Waiting for I/O Completion (V9.1.3) If prefetch of pages was interleaved with exclusive operations on a page, two threads could both be waiting for the completion of the I/O in which case only one succeeded and the other thread caused a hang in the database server. This problem has now been corrected.

Stopping a Database Server with Local Users Connected (V8.2.4) If a database server was stopped while local users were connected to the server, the database server could not be restarted. In order to restart the server, all processes that had mapped the MIMCCS_xxxx global section had to be found and terminated to avoid the possibility that those processes could interfere with the global section used by the newly started server. This problem has now been corrected. In V8.2.4, the server can always be restarted, even if old users were not logged out properly. New global sections will be used for the new server process. Note that the old global sections will still remain in the system until the old client processes terminate. This situation can lead to increased global page usage. Mimer SQL 103 Features and Functionality History

Stopping a Database Server with Users Connected via TCP/ IP (V8.2.4) If a database server was stopped while users were connected with the TCP/IP protocol (or if a performance monitor was connected to the server), the server could receive an access violation leading to a server crash. This problem has been fixed.

MIMTCP Keeping a Connection Open (V8.2.4) In some circumstances, the MIMTCP process could keep a connection open to a database server. Because of this, the database server could not be restarted. In order to restart the server, the MIMTCP process has to be stopped first. This problem has now been corrected. In V8.2.4, the MIMTCP process will always close its connection to the database server within two minutes when the server is stopped.

UNIX Specific Features

miminfo -u and Crashing Server (V9.2.4) There has been a problem where a miminfo -u command under rare circumstances could make a database server crash. The problem would only occur on LINUX or Mac OS X. This is now corrected.

Undeleted Files Under /var/tmp (V9.2.1) When a database server was owned and executed from another user that root, temporary files could be left undeleted on /var/tmp, which could lead to connection attempt failures when filenames were reused. This is now corrected.

Error Messages in mimer.log From Disconnected Clients (V9.2.1) An error message could sometimes be produced on the mimer.log file when a Windows client disconnected its Mimer session. Since this event was harmless, these messages are no longer produced in the log file.

Connection Handshake Using /var/tmp (V9.2.1)

Tru64: In the operating system Tru64 version 5, the process ID number was extended from 5 digits to 6 digits. Since the process id was part of connection handshake filename (for platforms using Unix Domain Sockets derived from BSD 4.3) that was limited to 14 characters, where /var/tmp/ was used, the connection attempt failed. This is now corrected. 104 Corrected Features and Functions UNIX Specific Features

Logging Out Local Connections by mimcontrol -l (V9.2.1) A list of currently connected users can be obtained by the command: $ miminfo -u

It is possible to use the mimcontrol command to log out individual connections by specifying the channel number of that connection: $ mimcontrol -l

Previous versions of Mimer SQL on Unix could not log out local connections by using the mimcontrol command. This has now been corrected. If the connection is executing in the server while it is logged out by mimcontrol, it will receive a cancel notification. This will cause the request to complete earlier and to automatically log out.

Named Pipes in /var/tmp (8.2.4F)

Linux: Earlier Linux clients created an entry in /var/tmp when a local connection was created to a database server. The name of the entry corresponded with the pid the client process. In some cases these entries were not properly deleted which could cause problems. In the current version, the clients do not create any new entries in directories when connecting to a database server.

mimlicense Usage in miminstall (V8.2.4F) In miminstall, the use of mimlicense has changed slightly. Now the name of the key delivered with the distribution is mimerkey.mcfg. Previously, the extension was .cfg. Also, now the result of the mimlicense operation is checked and an error is displayed if something fatal occurs. Earlier this was silently ignored.

mimunlink and man-pages (V8.2.4F) Previously, man-pages were not unlinked by the mimunlink tool. This is now corrected.

TMPDIR Verification in Shell Scripts (V8.2.4F) It has now been verified that a possible TMPDIR environment variable setting is a valid directory path. Previously, if this was not true, various error message could be issued. Mimer SQL 105 Features and Functionality History

Pathlist with Repeated Paths (V8.2.4)

Linux: At some Linux installations, there was a problem with environment variable path lists, e.g. LD_LIBRARY_PATH, becoming too long and paths were repeated in the list. Previously, this could occur in shell scripts as they were setting a desired path and then padding with the original value of the variable. The procedure could then be performed recursively. This behavior has been changed by using a new program, called mimaddpath, which verifies if the added path already exists.

Relocated Documentation Index (V8.2.4) Earlier the PDF index for the documentation set was distributed in a specific manind directory. This directory has been removed. The directory, now called index, and the PDF file index.pdx are located on the same directory level as the PDF manuals. This is convenient when using the documentation index. The documentation index is now included in the RPM distribution of Mimer SQL.

The Compatability Library (V8.2.4) A symbol table has been added to the compatibility library compat.a. The compatibility library has also been updated to include the sequential I/O package from version 7, mainly to provide for a possibility to relink the MIMER/PG tool.

The mimadmin Tool (V8.2.4) The mimadmin menu tool has been updated to handle database names in a case- insensitive way. Upper case is used.

The dbinstall Tool (V8.2.4) The dbinstall tool has four new optional arguments when used in the silent mode. It is now possible to specify the database server operator, and locations for the transdb, logdb and sqldb databank files by using a new set of arguments, i.e. arguments 4-7 for the -s switch. For example: dbinstall [ -s database password home_directory [ transdb_directory logdb_directory sqldb_directory operator ] ]

The mimstatln Program (V8.2.4) The mimstatln program, used to follow links, is now updated so that it always returns an absolute path.

The mimdbfiles Tool (V8.2.4) The mimdbfiles tool has been updated so that raw device files used for databank storage are reported. 106 Corrected Features and Functions UNIX Specific Features

The mimautoset Tool (V8.2.4) The mimautoset tool has ben updated so that created links to the init.d directory are removed when using the -u switch.

Updated Error Messages (V8.2.4) In previous versions, some error messages from the server returned unknown as the specification of the function observing the error. These messages have been updated.

Problem with Long Pathnames in mimhosts (V8.2.3) Previously, when adding a pathname using the mimhosts command, existing pathnames could become corrupted if the new pathname exceeded 100 characters. This has now been corrected.

Unexpected Line Wrap (V8.1.3B)

Linux: During installation and administration of the Mimer SQL system, unexpected line wraps could be encountered when scripts in the distribution were asking the user for information in order to continue. This could happen when using other shells than Korn Shell. This is now corrected.

Wrong Error Message (V8.1.3) In the following example, when trying to start a database server without having the MIMER_HOME environment variable set, the wrong error message was displayed: # mimcontrol -s m81pelle 1999-10-12 10:46:39.77 Error when deleting memory pool in database server #

The correct error message is: The environment variable MIMER_HOME must point to the MIMER distribution

Automatic inetd Daemon Re-start (V8.1.3)

Linux: During installation, there is an option to automatically let the inetd daemon be re-started to enable /etc/inetd.conf updates. This operation was not always performed successfully during Mimer SQL installations on Linux. The process ID for the daemon was not obtained correctly.

Single-user Mode Databank Pathlist (V8.1.3) Earlier when having a pathlist defined for a local database in /etc/sqlhosts only databanks in the database server home directory could be located when executing in single user mode. This is now corrected. Mimer SQL 107 Features and Functionality History

Windows Specific Features

Mimtrace Manifest (V9.3.8C) There has been a manifest related problem with the Mimtrace functionality. The problem caused a message box with a Runtime error and prevented logging from taking place. The problem is now corrected.

Long Database Names (V9.3.8) It is now possible to use database names of maximum length (128 characters).

Uninstalling on Windows Vista (V9.3.8) When uninstalling Mimer SQL the Windows Installer did sometimes display a message box stating that the files mimtcp.exe and/or mimsrv.exe were locked. This was because there were active Mimer services using these files. This problem has now been corrected.

Output Text File Problem (V9.3.7F) From v9.3.5 up until v9.3.7E no Mimer tools could create an output text file unless either specifying the full path (.e.g. C:\tmp\logfile.txt), or setting the MIMER_PATH environment variable. The MIMER_PATH defines a path to use for searching and creating Mimer related files. When this situation occurs, a runtime exception was thrown due to an assertion in the Microsoft C Runtime Library. A couple of examples of situations that triggered this error was: • Using the 'log output on ' command in BSQL. • Specifying an output file in DBC. This problem is now corrected.

Mimcontrol Hang on Windows Vista (V9.3.7E) Due to a change in Windows Vista compared to earlier Windows versions the mimcontrol program and the database service did not use the same shared memory objects. This caused the mimcontrol program to hang. This has now been corrected.

Unicode Installation Directory (V9.3.5) It is now possible to install Mimer SQL in a directory that contains Unicode letters in the filename. Previously, the Performance Monitor component did not install correctly. In addition, help files could not be viewed due to a bug in the help reader. A workaround for this bug is now in effect which allows help files to be shown from Mimer programs that reference the help file and also via the shortcuts on the start menu. It is not, however, possible to double click on the help files in the installation directory until the Microsoft help reader supports Unicode characters in the help filename. 108 Corrected Features and Functions Windows Specific Features

XA Library Registration (V9.2.5) When service pack 2 of Windows was introduced it was necessary to register all libraries that can perform distributed XA transactions. This is now done automatically for the Mimer ODBC dynamic link library.

PSM Debugger Shortcut (V9.2.5) The PSM debugger shortcut shows up properly even if Java is not installed.

Checking SYSDB Using Databank Check Utility (V9.2.2E) The previous 9.2 versions of the Databank Check Utility (dbcw.exe) returned an ‘File locked by other user’ error when trying to check SYSDB. This problem is now corrected.

Using the NT Performance Monitor on Older Servers (V8.2.4) Previously, the Mimer SQL NT Performance Monitor did not work when connecting to a database server of an older version than the database server installed on the client where the Performance Monitor was running. This problem is now corrected, with some implications. Counter values not known by the database server will always yield a value of 0. Also, the SQL Pool deallocations/sec will always be 0 when working against 8.1.2 servers even though the counter exists.

Default License Key during Reboot (V8.2.4) The default license key was not installed when the following conditions existed: 1 The Mimer SQL client was installed for the first time. 2 The ODBC software needed a reboot due to locked files. 3 The installation was made from a packed exe-file containing the Mimer SQL distribution downloaded from the Internet. This has now been corrected.

Event Log Registry Entries during Uninstall (V8.2.4)

NT: When uninstalling Mimer SQL completely from a computer, the registry keys for event log handling were not removed. This is done properly now.

Uninstalling Default Data Source (V8.2.1) When uninstalling Mimer SQL, ODBC data sources are saved. When Mimer SQL is subsequently reinstalled, the data sources are recreated. This now works for the default data source as well. The handling of default data sources in the Mimer Administrator is now working correctly in all cases. Mimer SQL 109 Features and Functionality History

Parallel MIMCONTROL Operations (V8.2.1) Previously, if several MIMCONTROL commands were executed concurrently the server would only respond to one of them and the other(s) would time out. This has now been corrected.

Mimer SQL Mobile Specific Features

Create Example Environment (V9.3.3) The menu alternative "Create Example Environment" is now disabled if the database is of server type that does not support creation of new objects (e.g. Mobile). Previously, creation was initiated and then quickly interrupted with a non-informative error message.

Export to Handheld Wizard Command Line Options (V9.3.2) Invoking the Export to Handheld Wizard from the command line required the user to provide different sets of parameters depending on if Mimer SQL was installed or not. From version 9.3.2, this is improved, thus allowing the same scripts to be used.

TCP Server Process on Pocket PC (V9.2.5) The TCP server only handled one connection properly before going into a non-responsive state. Nothing was shown in the window of the TCP Server process. Clients experienced "Connection refused" errors when this occurred. This has now been corrected.

Delimited Identifiers in the Mimer Explorer (V9.2.1) The Mimer Explorer can now handle statement names that require delimited identifiers correctly (i.e. mixed case and/or special characters).

Statement Types in Mimer Explorer (V9.2.1) The Mimer Explorer can now display statements that has been created as scroll only (CREATE SCROLL STATEMENT). 110 Corrected Features and Functions Mimer SQL Mobile Specific Features Mimer SQL 111 Features and Functionality History Chapter 4 Deprecated Features and Functions

This chapter describes Mimer SQL features and functionality deprecated in previous versions.

Mimer SQL Structured Query Language

PSM: JOIN Without SELECT (V9.3.7) Retrieval statements without a select list is no longer supported in PSM. E.g. a statement such as items JOIN procedures ON items.producer_id = producers.producer_id

will cause a syntax error when used in a PSM routine. Now the SELECT keyword must be specified: SELECT * FROM items JOIN procedures ON items.producer_id = producers.producer_id

Unqualified Column Name in ORDER BY When Duplicated (V9.2.4) If a column name exists in several tables in a query, it must always be qualified in an ORDER BY specification. Prior to v9.2.4 the following statement did work because only SELECT list items were allowed in the ORDER BY clause: SELECT t1.*, t2.c2 FROM t1, t1 AS t2 ORDER BY c1;

But since the introduction of ORDER BY expressions in v9.2.4, the c1 specification in the above ORDER BY clause is ambiguous, since any column in the tables can be specified, even if its not in the SELECT list. 112 Deprecated Features and Functions Mimer ESQL Embedded SQL

To avoid this problem, qualify the columns in the ORDER BY clause, e.g. SELECT t1.*, t2.c2 FROM t1, t1 AS t2 ORDER BY t1.c1;

MIMER Views (V8.2.1) The MIMER system views have been made completely backwards compatible in version 8.2. This means that they only return objects with a length of 18 characters or less. The new limit in Mimer SQL is now 128 characters. Because of this, the MIMER views do not show objects that are longer than 18 characters. Furthermore, a table that has any column with a name longer than 18 characters will not be shown. One effect of this is that old Mimer SQL clients only show objects that conform to the old limits. Applications retrieving dictionary information should migrate to the INFORMATION_SCHEMA views. These views return all information, including any new information such as constraint names, as well as Mimer SQL specific information, such as comments and databanks.

SET TRANSACTION CHANGES (V8.1.1) The statements SET TRANSACTION CHANGES INVISIBLE and SET TRANSACTION CHANGES VISIBLE are no longer needed. However, the statements are supported in version 8.2 for compatibility reasons.

Mimer ESQL Embedded SQL

Windows: SQLCA and SQLDA Removed (V9.3.8) Win: The deprecated SQLCA and SQLDA structures have been removed from the Mimer SQL Windows distribution. If an application tries to use SQLDA or SQLCA, the error -18009, “Embedded SQL and MIMER/DB versions are incompatible, please preprocess source code” is returned. As a consequence of the removal, all code pre-processed using ESQL of version 7.1 (or older) must be pre-processed again using the current ESQL pre-processor.

JOIN Without SELECT (V9.3.7) Retrieval statements without a select list is no longer supported. E.g. a statement such as items JOIN procedures ON items.producer_id = producers.producer_id

will cause a syntax error when used in an ESQL program. Now the SELECT keyword must be specified: SELECT * FROM items JOIN procedures ON items.producer_id = producers.producer_id

Vendor Specific SQL Removed (V9.2.1) The vendor specific escape clauses are no longer supported for Embedded SQL programs. Mimer SQL 113 Features and Functionality History

INCLUDE SQLCA (V7.x.x) In version 7.1 of Mimer SQL, it was necessary to use INCLUDE SQLCA in an embedded SQL program to include the declaration of the SQL communication area. INCLUDE SQLCA is no longer required. Applications should now use the SQLSTATE variable and the GET DIAGNOSTICS statement to get all the information previously obtained from SQLCA. See the Mimer SQL Programmer's Manual for a description of SQLSTATE and GET DIAGNOSTICS. For compatibility reasons, the use of INCLUDE SQLCA is still supported.

SQLCODE (V7.x.x) The use of SQLCODE to retrieve status information was replaced by the use of SQLSTATE and GET DIAGNOSTICS in version 7.2 of Mimer SQL. For compatibility reasons, return codes can still be retrieved in SQLCODE. However, SQLCODE can be either a field in the SQLCA, or a 4-byte integer variable in the application. Mimer SQL will assume the existence of an SQLCODE variable in the application if: no INCLUDE SQLCA statement is found; and neither SQLSTATE nor SQLCODE has been declared between BEGIN DECLARE SECTION and END DECLARE SECTION. The values of SQLCODE are the same as the values for the internal Mimer SQL return codes described in the Mimer SQL Programmer's Manual, Appendix C.

SQLDA (V7.x.x) The SQL descriptor area SQLDA, which was used in version 7.1 of Mimer SQL, has been replaced by a standardized SQL descriptor area. The SQLDA area was allocated and maintained by constructions in the host language. The new SQL descriptor area is allocated and maintained by standardized embedded SQL statements. The old SQL descriptor area SQLDA is still supported in Mimer SQL for compatibility reasons.

BSQL

Mimini Initiation File (V9.3.5) The initiation file MIMINI is no longer supported. Corresponding functionality can be achieved by using command line arguments for BSQL.

Load/Unload Deprecated (V9.1.1) The BSQL functionality for Load/Unload is now deprecated. Use MIMLOAD instead. 114 Deprecated Features and Functions Mimer Utilities

Mimer Utilities

Mimer UTIL (V9.2.1) UTIL is deprecated and has been removed from the Mimer SQL distribution. In Mimer UTIL there was an option to generate special system databanks for the old Mimer modules FM, PG, QL, RG, and SH. Please, contact our support department if this option is required.

Windows Specific Features

Level2 Database API (V9.3.8) The deprecated Mimer database API, called Level2, is no longer supported on Windows platforms, not even from Level2 applications running on remote computers.