Contents of shell archive utils2_ak, submitted by Art S. Kagel: Version dated: April 13, 2015 Author's contact address: art.kagel@gmail.com The shell archive has been corrected to use the user's preferred pager depending on the PAGER environment variable and defaulting to 'more'. NOTE: I think the entire package will now correctly compile/link with any of: C4GL 7.xx, ESQL/C 7.xx, or CSDK 2.xx or later, though you may have to edit the makefiles and make the changes noted therein in comments. Also some utilities, notably dostats_ng.ec, require CSDK v3.10 or later. Unfortunately making this happen for less make-aware 4GL programmers requires using some GNU Make features so the default makefiles now require GNU Make to run correctly. GNU Make is available from the Free Software Foundation at www.fsf.org. If you do not have GNU Make and are too impatient to download or build a copy of it, there are alternative makefiles that can use the standard UNIX make. They are Makefile.nognumake for the main build and myschema.mk.norcs.nognumake for the myschema build. If you do not have gnu make use this main makefile and modify both of these files for operating systems other than Linux. ---------------------------------------------------------------------------- File: BUILDING Notes, instructions, and suggestions to aid one in building the package on various platforms. This file now automatically offers to display when you extract the shell archive. Also the shar now offers to also display the myschema.README which has further instructions for that utility. Building on Linux using CSDK v3.10 or later does not require any modifications to the makefiles, other platforms and earlier CSDK versions do. ---------------------------------------------------------------------------- File: Makefile 2013-12-25: Improved handling of creating the bload & bunload links for ul.ec 2010-12-06: Fixed Makefile.nognumake and myschema.norcs.nognumake to work correctly on AIX. Increased the memory for the xlc optimizer when compiling on AIX. 2009-07-22: Added an 'install' target. INSTALLDIR variable controls the location to which executables and scripts are installed. Also added a new makefile, makefile.nognumake that has the changes for using UNIX make if GNU make is not available. When ul.ec is compiled now the makefile will also link that executable to the names bload and bunload and install those as well as ul. Yeah! I finally did it. Here is a makefile that will make the entire package for you. (No Jonathan, I have not yet configurized it.) Therefore if you are compiling on HP or AIX or on Solaris 9+ (64bit), or are using c4gl instead of esql to compile, you will need to make some changes to this Makefile. All of the appropriate changes of which I am aware are included as comments so you just have to swap commented lines about. If you want to build myschema and are on AIX you will have to extract the source archive, myschema.source.ar, manually (see the Makefile) into the myschema.d subdirectory, and modify the appropriate makefile (see the myschema.README file for details), then run make from the parent. Reworked to permit compilation of dostats.ec using c4gl versions that do not support host variable declarations in ANSI style function parameter lists. Added a CFLAGS define option to use if your platform does not define getopt() and its globals optind and optarg in stdio.h or stdlib.h. Especially needed in dostats.ec except on Linux which is handled without this define. Improved option suggestions for AIX. ---------------------------------------------------------------------------- Utility: mydbdiff Synopsis: Compare two database schema's using diff or sdiff Author: Art S. Kagel Revision: 1.3 Comments: Requires myschema Features Version 6.25 or later (included here). Mydbdiff is a ksh script that takes advantage of an feature of myschema (-o) to acquire a schema of each database with objects ordered to ease comparison. While the myschema -o option should not be use to create a schema file for porting (as you may not be able to execute such a schema because dependencies may not be created in the correct order) a saved schema created this way can be compared to the active database schema to determine changes over time using the -f option. Release Notes: Releases 1.2 & 1.3 add new features. The new -d option allows one to specify any diff utility. The -S option allows one to specify that one or both of the comparative schemas be saved in a file in the current directory named .mydbdiff. The -f option allows one to compare a live database's schema to a comparative schema previously saved using the -f option or manually generated using myschema -o. The combination of -S and -f allow for tracking changes to a single database over time. ---------------------------------------------------------------------------- Utility: drive_dostats Synopsis: This is a ksh script that will divide the tables from a single database among N copies of dostats running in parallel. Tables are distributed according to size in round robin fashion. Any dostats options that do not conflict with the -d, -t and -i options passed by the script will be passed along to all copies of dostats. Author: Art S. Kagel Revision: 1.10 Comments: As usual, running drive_dostats with no arguments will display a usage aid. Thanks to Douglas McAllister for the inspiration. Release Notes: Version 1.10 adds a new option -a to process tables in reverse order, smallest tables first. Sometimes this can result in faster total runtime. Version 1.9 adds a dostats -p run at the end to compile stored procedures. Version 1.8 adds -i and -i@ options which properly process included table lists and work correctly with the -x/-x@ options. Fixed a bug checking for runs that do not select any tables on Linux. Version 1.7 fixes a problem arising out of differing output formats from varying versions of wc on different platforms. Fixed missing NL at EOF. Version 1.5 fixes a problem handling really HUGE exclude files. Dostats, and until this release drive_dostats also, handles exclude files by building a large 'NOT IN (...)' clause. This fails if the exclude file contains more than about 30,000 bytes as the maximum size of a SQL statement that IDS will process is 32K. Drive_dostats now loads the exclude list into a temp table and uses that to produce the include files the several copies of dostats process. Drive_dostats can now be used to process very large exclude files. Version 1.2 & 1.3 add new options -x and -x@ so users can specify specific files or lists of files to exclude from processing. This is similar to the underlying -x options to dostats itself except that database names are not handled. Multiple -x and -x@ options are accepted and may be intermingled. Changed the allocation of tables to the dostats children to more evenly distribute the work. Allocation now sweeps back and forth across the children rather than the strict round robin allocation of v1.1. Improved the filtering out of system catalog tables, non-catalog tables beginning with 'sys' were being ignored improperly. Version 1.4 just removes a leftover debug line. Notes in the script suggest alternative sorting criteria to better allocate tables to children, implementation left to user's needs. Added echos of the commandlines passed to the children. ---------------------------------------------------------------------------- Utility: dbdelete.ec Synopsis: This utility, was written to delete large numbers of rows while using very few locks and avoiding long transaction problems. The performance of version 3 is on par with a dbaccess executed DELETE statement while eliminating the problems with locks and transaction duration. Versions 1&2 were too slow to be practical and version 1's source was overly complex, thus was born dbdelete.ec version 3. Note that in testing no throughput was gained from executing multiple copies of dbdelete with different WHERE clauses (unlike its progenitors ul.ec and dbcopy.ec). Author(s): Art S. Kagel Revision: 1.28 Features Version: 3.2 Version(s) supported: 7.xx, 8.xx, 9.xx File(s): dbdelete.ec Comments: Requires compilation by ESQL/C 7.xx or later. Release Notes: Version 1.28 Added support for INT8/SERIAL8, BIGINT/BIGSERIAL, and LVARCHAR types in -q queries. Version 1.27 Updated copyright. Version 1.26 Removed the progress printout if -S is specified and redirected the version printout to stdout from stderr. Version 1.25 Added new option -R which begins all transactions with the WITHOUT REPLICATION clause which prevents the operation from being replicated via Enterprise Replication. Thanks to Øyvind Gjerstad for the suggestion. Also increased the size of the maximum SQL DELETE command (for rowid deletes) from 32750 to 65500 to reflect the increase in the SQL buffer size starting with IDS v9.40. Version 1.24 updates the copyright statement for 2011 Version 1.23 adds a new option, -o, that instructs dbdelete to not close and reopen the fetch cursor between rounds of fetching keys or rowids to delete. This can be slower for deleting massive numbers of rows. The purpose is to reduce (but not eliminate) the possibility of deleting rows that have been inserted to the table during the dbdelete run that match the selection criteria. Ideally, dbdelete should NEVER be run while new rows are being inserted. Even with -o set there is a window of time - really between when the user determines the key values to use for the WHERE clause filter and when the cursor is finally open in dbdelete - when this can still cause a problem. Version 1.22 adds a new option, -q, which permits the user to specify a full SELECT statement to return ROWIDs or keys to select for deletion. If keys are returned then the -u option is required for -q to work properly (unexpected results may pursue you if you don't). Version 1.20 fixes a bug affecting 64bit compiles. Thanks to Raja Nizad Ks for the feedback that led to this fix and for testing the patch. Version 1.21 is cosmetic. Version 1.17 adds the -b CommitSize option and support for FET_BUF_SIZE environment variable to control transaction size. Version 1.18 increases the Features Versions to 3.2. Version 1.19 fixes a typo. Version 1.16 removed some dead code and fixed the return type of usage(). Version 1.14 makes the code safe to use with IDS 9.xx long object names. Version 1.15 just updates the copyright statement. Version 1.13 adds a copyright message to the -V printout. Not to worry, this is just a formality. Use of this utility is still free. Notes: Delete by ROWID works by fetching a large number of matching rowids (8191) and using them to build large delete statements with a WHERE rowid IN (...) clause. The size of each of these delete statements is controlled and limited by the -B option. If the statement is too large the time spent by the engine parsing and optimizing the large statement reduces throughput. On my testbed 2K was the best performer overall and that is the default, YMMV so this is configurable! ---------------------------------------------------------------------------- Utility: dostats_ng.ec nSynopsis: Next Generation dostats utility. Dostats automatically generates optimal UPDATE STATISTICS statements for a table(s) or database(s) per the latest Performance Guide manual, and John Miller III's paper on recent improvements to way that UPDATE STATISTICS works internally and how to take advantage of those improvements. Options control what databases and tables are affected, whether commands are executed immediately, written to a stored procedure and scheduled for later execution, or output to a script, whether and how stored procedures are handled, the level of verbosity, tweaking the granularity of the statistical distributions captured, specifying criteria for selecting tables to update, and much more. Author(s): Art S. Kagel Revision: 1.48 Features Version: 7.00 Version(s) supported: Engine versions 10.00, 11.xx & later CSDK v3.10 and later Release Notes: Revisions 1.47 & 1.48 Fixed a bug in --aos-thresholds option and improved the voerbose display for this. Revision 1.46 Fixed a problem handling very large stored procedure argument lists. Revision 1.45 Changed handling of memory allocation for the procedure argument list. Was letting the ESQL/C library handle that but it wouldn't allocate more than ~2000 bytes to the lvarchar structure so long arg lists were being truncated. Now allocating maximum memory once myself to 65560 which is bigger than the biggest possible argument list. Revision 1.44 Modified the query that gathers column names to ignore columns of type BYTE, TEXT, BLOB, & CLOB since the engine does not calculate distributionson those column types anyway. Revisions 1.41-1.43 implement a new option, --display-local which is like --time-display except that it displays in the local timezone rather than in UTC. Also modified to ignore blob columns since they don't generate distributions anyway. This should make some runs faster. Revision 1.40 adds a new option, --execute-local. Sets the task to run in the target database. Implies --proc-local. Revision 1.38 & 1.39 Fixed some compile time warnings seen on HPUX. Revision 1.37 Fixed a formatting problem in the usage help display. Revision 1.35 & 1.36 Modified --drop-distributions and --clean-distributions to use LOW DROP DISTIBUTIONS ONLY where available. Revision 1.34 Changed --aus-thresholds to override the global AUS threshold for a table with the table's statchange attribute value if -b is also set. Revision 1.33 Updated copyright. Revision 1.32 Expanded some strings to eliminate overflows. Revision 1.31 Fixed LOW stats progress trace to separate column names with commas properly. Revisions 1.29 and 1.30 added a new option, --error-count, to return the number of errors encountered when -n is specified. Without the new flag, -n returns 0 unless the maxerrs count is exceeded. Revision 1.28 Improved error printout if the a1 cursor fails. Revision 1.27 Fixed a bug in SET ISOLATION when executing immediately. Fixed a bug in --drop-distributions. Added --clean-distributions for cleaning out old distributions when only specific tables are being processed. Can be used globally, but --drop-distributions will tend to be faster. Restricted --drop-distributions from being used with -t, -x or -i since it would drop distributions from all tables and then only rebuild the distributions for the specified tables. Thanks to Ashok Sharma for pointing out these bugs. Revision 1.26 Fixed to output SET ISOLATION commands to the command file or procedure if not executing directly. Revision 1.25 Fixed a problem with dostats not able to compile old systdist functions left over from an in-place upgrade. Some versions renamed the older function as systdistold, others as oldsystdist. One code path caught and ignored both versions of the renamed function, the other was still trying to compile systdistold. Revision 1.24 Removed extraneous COMMIT WORK statements for ANSI mode databases. Fixed a missing CLOSE when a loop made a shortcut exit. Revision 1.23 Fixes a bug in the manual row counting function that affects sites with tables having more than 2^31 rows in a table. Revisions 1.18-1.22 Improved -i'!SELECT ...' to treat the SELECT statement as a derived tables when communicating with v11.xx. This will allow the user to include SELECT clauses which are restricted from sub-queries which were used previouse (and are still used to communicate with v10.00). Deprecated support for -x'!SELECT...' since now it is always possible to negate the filters in such a statement and pass it as a SELECT to -i instead. Deprecated -v with no arguments. Revision 1.17 Fixed bug when running against an ANSI mode database. Periods missing from some statements between the owner and object names. Revision 1.16 Adds a new feature, --proc-local. This supports earlier Informix releases that did not have sysadmin database by creating the table containing commands for the stored procedure to use in each database rather than in sysadmin. Revision 1.13 updates the copyright statement for 2011 Revision 1.12 Added new options --force-run and --auto-run to enforce FORCE mode or AUTO mode disregarding the AUTO_STAT_MODE setting in the ONCONFIG file and the environment. Revisions 1.9 - 1.11 Fixed procedure so it will not error out recompiling itself. Revision 1.8 Fixed a problem with scheduling the stored procedure. Revision 1.7 fixes an intermittent problem returning SQLCODE = -9971 Revision 1.6 adds a new feature, --isolation allows one to specify the isolation level dostats uses when querying sysmaster and the target database. Revision 1.4 & 1.5 add a new option, --drop-distributions, which will initially delete all data distributions from the sysdistrib catalog table. Revision 1.3 is the first official release of this next generation dostats utility. Only one new feature is included: --time-display prints the start time of each step that is executed to make parsing trace logs easier and to help determine if dostats runs are affecting other tasks. This release DOES NOT support any Informix server version earlier than 10.00 no stand-alone ESQL/C or 4GL compilers or CSDK versions earlier than 3.10. This is to permit significant code simplification (1400 lines removed) which resulted in correcting a long standing bug: The table level trace "Working on ..." now works correctly and consistently. Beta testers reported that this release runs faster than the older version. All new features will be added ONLY to this version of the dostats source. ---------------------------------------------------------------------------- Utility: dostats.ec Synopsis: Dostats automatically generates optimal UPDATE STATISTICS statements for a table(s) or database(s) per the 7.2 release notes, the latest Performance Guide manual, and John Miller III's paper on recent improvements to way that UPDATE STATISTICS works internally and how to take advantage of those improvements. Options control what databases and tables are affected, whether commands are executed or output to a script, whether and how stored procedures are handled, the level of verbosity, tweaking the granularity of the statistical distributions captured, specifying criteria for selecting tables to update, and much more. Author(s): Art S. Kagel Revision: 1.181 Features Version: 6.00 Version(s) supported: Engine versions 5.xx, 6.0x, 7.xx+, 9.xx, 10.xx ESQL 7.2x+, iSDK 2.10+, C4GL 7.20+ (see Makefile for changes needed to compile w/ C4GL or ESQL/C 7.xx) File(s): dostats.ec Comments: Requires compilation by ESQL/C 7.xx or later but can be executed against databases on IDS or SE servers from 5.0x and up from a 7.xx runtime environment. Can execute commands on the fly or output a script for execution later. Options control level of stats created and what objects are processed. Implements the recommendations from the Performance Guide for 7.3x and 9.xx plus John Miller III's recommendations in his White Paper on the topic. Release Notes: Revision 1.181 Updated copyright. Revision 1.180 Fixed bug when running against an ANSI mode database. Periods missing from some statements between the owner and object names. Revision 1.179 updates the copyright statement for 2011 Revision 1.176-1.178 Fixed procedure so it will not error out recompiling itself. Revision 1.175 Fixed problem with creating the stored procedure. Revision 1.174 fixed a missing table alias affecting server versions earlier than 9.xx. Thanks to Richard Harnden for pointing out this one. Revision 1.174 & 1.175 Fixed missing table alias. Thanks to Richard Harnden for pointing it out. Fixed problem with scheduling the stored procedure. NOTE: 1.173 is the last feature release of dostats.ec. This source has been supplanted by the new generation source file, dostats_ng.ec. This source will only receive bug fixes in the future. See details below. Known problems: Future: ---------------------------------------------------------------------------- Utility: myschema.source.ar Synopsis: My version of dbschema which has a many advantages over the original: o can generate modified schemas for porting including: o altering or dropping owners o eliminating or modifying EXTENT SIZE and NEXT SIZE settings o order tables under foreign key dependencies o can access remote databases requiring authentication o optionally report foreign keys referencing a single table schema o does not try to acquire an exclusive lock on the table(s) being reported. o eliminates those pesky automatically generated constraint names to avoid clashes with existing tables o breaks indexes created by UNIQUE, PRIMARY KEY and FOREIGN KEY constraints out as stand alone indexes, with user accessible names, to make reorganization and defragmentation easier. o table create and indexing commands can be written to separate output schema files. o GRANT statements optionally written to a separate file. o GRANT statements immediately follow each table to make it easier to cut and paste. o GRANT statements generated even for single table schema output. o comments indicate where changes have been made to the current schema when generating the output due to myschema options. o will report on system tables, violations tables, and SMI tables which dbschema refuses to do. o can optionally output only UPDATE STATISTICS commands to duplicate each table's level of statistics. o treats tables, views, and synonyms the same so you don't have to know if a tablename is a real table when you run it. o quiet mode to aid piping output to dbaccess/isql/sqlcmd. o compatible with OL5.xx and SE. Dbschema 5.xx does not support IN clauses. o output optionally compatible with dbimport. o optionally output table reorganization commands including altering NEXT SIZE. o generate IN clauses for all tables to ease editing for porting to another server. o can suppress output of START VIOLATIONS statements. o optionally initialize the next serial value to either MAX(col)+1 or the value stored in sysptnhdr.serialv. Similarly for BIGSERIAL and SERIAL8. o outputs CREATE AGGREGATE statements which dbschema does not do. o outputs ALTER TABLE statements for tables created OF TYPE that have been altered since creation adding NOT NULL or DEFAULT clauses to a column. Dbschema and dbexport do not do this either, careful! o multiple permissions on the same object compressed into a single command. o places UDR language privileging at the top of the schema (dbschema places this near the end) to make it easier to alter the privileging when porting a development schema to production o Can produce infrastructure output scripts for versions for which dbschema does not support the -c option o Infrastructure output scripts include support for extendable chunks. Dbschema does not extend support for extendable chunks into the scripts it generates. Myschema also has one major dbschema feature missing: no -hd option and a few of the more esoteric features added in v9.40+ of dbschema like -u all. Author(s): Art S. Kagel Revision: 2.333 Features Version: 6.32 Version(s) supported: IDS 12.10, 11.70, 11.50, 11.10, 10.xx, 9.xx, IDS 6/7.xx, OL 5.xx, SE 7.xx : Requires ESQL/C 7.2x or SDK 2.xx or later (ESQL/C r7.2x and C4GL are now fully supported excepting extended types). File(s): myschema.source.ar, a System V 'ar' archive which contains the many source files (get GNU ar from FSF or my ar2 package from the IIUG if your system's ar is BSD format - to my knowledge this includes only AIX currently) Comments: PLEASE let me know if the support of any Informix feature is not complete or otherwise broken. Release Notes: Revision 2.333 Fixes support for functional indexes using the bson conversion functions bson_value_*() except for the new (as of 12.10.xC5) bson_value_float() function. This may also fix an unreported problem with functional indexes that include a constant in one or more of the function arguments. Revision 2.332 Fixed a problem with -m option causing myschema to either crash or return a spurious error. Thanks to Todd Roy for reporting this one. Revision 2.331 Added new option, --aggregates, to print out user defined aggregations. Revision 2.230 Fixed a bug that was preventing the printout of the defined lengths of lvarchar and other variable length UDT types. Revision 2.229 Improved performance on very large servers by reducing the dependence on sysmaster. Note: Access to sysmaster tables that are windows onto disk structures (systabnames, sysextents, sysptnhdr, etc.) on servers with many databases and tables can trigger runaway virtual segment allocation (see IT03031). Not fixed as of v12.10.FC4W1 & 11.70.FC8W1. Revision 2.228 Fixed a problem causing two indexes with the same key to be generated when a has a unique constraint and one of two or more foreign keys using the same key. Revision 2.227 Fixed handling of very long procedure argument lists. Revision 2.226 Modified the --dependency-order option to handle tables with circular dependencies and self-referential tables which had caused myschema to abort without producing any output. Also reduced the temp space needed to calculate this feature a bit and added some error handling. Revision 2.325 Fixed a problem I found at one client. I have found orphaned indexes. Disabled indexes with a generated name that were created by a constraint, but the constraint was no longer in existence. Probably an artifact of an old engine bug that left them around. These are now ignored by myschema! Revision 2.323 & 2.324 Implemented new option, --no-validate, which causes myschema to include the NOVALIDATE clause to all FOREIGN KEY contraints. This option is only a good idea when loading data that has already been validated such as an unload from a valid database. Revision 2.322 Fixed printout of ROW type columns. Revision 2.321 Added new option --myexport-delimiter to specify the delimiter character for the dbexport header and for the myexport/myimport external table DDl scripts when -l and/or --myexport-scripts or --myexport-express are passed. Revision 2.320 Removed the GRANT SESSIONAUTH privilege for the owner of the database. It is not needed and attempting to execute that will fail anyway. You cannot grant sessionauth privilege to yourself, you have to grant it to someone else who can then grant it to you (odd I know). Revisions 2.317-2.319 Fix problem with duplicate DDL for tables with multiple foreign keys when including the --dependency-order option (used by myexport) Revision 2.316 Improved testing of a couple of options where the conditional test is being optimized away by some compilers. Revision 2.315 Added an undocumented opton to eliminate tables that match a given MATCH string. For internal use of myexport. Revision 2.314 The 11.70 docs are wrong about the syntax of the ESCAPE optiond. The documented syntax returns a syntax error so I changed it again for 11.70 to be the same as for v11.50. That works. Revision 2.313 Fixed myexport/myimport scripts for tables defines OF TYPE. Revision 2.312 Fixed handling of blobspace blobs in myexport/myimport scripts. The blobs in the external tables have to be defined as IN TABLE. Revision 2.311 Fixed external table definitions for --myexport-scripts for v11.70. The syntax of the ESCAPE option changed between 11.50 and 11.70 and then again in 12.10. Revision 2.310 Adds support for the GRANT SETSESSIONAUTH statement. Note that this statement, which first appeared in v11.10, is still not supported by dbschema! Revision 2.309 Fixes a bug that causes some indexes to not print. Thanks to Mike Walker who pointed this out to solve a whole different problem! Revision 2.308 Adds support for indexes on external tables. In v12.10.xC2+ you can create disabled indexes on external tables to support IWA. If you load an external table into IWA having the index key defined helps IWA to determine fact versus dimension status for the table. FYI: dbschema does not yet produce the index definition for these indexes. Revisions 2.305-2,307 Fixed handling of Rolling Range/Interval partitions (at least until I hear back from IBM that they've changed the parser to match the documentation. The server won't accept some combinations of optional clauses that are valid according to the documentation. Revision 2.304 Implemented v12.10 Rolling interval partitions with support for DETACH and DISCARD. No support yet for DETACH with the ANY, INTERVAL FIRST, or INTERVAL ONLY options because the documented syntax doesn't work! Also extended this support to indexes. Revision 2.303 Fixed some compile time warnings seen on HPUX. Revision 2.302 Fixed problem minimizing extent sizes correctly when the actual number of used pages is zero. Updated copyright statement. Revision 2.301 Fixed problem detecting HPUX. Revision 2.299 * 2.300 Fixed problem hanging if -t is passed with a non-existent table name. Fixed problem causing indexes on catalog tables to be skipped. Revision 2.298 Fixed external table definitions for --myexport-scripts to set the ESCAPE option for v11.50 engines where the default is OFF. Added support for the ESCAPE option of external tables (how'd I miss that one?). Revision 2.296 & 2.297 Implemented a new option, --dependency-order, to output tables based on foreign key dependencies so that a table will appear after any tables on which it depends. This is needed by a new myexport option to avoid constraint violations during myimport processing. Revision 2.295 Fixed problem displaying some tables from v7.xx servers. Revision 2.294 Added support for DISTINCT types (UDTs) - thought I'd done that long ago! ;-( Revision 2.293 Fixed a bug introduced adding support for COMPRESSED indexes. Revision 2.292 Fixed a problem caused by IBM expanding some catalog table columns in version 12.10. Most notable symptom is view text truncation. Also enhanced the usage output and fixed some typos there. Thanks to Dirk Bornhutter for the suggestions and catch. Fixed a problem wrapping triggers within quoted strings. Revision 2.291 Fixed a problem using --infrastructure against v9.40. Fixed a problem using --infrastructure if chunks have been dropped and new chunks have been added to dbspaces created as higher chunk numbers. Revision 2.290 Fixed a bug in --myexport-express and --myexport-scripts which causes a core dump if MYEXPORT_ISOLATION is not defined in the user's environment. Revision 2.289 Fixed handling of attached/IN TABLE indexes. Fixed a problem when -O and --drop-proc are specified together causing the DROP routine statement to have no argument list. Added missing support for REFERENCES BYTE/TEXT arguments in DROP routine statements when --drop-proc is specified. Revision 2.288 Added a new option --no-storage-options which suppresses "IN " and FRAGMENT BY clauses. This can ease some migrations. Added support for marking chunks extendable in the infrastructure script if the source server's chunk is so marked. This is not supported by dbschema yet (reported). Revision 2.287 Added new option -K to name autonamed indexes and unnamed constraints as _pk for primary key indexes and
_### where type is one of "uk", "fk", "ak" and ### is a sequential number within the type. When run with -k only processes unnamed constraints. Fixed -U. Enhanced -v to print progress after "Analyzing schema". Reordered index printouts to group by the type of constraint each supports if any. Revision 2.286 Fixed problem with triggers with long comma lists with no white space causing problems when loading the schema. Added new feature --squish-triggers to eliminate unnecessary white space formatting to reduce problems loading the schema caused by IDS's trigger expansion making the trigger too big to load (> 64K). This problem goes away in 11.70.FC6+ anyway because the SQL size limit has finally been raised to 2GB, but ... Revisions 2.285 Fixed syntax error in REVOKE EXECUTE when -O is enabled. Revision 2.284 Updated copyright. Revision 2.282 Fixed uninitialized variables. Fixed possible memory overrun in print_procedures.ec. Fixed handling of BIGSERIAL initialization in releases prior to 11.50, again. Revision 2.281 Added support for the NOMINVALUE & NOMAXVALUE keywords in sequence definitions. Revision 2.280 Fixed the chunk size and offset calculations in the --infrastructure feature. Modified print_alters.ec to enable myschema to be run against servers prior to 9.xx. Revision 2.279 Added the "ESCAPE" clause to the external table statements generated to support myexport/myimport's -E feature so that "special" characters will be properly escaped in the unload files permitting successful imports (--myexport-scripts). Revision 2.278 Made the status printout reflect the correct output contents when executing --infrastructure. Revision 2.275-2.277 Fixed calculations for --infrastructure. Revision 2.274 Fixed constraints printouts to support owners. Full support for -O and --set-owner are followed and constraint owners are printed by default. Revision 2.273 Removed messages about constraint indexes being stored in rootdb. No longer true. Revision 2.272 Removed outdated warning about constraint indexes from the output. Revision 2.271 Fixes a compile time problem affecting AIX and other C compilers that do not recognize the C++ comment characters (//). Known problems with dbschema and myschema: Printout of functional indexes with descending keys is broken in dbschema versions prior to 11.70.xC7. The API version of the infrastructure script generated by dbschema through V11.70.xC7 with the -c option (no -ns) includes a bug. The SQL API command to create the root dbspace is broken over two lines, but only the first line is commented out. Finally fixed in 12.10.xC1 It is possible to create a very large table schema and to subsequently use ALTER TABLE to add so many columns that the resulting CREATE TABLE statement is longer than the maximum SQL statement (~64K prior to v11.70.xC6) so that the output schema is not usable to recreate the database. Dbschema continues to have the same problem. Fixed with larger SQL buffers in 11.70.xC6+. It is possible, using CREATE PROCEDURE/FUNCTION FROM FILE... to create a stored procedure with comments in very odd places - like before the CREATE keyword. Sometimes this confuses myschema's parser that strips out owner names and performs some other manipulations of the first line of the procedure. Version 2.217 fixes most of these problems, but there may still be some oddities that I have not allowed for. Let me know if you run into any. Dbschema does not generate GRANT SETSESSIONAUTH statements. Dbschema hangs when attempting to gather information for the second external table in a database. Not fixed yet as if 12.10.xC3. Futures: - Break large tables into a small CREATE with subsequent ALTERs? May be needed for table definitions that exceed the 64K statement length limit. If anyone runs into this one, let me know. Low priority otherwise given the increased buffer size in 1.70.xC6 and later. - Add configurable isolation levels (uses DIRTY READ now) - Support for Label Based Access Control Security Policies. Low priority since few are using LBAC due to its complexity. What else is still missing? ---------------------------------------------------------------------------- Utility: printfreeB.ec Synopsis: Reports unused and partially used space within a table. Uses SMI tables to scan a table's bitmaps. This is SLOW. A version I have written that reads the bitmaps directly from disk is almost 100 times faster. I have reported this to Informix. Author(s): Art S. Kagel Revision 1.11 Version(s) supported: 7.2x File(s): printfreeB.ec Comments: (Probably supports 7.1x as well but I am not sure if I have used any of the newer SMI tables and views that appeared in 7.2). Definitely needs changes to support IDS 9.4 even in small chunk mode (mostly works but reports oddities like table is 439% full!) Release Notes: Revision 1.11: Updated the copyright notice. Revision 1.10: Fixed some compile time warnings. Revision 1.9 Updated copyright. Revision 1.8 Updated the copyright notice to 2011. Revision 1.7 fixes an old bug. Revision 1.6 removes a deprecated RCS tag. Revision 1.5 fixes an uninitialized variable problem. Revision 1.6 just removes an unsupported rcs keyword. Revision 1.4 fixes a compile-time problem w/ strings.h -vs- string.h. Revision 1.3 adds -V revision and copyright option. Not to worry, this is just a formality. Use of this utility is still free. ---------------------------------------------------------------------------- Utility: ul.ec Synopsis: Unload a select set to a disk file(s) in a portable binary file format or load such a file into an insert statement. CLOB support still needs to be done along with UDT, collections, multisets, etc. Author(s): Art S. Kagel & Art Taylor IDS Version(s) supported: 5.xx, 6.0x, 7.xx, 9.xx, 10.00, 11.xx (except UDTs) Revision: 1.57 File(s): ul.ec Comments: Naming the executable 'bload' or 'bunload' (like the bload.ec ESQL/C code example) defaults to -l or -u respectively. The makefile's install target will install ul and link it to both bload and bunload. Release Notes: Revision 1.57 Fixed detection of HPUX YET AGAIN! Revision 1.56 Fixed location of inet.h on HPUX Revision 1.55 Update copyright. Revision 1.54 Added support for NCHAR and NVARCHAR type columns. Thanks to Aleksander Kamenik for pointing out the omission. Revision 1.53 Added new option -R which begins all transactions with the WITHOUT REPLICATION clause which prevents the operation from being replicated via Enterprise Replication. The option is ignored in unload mode (-u). Thanks to Øyvind Gjerstad for the suggestion. Revisions 1.51 & 1.52 Update the copywrite statement and document the -N option. Revisions 1.49 & 1.50 Moved status printouts to stderr. Implemented "-f -" for reading or writing from/to stdin/stdout so ul.ec can be used as a filter. Added support for bigint (int8 not quite right yet). Added -N option to export in native byte order rather than network byte order. Note: The default file format is compatible with external tables defined as FORMAT 'INFORMIX'. Revision 1.48 Fixed file size handling to allow files larger than 2GB. Fixed handling of BOOLEAN. Fixed a bug in DATETIME handling as string. Improved help. Fixed variable character default to handling as STRING to eliminate soft trailing spaces. Revision 1.47 Replaced all str*cpy's in the getopt loop with snprintf for added security. Revision 1.46 Tried to fix the strlower macro for non-gnu compilers. Revision 1.45 Made to work for mixed case table name arguments when DELIMIDENT is disabled. Revision 1.44 fixed problems compiling with older SDK and esql/C versions. Revisions 1.41-1.43 make the code safe to compile and use in 64bit environments. Fixed a bug in handling DECIMAL column data. New -F option to process LVARCHAR columns as FIXCHAR the same as CHAR and VARCHAR are already handled. Optional because it causes LVARCHARS to be padded in the database to maximum length. Revision 1.40 add support for LVARCHAR, INT8, BIGINT, SERIAL8 and BIGSERIAL. Also added a new option -F to optionally export LVARCHAR columns as FIXCHAR to support binary data embedded in LVARCHAR. Known problems: The compatibility mode supports an old bug in the original version and is only interesting for Bloomberg users needing to emulate that version's input/output files. There is a UNIX Text Utilities filter, ul, that underlines a text stream so the naming of this utility is unfortunate. Maybe bload is a better name. If typing 'man ...' gets you ul's help text you need to rename it. When linking ul.ec on most System V derived UNIX systems you will need to include libgen.a (-lgen). This is not true on most BSD derived UNIX versions such as AIX, FreeBSD, and Linux as the contents of System V's libgen are in libc instead on these systems. Future: Maybe support for more UDTs and complex types. ---------------------------------------------------------------------------- Utility: dbcopy.ec Synopsis: Select data from one database/table and insert into another. Uses separate connections for FETCHing and INSERTing so the source and target can be local, remote, and even have different logging modes. Author(s): Art S. Kagel Version(s) supported: ESQL 7.2x, Client SDK 2.xx, OL 5.xx, IDS 7.xx Revision: 1.90 File(s): dbcopy.ec Comments: This is fast and low overhead. I have been able to run over 40 copies on a 32 processor box with production programs running concurrently and still gotten incremental increases in throughput from the Nth copy. IMPORTANT: It has recently come to my attention that using dbcopy to copy a table with more than one BYTE or TEXT column will cause data corruption. I have not yet made it safe for this use. Also, there is a bug in the CSDK versions after some early 3.50 releases that will report an error -1831 if you try to copy a table with LVARCHAR columns (used to work fine). As of CSDK v4.10xC2 (the version included with v12.10.xC2 of the engine) this is not yet fixed. In either of these cases, one should use the new dbmove utility now included instead of dbcopy as it does not suffer from either of these problems. It will be a bit slower than dbcopy, but provides all of the other benefits like using small transactions to minimize the chance of long transaction rollbacks. Release Notes: Revision 1.88 - 1.90 Fixed some compile time warnings seen on HPUX. Updated the copyright notice. Revision 1.87 Fixed detection of HPUX YET AGAIN! Revision 1.86 Added #define of atoll() to strtoll() on HPUX. Revision 1.85 Added code to make sure this will work as expected with compilers/engines prior to x.70.xC6! Revision 1.84 Fixed unnecessary flushes and commits in block flush mode. Looks like big buffers are working on the PUT buffer side! Revision 1.83 Got big buffer support for IDS 11.70.FC6/CSDK 3.70.FC6 and later working somewhat. Revision 1.82 Added -E maxerrs option to control the maximum number of Errors permitted before dbcopy aborts. Revision 1.81 Updated copyright. Revision 1.80 Fixed WITHOUT REPLICATION code. Added -O to override the restriction against copying a table into itself (really bad idea, but caviat emptor). Revision 1.79 Added new option -R which begins all transactions with the WITHOUT REPLICATION clause which prevents the operation from being replicated via Enterprise Replication. Thanks to Øyvind Gjerstad for the suggestion. Revision 1.78 Fixes a missing #ifdef that caused a compile time problem for ESQL/C versions earlier than 3.50. Revision 1.77 updated the copyright notice again. Revisions 1.73-1.76 Fixed a bug in processing DECIMAL/MONEY type columns and tracing/dumping values for BIGINT/BIGSERIAL and INT8/SERIAL8 columns when reporting errors or debugging. Cleaned up some debugging trace duplication. Revision 1.72 Fixed a variable declaration that causes compile time problems on some platforms. Revision 1.71 Updates the copyright notice. Revisions 1.65-1.70 Fix DATETIME and INTERVAL handling problems with wide data rows. Also fixed a problem with -W and -b causing SEGV if -W is invoked without -b or with -b and a buffer size larger than 65151 (docs say this should work to 2^32-1). Reduced default and max values. Thanks to Jonathan Leffler for pitching in on the old DATETIME problem and for patching the code. Jonathan also cleaned up some compile time warnings. Revision 1.64 Fixed LVARCHAR again. The ifdef test protecting older compilers was backwards. Revision 1.63 Fixed handling of BOOLEAN columns. Also improved version detection for compile time handling of BIGINT, INT8, BOOLEAN, etc. Revision 1.62 Fixed compatibility with older ESQL/C compilers. Revision 1.60 and 1.61 Added support for BigFetBufSize to allow fetching more than 32K of data at a time. Default set to 64K if new -W option is passed. New option -b will allow sizing the expanded fetch buffer between 32767 and 4,194,303, default 64K. Revision 1.56-1.59 make the code now safe to compile and use on 64bit systems. New -B option to save error rows to a binary format that can be reloaded using the ul.ec utility - needed if binary or non-printable data is contained in CHAR/VARCHAR/LVACHAR cols. New -e option to control binary/fixed format copying of CHAR, VARCHAR, and LVARCHAR columns. Added support for INT8/SERIAL8 & BIGINT/BIGSERIAL column types. Option -L is now deprecated in favor of '-e varchar'. Revision 1.55 fixed default wait mode to not wait and fixed entry of zero to no wait. Revision 1.54 fixed a typo. Made -I option backward compatible with CSDK versions prior to 3.00 which do not support the READ COMMITTED isolation mode option. Revision 1.53 made some intermediate data type changes. Revision 1.52 expands the size of supported insert and select queries from 3k to 100k. Permanently made -I compatible with SDK versions prior to v3.00 and still support this IDS 11.10 server feature. Changed code to use snprintf for most copies to avoid memory overruns. Revision 1.50 adds support for the new IDS 11.10 isolation mode COMMITTED READ LAST COMMITTED with the new -I option. Revision 1.48 & 1.49 expands the -p to give the user complete control over PDQPRIORITY (was mapping the supplied argument to values in increments of 10 and did not support zero). Fixed -w to support NOT WAIT when the argument is zero (0). Revisions 1.46 & 1.47 fix some errant type casts in diagnostic routines which are not normally executed, but which prevent compilation on some platforms. Revision 1.45 fixes a bug in using secured connections (ie w/username and password). Revision 1.44 cleaned up the Usage and expanded an error message. Revision 1.43 added -P & -U as alternatives to the environment variables to enter username and passwords. Added -a to cause dbcopy to acquire an exclusive lock on the target table before copying data. Revision 1.42 adds support for the environment variables INFORMIXUSER and INFORMIXPASS to simplify copying between hosts that are not trusted. Revision 1.39 fixes a problem with error code reporting in 64 bit compiles. Revision 1.40 is cosmetic. Revision 1.35 fixed a problem with using INFORMIXSERVER if -h/-H not provided. Revision 1.36 fixed the omission of CVCHARTYPE from dumprec() the error logging function. Thanks to Yvind Gjerstad for picking that up. While in there I decided CVCHARTYPE and CFIXCHAR should not have trailing spaces stripped in the log, but normal CCHARTYPE should. However, if using CHAR columns to pack binary data (ex: as a cheap BLOB) you do not want to strip. So default is to continue to treat CHAR columns as FIXCHAR but the new -L option will change that to use CCHARTYPE instead if the user knows there's no binary in the CHAR cols of the table being copied. Revisions 1.37 & 1.38 update the usage and copyright notice. Version 1.33 makes the code safe to use with IDS 9.xx long object names fixes some cut-and-paste born oddities in the source, and fixes a potential memory overwrite bug. Version 1.34 just updates the copyright statement. Revision 1.32 improved the -? and no args usage messages. Also updated the copyright information. Protected _H_LOCALEDEF from multiple definition (see notes on myschema.ec above). Fixed a compiler dependent warning. Revision 1.31 just cleaned up the RCS revision log. Revision 1.30 adds support for 9.21 data types and international character types and VARCHAR support was fixed.. Support added for INTEGER8, SERIAL8, BOOLEAN, VARCHAR, NCHAR, NVARCHAR, and LVARCHAR. Known problems: BLOB columns are output to the error log file using raw I/O so that the file cannot be used with dbload or dbaccess->LOAD to reload an edited and corrected log file. DATETIME and INTERVAL columns are represented internally as type string due to code to work around an old ESQL/C library bug. This has never been removed and MAY slightly affect throughput. Need to port the fix from ul.ec to dbcopy.ec. There seems to be some problem using dbcopy to copy from 7.3x to 9.xx. Investigating, but any help or insight is appreciated. ---------------------------------------------------------------------------- Utility: listdb5.ec Synopsis: Simple program that uses an undocumented library function to list all of the databases on an instance. Author(s): Art Taylor, updated by Art S. Kagel Version(s) supported: 5.xx, 6.0x, 7.xx Revision: 1.5 File(s): listdb5.ec Comments: Note that the problems the previous version had with R7.xx databases has been resolved. The code is now sufficiently dynamic to handle larger servers which, it turns out, was the real problem. The code will now handle up to 500 databases, controlled by the #define DB_MAX. FYI as of IDS Ver 7.30 and SDK 2.10 the library call which this uses has been documented in the ESQL/C manual and so this version has a future. Release Notes: Revision 1.5 Fixed some compile time warnings seen on HPUX. Revision 1.4 Updated copyright. Revision 1.3 cleans up the runtime interface, adds a usage option (-?) and a Version option (-V) which includes copyright information. ---------------------------------------------------------------------------- Utility: listdb7.ec Synopsis: Enhanced version of listdb5.ec that uses the SMI and system tables. Lists databases and optionally their tables. An option prints additional information such as dbspace, owner, logging mode, create date, and NLS status for databases and similar information for tables/fragments/detached indexes. Author(s): Art S. Kagel Version(s) supported: 7.xx, 9.xx Revision: 1.23 File(s): listdb7.ec Comments: Great for tracking down which databases/tables reside in what dbspaces or for a quick table extent report. By specifying -d'*' and -ttablename you can search all databases for a specific tablename. Linking with GNU getopt() improves usability and is now automatic. Release Notes: Revision 1.22 & 1.23: Fixed some compile time warnings. Revision 1.21 Updated copyright. Revision 1.20 Fixed compilation problem in getopt.c on Linux. Thanks to Jim Kennedy for pressing the issue until I found it. Also made including my getopt.h file unconditional since it's needed everywhere except Linux and harmless there. Updated the copyright notice to 2011. Revisions 1.18 - 1.19 fix a problem reporting extent information for the last table listed for each database. Revision 1.17 resolved problems compiling on Linux due to missing prototypes in strings.h that are in string.h instead. Revision 1.16 added an error message if the selected database does not exist. Previous versions were silent. Revisions 1.12 - 1.15 add an extent report if -D and -t are specified. Also made -t work correctly with or without GNU getopt. If linking with GNU getopt add -DHAVE_GNU_GETOPT=1 to the compiler commandline. Commandline syntax for -t differs depending on which getopt you are using but the Usage printout is adjusted accordingly. Revision 1.11 adds a -V option to print version and copyright info. Revision 1.10 added long name support. Revision 1.9 extends the portability fix in 1.8 to table level calculations also. Revision 1.8 replaces bit field code for determining dbspace numbers with division by 0x100000. The bit fields do not mapp properly on Intel compilers. ---------------------------------------------------------------------------- File getopt.c/getopt.h: Updated to port better. ---------------------------------------------------------------------------- dbstruct.ec Produce a C or ESQL/C structure to match an IDS database table (or all tables. Revision: 1.22 Revision Notes: Revision 1.22: Adds new features. There are now options to ignore shadow columns from ERKEY (-k), VERCOLS (-v), and REPLCHECK (-r) when building the structures. These are included by default. Revision 1.21: Fixed some compile time warnings seen on HPUX. Updated the copyright notice. Revision 1.20 Fixes support for longer object names introduced in 9.21 Revision 1.19 Updated copyright. Revision 1.18 Fixed compile time problem on AIX. Revision 1.17 Fixed output bug introduced with 4GL support. Revision 1.16 Updated the copyright notice to 2011. Revision 1.15 Added -G to generate 4GL RECORDs Revision 1.14 Added support for external tables and synonyms. Revision 1.13 Fixed a missing type in a static declaration. Some C Compilers let this pass and assume 'int' others complain. Revision 1.12 Fixed compatibility with older ESQL/C compilers. Revision 1.11 Syntax fix. Revision 1.09 & 1.10 Made to work for mixed case table name arguments when DELIMIDENT is disabled. ---------------------------------------------------------------------------- sqlstruct.ec Produce a C or ESQL/C structure to match the results of an SQL statement. For statements that take replaceable parameters, input and or output structures are produced as appropriate. Revision: 1.38 Revision Notes: Revision 1.38 Added -S - generate SQL schema and -T - generate SQL temp table schema. Revision 1.37 Fixes support for longer object names introduced in 9.21 Revision 1.36 Updated copyright. Revision 1.35 Fixed compile time problem on AIX. Revision 1.34 Added -G to generate 4GL RECORDs Revision 1.33 Updated the copyright notice to 2011. Revision 1.29-1.32 Fixed main loop exit and end of input detection. Fixed compile time warning on some platforms. Revision 1.28 Fixed inclusion of getopt.h to use my version of the file which is portable and consistent with my getopt.c ---------------------------------------------------------------------------- dbscript.ec Generate a specified command line for each specified table. Revision: 1.8 Revision Notes: Revision 1.8 Cosmetic. Revision 1.7 Cleared some more compile time warnings. Revisions 1.5 - 1.6 Fixed some compile time warnings seen on HPUX. Updated copyright statement. Revision 1.4 Fixes support for longer object names introduced in 9.21 Revision 1.3 Added support for the -i & -x options from dostats_ng Revision 1.2 Added copyright. Revision 1.1 Initial version. It works! ---------------------------------------------------------------------------- dbsavail.ec Printout total space and available space by dbspace name with total. Creates a stored procedure, dbsavail() to do most work and you can execute that directly also to see the report. Author(s): Art S. Kagel Version(s) supported: 10.xx, 11,xx++ File(s): dbsavail.ec Revision: 1.15 Revision Notes: Revision 1.15 Added new option -u to report used KB instead of total KB. Will work reasonably with -p as well reporting %used and %free. Revision 1.14 expanded dbspace name printouts to the full128 characters. Revision 1.13 Fixed KB calculations once and for all time! Procedure version updated to 3.0. Revisions 1.11 * 1.12: New option (-p) to print percent freed instead of KB Free - procedure returns both. Fixed compile time warnings on HPUX & AIX. Updated the copyright notice. Updated the procedure version to 2.0. Revision 1.10 Fixed rcs tags. Revision 1.9 Fixed KB calculations. Updated procedure to v1.5. Revision 1.8 Added Copyright notice. Revision 1.7 Fixes an intermittent SEGV at runtime. Revision 1.6 Added support for correctly reporting when an SBSpace is a temp SBSpace. Revision 1.5 Added support for properly reporting SBSpaces. Fixed blobspace pagesize reporting for v10.00+. Fixed SPL routine management to automatically install newer version if an older one exists. Moved from utils_ak package to utils2_ak package. Revision 1.4 Improved support for IDS v10.00+ by adding pagesize and report columns by KB in addition to pages. Comments: There is a shell/perl script version of this included in the utils_ak package also which works on 5.0x. Since the script is based on onstat/tbstat it is only up to date as of the last time the reserved pages were flushed. This version has not been tested against 7.xx or 9.xx servers. Users of 7.xx and 9.xx may need to use the older version of dbsavail.ec also included in the utils_ak package. ---------------------------------------------------------------------------- dbmove.ec - New data copy utility. Dbmove uses the same algorithm as dbdelete to copy data quickly in blocks. It is restartable as it prints out the last source table rowid that was sent to the target table and committed as it goes. An option permits one to specify the starting rowid to process in follow up runs. Dbmove was written to handle situations that dbcopy cannot such as multiple blob columns in a table and smartblob columns. It will also process LVARCHAR columns which are causing problems for dbcopy due to a bug in the CSDK since an early 3.50 release. An option lets you control how many rows are committed at a time by limiting the size of the INSERT statement to minimize lock usage and the possibility of long transaction rollbacks. Revision: 1.10 Revision Notes: Revision 1.10: Fixed usage description of -r. Revision 1.9: Cleaned up some compile time warnings. Revision 1.8: Added options (-c & -C) to allow specification of a list of columns for both the select statement projection list and the insert statement column list. Fixed -d/-D, -t/-T, & -h/-H to reasonably default if not specified. Revision 1.7: Lots of code cleanup of legacy dbdelete code that's not needed here. Cleaned up trace and enforced -S better. More cleanup of the Usage display. Revision 1.6: Removed some legacy dbdelete code and cleaned up the usage again. Revision 1.5: Fixed a spurious error message and added end-of-processing trace. Revision 1.4: Stripped out unneeded code. Improved run time traces. Eliminated redundant commits and begins. Revision 1.3: Added commit after each INSERT to minimize rollbacks. May make that an option at some point. Revision 1.2 is the first release.