1
=========================
2
Notable MySQL Differences
3
=========================
5
Drizzle was forked from the (now defunct) MySQL 6.0 tree in 2008. Since then there have been a lot of changes. Drizzle is in some ways similar to MySQL, and in other ways, unrecognizable.
7
This section of documentation aims to explore some of the notable differences between MySQL and Drizzle, and has been modified from its original state on the Drizzle Wiki.
11
* There is no embedded server. The Drizzle Server is not loadable as a shared
13
* Drizzle is optimized for massively concurrent environments. If we have the
14
choice of improving performance for 1024 simultaneous connections to the
15
detriment of performance with only 64 connections, we will take that choice.
16
* It is designed for modern POSIX systems
17
* Microsoft Windows is not a supported platform (neither is HP-UX or IRIX).
18
* Drizzle doesn't use timezones. Everything is UTC.
23
* No scripts/mysql_install_db or similar. Drizzle aims for a "just works" installation, without administrative overhead.
24
* No system database that needs upgrading between versions.
25
* Drizzle can listen on the Drizzle port (4427) and/or MySQL port (3306)
26
and speak the respective protocols.
31
Drizzle is designed around the concept of being a microkernel. There should
32
be a small core of the server with most functionality being provided through
33
small, efficient and hard to misuse plugin interfaces. The goal is a small,
34
light weight kernel that is easy to maintain, understand and extend.
36
Drizzle is written in C++ and makes use of the Standard Template Library (STL)
37
and Boost. Only where performance or correctness proves to be inadequate will
38
we consider rolling our own; our preference is to fix the upstream library
44
Pluggable network protocols allow Drizzle to speak one (or more) of several
45
protocols. Currently we support the MySQL protocol (compatible with existing
46
MySQL client libraries) and the Drizzle protocol which is still under
49
The Drizzle protocol embodies several important differences from MySQL:
51
* Client sends first packet instead of server
53
* Multi statement support (without using a semicolon to separate them)
54
* Room for expansion to include NoSQL type commands inline with SQL.
56
There is also a console plugin -- instead of providing access over a network
57
socket, this plugin allows access from the current tty.
62
The existing plugin APIs that Drizzle inherited from MySQL have been reworked.
64
* User Defined Functions (UDFs) now follow the same API as a given
65
server instead of a different C API. This means that UDFs are on the
66
exact same level as built-in functions.
67
* Storage Engine API has had some parts extensively reworked, especially
68
around transactions and DDL.
69
* Logging is now pluggable
70
* Authentication is pluggable
71
* Replication is pluggable
72
* INFORMATION_SCHEMA plugins have been replaced by the function_engine, which
73
is a lot more space and time efficient.
74
* Network protocols are pluggable
75
* Scheduler is pluggable (multi_thread, pool_of_threads etc)
76
* Plugin points for manipulating rows before/after operations: used for
77
replication and the PBMS Blob Streaming plugin.
82
Drizzle does not currently have any plugins that implement stored procedures. We
83
viewed the implementation in MySQL to be non-optimal, bloating the parser
84
and only supporting one language (SQL2003 stored procedures), which was not
87
Fundamentally, stored procedures usually are not the correct architectural
88
decision for applications that need to scale. Pushing more computation down
89
into the database (which is the trickiest layer to scale) isn't a good idea.
91
We do recognize that the ability to reduce the time row locks are held
92
by using stored procedures is valuable, but think we can achieve the same
93
advantage by improved batching of commands over the wire instead of adding and
94
administering stored procedures to the list of things that can go wrong in
95
administering the database.
100
Drizzle does not currently have any plugin that provides SQL triggers. We
101
have some hooks for callbacks inside the server so that plugins can hook
102
into points that triggers could.
107
SQL Views are not currently supported in Drizzle. We believe they should be
108
implemented via a query rewrite plugin. See the `Query Rewrite Blueprint <https://blueprints.launchpad.net/Drizzle/+spec/query-rewrite>`_ on launchpad.
116
The INFORMATION_SCHEMA provides access to database metadata.
118
The INFORMATION_SCHEMA in Drizzle is strictly ANSI compliant. If you write
119
a query to any of the tables in the INFORMATION_SCHEMA in Drizzle, you can
120
directly run these on any other ANSI compliant system.
122
For information that does not fit into the standard, there is also the
123
DATA_DICTIONARY schema. Use of tables in DATA_DICTIONARY is non-portable.
125
This allows developers to easily know if the query is portable or not.
127
Authentication, Authorization and Access
128
----------------------------------------
130
Authentication lies in Drizzle plugins. Currently there are PAM and HTTP AUTH plugins for authentication.
131
Through the PAM plugin, you can use any PAM module (such as LDAP).
136
We've stopped the confusion: -p means port and -P means password.
138
No gotcha of using the unix socket when localhost is specified and then
139
connecting you to the wrong database server.
141
There is no Drizzle admin command.
146
* MERGE storage engine has been removed
147
* FEDERATED storage engine has been removed (all current development is
148
focused on FederatedX, so having FEDERATED made no sense).
149
* CSV engine is now for temporary tables only. See the filesystem_engine for
150
the future of reading files as database tables.
151
* MyISAM is for temporary tables only.
152
* ARCHIVE is fully supported
158
There are no FRM files in Drizzle. Engines now own their own metadata.
159
Some still choose to store these in files on disk. These are now in a
160
documented file format (using the google protobuf library).
165
Several SHOW commands have been removed, replaced with INFORMATION_SCHEMA
166
or DATA_DICTIONARY views. All SHOW commands are aliases to INFORMATION_SCHEMA
167
queries. Our INFORMATION_SCHEMA implementation does not have the drawbacks
168
of the MySQL implementation.
170
Here are some specific SHOW differences:
172
* SHOW ENGINES: use DATA_DICTIONARY
173
* SHOW CREATE TABLE: specifies the AUTO_INCREMENT at CREATE/ALTER TABLE time,
174
not the current AUTO_INCREMENT
175
* SHOW TABLE STATUS: only shows tables in the current table cache
176
* SHOW [ENGINE] STATUS: use the DATA_DICTIONARY tables for that engine
181
* ALTER TABLE UPGRADE
186
* Multi-table delete and multi-table update code was removed and can be accomplished through subqueries. More detailed information can be found in the :doc:`dml` section.
229
* There is no requirement for a 'mysql' schema.
230
* There is no SET datatype, use ENUM.
231
* There is no SET NAMES command, UTF-8 by default
232
* There is no CHARSET or CHARACTER SET commands, everything defaults to UTF8
233
* There is no TIME type, use DATETIME or INT.
234
* There is no TINYINT, SMALLINT or MEDIUMINT. Integer operations have been optimized around 32 and 64 bit integers.
235
* There are no TINYBLOB, MEDIUMBLOB and LONGBLOB datatypes. We have optimized a single BLOB container.
236
* There are no TINYTEXT, MEDIUMTEXT and LONGTEXT datatypes. Use TEXT or BLOB.
237
* There is no UNSIGNED (as per the standard).
238
* There are no spatial data types GEOMETRY, POINT, LINESTRING & POLYGON (go use `Postgres <http://www.postgresql.org>`_).
239
* No YEAR field type.
240
* There are no FULLTEXT indexes for the MyISAM storage engine (the only engine FULLTEXT was supported in). Look at either Lucene, Sphinx, or Solr.
242
* The "LOCAL" keyword in "LOAD DATA LOCAL INFILE" is not supported