LinuxTag 2003: Kaj on MySQL and SAP DB

Just attended Kaj Arnö’s talk MySQL, SAP and the Enterprise. Kay explained the development process of merging SAP DB and MySQL. For the mediate future, a proxy will be integrated in the SAP DB client, which allows MySQL users to manage SAP DB via the MySQL clients like mysql, mysqldump, mysqlimport. In the long run, functionality will be added to MySQL that covers the functionality already provided by SAP DB (e.g. stored procedures, triggers, standardized error behaviour, …). At the end of this process, the “MySQL Enterprise” edition (this is not the official, but the working name) will incorporate the best from both worlds: MySQL robustness, ease of use, and SAP DB enterprise functionality.

It’s also good news that all the nice DB management GUIs available for SAP DB will then also work with MySQL.

UPDATE: MySQL has branded SAP DB MaxDB

MySQL: INSERT … SELECT with Same Table

The latest release MySQL 4.0.14 introduced a neat new feature:

[snip]
Enabled `INSERT’ from `SELECT’ when the table into which the records are inserted is also a table listed in the `SELECT’.
[/snip]

This means you can now issue a statement like

INSERT INTO table ( field ) SELECT field FROM table WHERE field = “data”;

which copies all records meeting the specified criteria to the same table.

The MySQL manual only states the behaviour previous to 4.0.14:

[snip]
The target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. (The problem is that the SELECT possibly would find records that were inserted earlier during the same run. When using subquery clauses, the situation could easily be very confusing.)
[/snip]