Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Navigation: ASQL > Miscellaneous Topics

Development Notes

Scroll Prev Top Next More

ASQL Development Notes 01-May-2023

Current Connector Version

MySQL

ODBC

 

1.6.147

1.6.120

 

Version change from 1.5 to 1.6 to reflect new SQLOP_FETCH_GRID opcode, requires A-Shell 6.5.1730+; updated Windows toolset.

Support SQLOP_FETCH_GRID

Support FETCHR_ROWMAP (in SQLOP_FETCH_ROW)

Support FETCH_NULLS (in SQLOP_FETCH_ROW and SQLOP_FETCH_GRID)

 

ASQL Development Notes 15-May-2022

Current Connector Version

MySQL

ODBC

 

1.5.145

1.5.117

 

Version change from 1.4 to 1.5 to reflect compatibility change with A-Shell 6.5.1712+ and Windows toolset / library updates.

(ODBC) Close loophole where NULL fields were failing to clear the target var in SQLOP_FETCH_ROW

(ODBC) Improve support for nvarchar and nvarchar(max); (max) option now treated as (4096)

(ODBC) Fix bad results when retrieving individual fields longer than 255 bytes into dynamic strings.

(ODBC) Fix FETCHR_ARRAY bug (elements were shifted over by 1)

 

ASQL Development Notes 06-May-2018

Current Connector Version

MySQL

ODBC

 

1.4.143

1.4.112

 

Fix problems with retrieval of individual floating point fields in A-Shell 6.5.1628+, required due to changes to the XCALL parameter passing mechanism.)

Both connectors now support up to 1020 individual fields in the SQLOP_FETCH_ROW FETCHR_FIELDS operation. Previous limits were 125 for the MySQL connector and 32 for the ODBC connector.

ODBC connector now returns the # of columns in the info1 field after an SQLOP_QUERY query operation , making it equivalent to the MySQL connector behavior.

 

ASQL Development Notes 15-Feb-2018

Current Connector Version

MySQL

ODBC

 

1.4.142

1.4.111

 

SQLOP_FETCH_ROW now supports fetching a row into an ordmap:

dimx $rowmap, ordmap(varstr;varx)

...

cmdhdr.opflags = FETCHR_ROWMAP

xcall SQL, SQLOP_FETCH_ROW, cmdhdr, $rowmap()

foreach $$i in $rowmap()

    ? "Column name: ";.key($$i);", value: ";$$i

next $$i

 

Requirements / Comments

Requires libashmysql library 1.4.142+
Related opflags added to SQL.DEF:

Symbol

Value

Description

FETCHR_ROWMAP  

&h0010

Return row as an ordmap

FETCHR_ORGNAME

&h0020

Add to use org_name instead of name for key

FETCHR_TBLNAME

&h0040

Add to prefix name with table name

 

If a column name is blank, possibly because it is an expression, a name will be generated of the form "expr-#" (1,2,3...)
The ordmap(varstr;varx) format will handle any field type. Text fields will appear as they are stored in the database. Numeric and other formatted field types will be converted to the standard display representation, the same as for the FETCHR_ROWSTR and FETCHR_ARRAY formats. BLOB fields will be encoded, and automatically decoded when assigned to a suitable variable type.

 

ASQL Development Notes 02-May-2017

Current Connector Version

MySQL

ODBC

 

1.4.141

1.4.111

 

Further restructuring of ODBC connector to allow for 64 bit compatibility, motivated by the Microsoft Linux ODBC interface which is 64-bit only. Updated connector passes basic tests but requires A-Shell 64 version which is not available for release.

 

ASQL Development Notes 28-Apr-2017

Current Connector Version

MySQL

ODBC

 

1.4.141

1.4.110

 

Update to link with MySQL Connector/C (LIBMYSQL.DLL) version 6.1.9 (matching up with MySQL Server release 5.7)

Restructuring of Linux ODBC connector for compatibility with A-Shell 6.4 and unixODBC.

 

ASQL Development Notes 19-Jun-2015

Current Connector Version

MySQL

ODBC

 

1.4.140

1.4.109

 

Support new mode 3 decryption for connection credentials (ODBC)

Add opcode SQLOP_DISCONNECT_ALL (MySQL)

SQLCONF_TRACE flag now picked up on SQLOP_INIT_CONN (MySQL)

Connect string parsing more robust (MySQL)

 

ASQL Development Notes 26-Jun-2014

Current Connector Version

MySQL

ODBC

 

1.4.139

1.4.108

 

Support new mode 3 decryption for connection credentials (MySQL)

Improved tracing (MySQL)

 

ASQL Development Notes 09-May-2013

Current Connector Version

MySQL

ODBC

 

1.4.138

1.4.108

 

Several improvements and cleanups to the tracing.

Work around corruption issue with certain SQLOP_FETCH_COLUMNS scenarios under Linux.

Fix invalid handle issue related to closing/reopeing the library.

 

ASQL Development Notes 20-Jan-2012

Current Connector Version

MySQL

ODBC

 

1.4.132

1.4.108

 

Return ASQLERR_CLOSELIB after SQLOP_CLOSE_LIB so caller can free the lib.

Implement tracing (to ashlog.log) via SQLCONF_TRACE flag in SQLOP_INIT_LIB.

Return SQLERR_NESTIGNORE on nested close.

Return SQLERR_TOOMANYRESHDLS if limit exceeded when requesting new handle.

 

ASQL Development Notes 08-Nov-2010

Current Connector Version

MySQL

ODBC

 

1.4.129

1.4.108

 

Support reshdl = -1 in SQLOP_QUERY to request a new result set.

 

ASQL Development Notes 28-Oct-2010

Current Connector Version

MySQL

ODBC

 

1.4.128

1.4.108

 

Fix bug returning "0" instead of "" in field-level fetch of null varchar field.

Implement SQLINFO_AUTOINCID opflag for SQLOP_GET_INFO

Ignore nested library opens (SQLOP_INIT_LIB) and closes (SQLOP_CLOSE_LIB)

 

ASQL Development Notes 10-Sep-2010

Current Connector Version

MySQL

ODBC

 

1.4.123

1.4.108

 

Maintain separate sets of field definitions for each result set and remove the 32 field-per-result-set limitation.

Support prepared statements via new opcodes:

Symbol

Value

SQLOP_PST_PREPARE

20

SQLOP_PST_BIND

21

SQLOP_PST_EXECUTE

22

SQLOP_PST_FREE

23

 

Add field psthdl to the CMDHDR structure to allow application to create and reference individual prepared statements.

Maximum number of result set handles (default 16) and prepared statements (default 32) can now be set by putting the desired maximum into the reshdl and/or psthdl fields of the CMDHDR structure on the SQLOP_INIT_LIB call.

 

ASQL Development Notes 17-Aug-2010

Current Connector Version

MySQL

ODBC

 

1.4.120

1.4.108

 

Support 16 result sets per connection. Added field reshdl to the CMDHDR structure to allow applicatio to specify which result set to use.

 

ASQL Development Notes 9-Dec-2009

Current Connector Version

MySQL

ODBC

 

1.4.118

1.4.108

 

[No changes to connectors - minor changes to SQL: sample and dev files]:

New fnsqlquote.bsi contains Fn'SQL'Quote$() function useful for quoting and escaping fields.  It supports /C:DYNVARS=1 option (see below).

Update Fn'SQL'ErrMsg$() to support /C:DYNVARS=1 and if not, to increase length to 400 (some verbose messages were getting truncated)

XTRSQ1.SBX recompiled to be compatible with the 1.3 connectors. Also, add trace messages every second during the fetch rows operation; this is useful when fetching a lot of rows or when on a slow network.

SQLTEST4 updated to use the Fn'SQL'Quote$() function when inserting.

SQLCON.SBX fixed to avoid problem with it auto-selecting the CONNECT option immediately (related to a recent EVENTWAIT update in A-Shell).

 

ASQL Development Notes 14-Oct-2009

Current Connector Version

MySQL

ODBC

 

1.4.118

1.4.108

 

Host and user fields in connection string may now be encrypted, along with password.  (Use MX_PWCRYPT to encrypt them.)

ASQL Development Notes 10-Oct-2009

Current Connector Version

MySQL

ODBC

 

1.4.117

1.4.107

 

Connector interface changed to support changes in A-Shell 5.1.1160 for dynamic variables. Connector/A-Shell version mismatch likely to just cause a GPF or segmentation fault.

SQLTEST2 and SQLTEST4 support/illustrate use of dynamic variables (particularly convenient in SQLOP_FETCH_ROW).  Note: you must compile the test programs with /C:DYNVARS=1 to use the dynamic variable version.

SQLTEST4 illustrates use of escaping with string fields.

 

ASQL Development Notes 27-Apr-2009

Current Connector Version

MySQL

ODBC

 

1.4.114

1.4.104

 

First release of ODBC connector

 

ASQL Development Notes 12-Mar-2009

Current Connector Version

MySQL

 

1.4.110

 

Include SCRSTS.SBX in the zip (needed by SQRY1 but apparently some A-Shell installations don't already have it installed in BAS:).

 

ASQL Development Notes 11-Mar-2009

Current Connector Version

MySQL

 

1.4.110

 

New SQLTEST3 sample showing QRYF_NOSTORE operation

 

ASQL Development Notes 03-Mar-2009

Current Connector Version

MySQL

 

1.4.110

 

New SQLOP_GET_INFO variations: SQLINFO_CONID, SQLINFO_CONVER and SQLINFO_CONDESCR to retrieve the connector ID (module name), version and description.  See SQLTEST1 for an example, update doc for details.
Documentation updated.
Windows connector renamed from ASHMYSQL.DLL to LIBASHMYSQL.DLL so as to have same base name as Linux version.
Introduce new SQLTEST1.RUN/BP test program to verify that connector and library can be loaded.
Rename old SQL3 program OT SQLTEST2.RUN/BP
dbmsid member of CMDHDR structure now called dbmsconid (DBMS Connector ID) since that is slightly more precise.  (In the future, there could be more than one connector for a given database, and there could be more than one database sharing a connector.)  SQL.DEF, however, continues to define the old name as an overlay so as to not break any existing programs.
DBMSID_MYSQL symbol changed to DBMSCONID_MYSQL (see previous item).
Source programs now load SQL.DEF and the FNSQL*.BSI modules from SQL:, eliminating the need to copy files anywhere (except, perhaps ASHELL.DEF) when unzipping SQLTST##.ZIP into the SQL: directory.