Jump to content

KDb/Drivers/MySQL

From KDE Community Wiki

MySQL database driver. By design it must work with MariaDB.

Old wiki page: [1] (TODO: migrate here)

Status: published, stable, maintained

Notes

The Server SQL Mode

From the docs: The MySQL server can operate in different SQL modes, and (as of MySQL 4.1) can apply these modes different for different clients. This allows an application to tailor server operation to its own requirements.

Modes define what SQL syntax MySQL should support and what kind of data validation checks it should perform. This makes it easier to use MySQL in different environments and to use MySQL together with other database servers. [2]

Idea: we can use SQL modes to be able to use syntax not available in MySQL by default. This prevents a requirement of generating different SQL statements for MySQL compared to other backends.

For example, after setting:

SET SQL_MODE=PIPES_AS_CONCAT

We're able to use || concatenation operator (as in PostgreSQL and SQLite) instead of CONCAT() function.

Problem: Note that some of these modes work for MySQL 4.0 and above, some other for 4.1 or even 5.0. Thus we may need to use version information to know what modes are available. Then, what about older MySQL versions (<4.0)?

Trademarks

We're allowed to use MySQL logos on the web page and/or within KEXI. [3]