- Main remarks
- Required versions
- Using WLanguage commands in the SQL queries
- Limitations of MariaDB version 3.23x
- Managing huge files
- INSERT queries and automatic identifier
- Creating a table with HCreation
- Support for Unicode
- Connection with SSL certificates
- Main specific features
- Locking records
- Identical records
- SET or ENUM items
- xBlob items
- Array items
- Using INSERT/UPDATE queries to insert text into a LONGBLOB item (binary memo) on MariaDB
- Partial indexing of memos and full-text indexing
- Specific features for the HFSQL functions and SQL functions
Native MariaDB Connector: Specific features and remarks
Available only with this kind of connection
The following paragraphs present the main remarks and the specific features of Native MariaDB Connector (also called Native MariaDB Access).
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Caution: This version of Native MariaDB Connector operates with:
- WINDEV 26 or WEBDEV 26.
- Client layer of MariaDB (LibMariaDB.DLL file):
- 32-bit client layer to use the 32-bit Native MariaDB Connector (version 3.x to 5.x checked).
- 64-bit client layer to use the 64-bit Native MariaDB Connector (version 5.x checked).
Using WLanguage commands in the SQL queries
The WLanguage commands cannot be used in the SQL queries.
Limitations of MariaDB version 3.23x
The MariaDB database version 3.23x does not support:
- the Partial Fetch. The use of Partial Fetch with the SQL functions of WLanguage has the same effect as if no Partial Fetch was used.
- the Unions.
When handling huge files, all the records are loaded in memory. To reduce memory usage, it is recommended to:
- use a filter (HFilter) before initializing a browse (HReadFirst/HReadLast, ...).
- use queries whose selection conditions are selective enough.
- avoid performing searches.
INSERT queries and automatic identifier
The automatic identifiers are not supported by the INSERT queries (created by programming or in the query editor). To use an automatic identifier, call HAdd
on the table.
Creating a table with HCreation
When Unicode is supported on the connection (default mode),
the text items of the queries run with the hQueryWithoutCorrection
constant are in Unicode format. If a Unicode string is assigned to an Ansi string, the conversion is automatically performed by WINDEV and WEBDEV by using the character set defined with ChangeCharset
If the connection is ANSI
("WD Unicode Support = 0" in the extended information specified by HDescribeConnection
), the text items of the queries run with the hQueryWithoutCorrection
constant are in ANSI format.
Connection with SSL certificates
To establish a connection with SSL certificate, you must:
- Install a version of the MariaDB server that supports the SSL connections. See the MariaDB documentation for more details.
- Create the necessary certificates.
- Establish a connection by using the following keywords in the advanced information of the connection :
|SSL Key||Path of key file.|
|SSL Cert||Path of certificate file.|
|SSL CA||Path of certification authority file.|
|SSL CAPath||Path of the directory containing the certificates of the recognized SLL certification authorities, in PEM format.|
|SSL Cipher||List of authorized ciphers.|
Example of SSL connection on the CRM database of the mariadbserver.domain.fr server:
MyConnection is Connection
// Describe the connection
MyConnection.User = "root"
MyConnection.Password = "secret"
MyConnection.Server = "mariadbserver.domain.fr"
MyConnection.Database = "CRM"
MyConnection.Provider = hNativeAccessMariaDB
MyConnection.Access = hOReadWrite
// Describe the extended information for an SSL connection
MyConnection.ExtendedInfo = [
SSL KEY = E:\MySSLCertificates\mariadb.key;
SSL CERT = E:\MySSLCertificates\mariadb_cert.pem;
SSL CA = E:\MySSLCertificates\ca-cert.pem;
SSL CAPATH = E:\MySSLCertificates\CA\
// Open the connection
Remark: These parameters correspond to the parameters of the mysql_ssl_set function of the C API for accessing MariaDB.
The lock options (hLockWrite and hLockReadWrite constants) that can be used with HFSQL functions are not supported in this version.
The Native MariaDB Connector cannot differentiate between two identical records (which means with identical values for all items, excluding memo items).
When a record is modified or deleted, all the identical records will be modified or deleted.
To manage the transactions, you must use a type of MariaDB table that supports the BEGIN, COMMIT and ROLLBACK commands.
SET or ENUM items
The SET and ENUM items are automatically processed and imported as text memo in WINDEV and WEBDEV. Indeed, the SET and ENUM items have no equivalence in HFSQL. They contain numeric values (subscripts) that correspond to "text" values. These are the "text" values that are imported.
The xBlob items in MariaDB are automatically processed and imported as text memo in WINDEV and WEBDEV:
- the BLOB items are imported as binary memo items.
- the LONGTEXT items are imported as text memo items.
The array items are not supported by the Native Connector. If you are using an array item, only the value of subscript 1 in the array will be handled by the HFSQL functions (in read/write).
Using INSERT/UPDATE queries to insert text into a LONGBLOB item (binary memo) on MariaDB
To allow the management of Unicode items, the connections of Native MariaDB Connector are opened in UTF8: all the requests and the data are exchanged in UTF8 with the server.
The server converts the request and the values into the charset corresponding to each column, except for a LONGBLOB item (binary memo): in this case, the value is inserted as it is.
For a LONGBLOB item:
- if the connection is in ANSI format, the inserted text value is in ANSI format.
- if the connection is in UTF8 format, the inserted text value is in UTF8 format; in this case, a compatibility problem may occur.
To avoid this conversion problem in UTF8, you can:
Partial indexing of memos and full-text indexing
The partial indexing of memos as well as the full-text indexing are not taken into account:
- when importing MariaDB tables into the analysis.
- when using HCreation.
If these features are defined in the analysis, they will be taken into account when running the SQL queries (with the hQueryWithoutCorrection constant) that use the SQL "CREATE TABLE" and "MATCH AGAINST" functions.
Specific features for the HFSQL functions and SQL functions
The specific features for using the HFSQL functions and the SQL functions with Native MariaDB Connector are as follows:
|Specific features||Affected functions|
|Multi-file query: |
HAdd, HModify and HDelete are not supported.
|The searches performed on some complex queries with HReadSeek* may fail in this version. |
This problem will be fixed in a forthcoming version.
|HReadSeek, HReadSeekFirst, HReadSeekLast|
|When using Native MariaDB Connector, you must specify the "DataBase" used.|
If you are using HConnect, the "DataBase" must be specified in the additional information as follows:
"initial catalog = DataBaseName"
|When creating tables with HCreation, the table names must contain no accented character (example: "ÉlanFile").|
This is a problem specific to MariaDB (checked on versions 3.23.52-max-nt and 3.23.47-max-nt of the MariaDB server). Running the SQL "DROP TABLE" command, performed by HCreation to delete the table if it already exists, may cause an unexpected stop of the MariaDB server.
See Native MariaDB Connector: Specific features for more details.
This page is also available for…
Click [Add] to post a comment