PDF MySQL Reference Manual 1st Edition Michael Widenius Download
PDF MySQL Reference Manual 1st Edition Michael Widenius Download
PDF MySQL Reference Manual 1st Edition Michael Widenius Download
com
https://ebookname.com/product/mysql-reference-manual-1st-
edition-michael-widenius/
OR CLICK BUTTON
DOWLOAD NOW
https://ebookname.com/product/murach-s-php-and-mysql-training-
reference-2nd-edition-joel-murach/
https://ebookname.com/product/the-definitive-guide-to-mysql-2nd-
edition-michael-kofler/
https://ebookname.com/product/beginning-php-apache-mysql-web-
development-michael-k-glass/
https://ebookname.com/product/structural-engineering-reference-
manual-8th-edition-alan-williams/
C A Reference Manual 5th Edition Samuel P. Harbison
https://ebookname.com/product/c-a-reference-manual-5th-edition-
samuel-p-harbison/
https://ebookname.com/product/xml-pocket-reference-3rd-edition-
michael-fitzgerald/
https://ebookname.com/product/ruby-pocket-reference-1st-ed-
edition-michael-james-fitzgerald/
https://ebookname.com/product/manual-of-inpatient-psychiatry-1st-
edition-michael-i-casher/
https://ebookname.com/product/litt-s-drug-eruption-reference-
manual-including-drug-interactions-13th-edition-litt/
i
Table of Contents
1 General Information . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Conventions Used in This Manual . . . . . . . . . . . . . . . . 2
1.2 What Is MySQL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 History of MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.2 The Main Features of MySQL . . . . . . . . . . . . . . . . . . . 5
1.2.3 How Stable Is MySQL? . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.4 How Big Can MySQL Tables Be? . . . . . . . . . . . . . . . . 9
1.2.5 Year 2000 Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 What Is MySQL AB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 The Business Model and Services of MySQL AB . . 12
1.3.1.1 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.1.2 Training and Certification . . . . . . . . . . . . . 12
1.3.1.3 Consulting . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3.1.4 Commercial Licenses . . . . . . . . . . . . . . . . . . 13
1.3.1.5 Partnering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3.1.6 Advertising . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.2 Contact Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 MySQL Support and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.4.1 Support Offered by MySQL AB. . . . . . . . . . . . . . . . . 15
1.4.2 Copyrights and Licenses Used by MySQL. . . . . . . . 16
1.4.3 MySQL Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4.3.1 Using the MySQL Software Under a
Commercial License . . . . . . . . . . . . . . . . . . . . . . . 17
1.4.3.2 Using the MySQL Software for Free Under
GPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.4.4 MySQL AB Logos and Trademarks . . . . . . . . . . . . . 18
1.4.4.1 The Original MySQL Logo. . . . . . . . . . . . . 18
1.4.4.2 MySQL Logos that may be Used Without
Written Permission . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.4.3 When do you need a Written Permission to
use MySQL Logos? . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.4.4 MySQL AB Partnership Logos . . . . . . . . . 19
1.4.4.5 Using the word MySQL in Printed Text or
Presentations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.4.6 Using the word MySQL in Company and
Product Names . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.5 MySQL 4.0 In A Nutshell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.5.1 Features Available From MySQL 4.0 . . . . . . . . . . . . 20
1.5.2 Embedded MySQL Server . . . . . . . . . . . . . . . . . . . . . . 21
1.6 MySQL 4.1 In A Nutshell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.6.1 Features Available From MySQL 4.1 . . . . . . . . . . . . 22
1.6.2 Stepwise Rollout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
ii
2 MySQL Installation . . . . . . . . . . . . . . . . . . . . . . . 71
2.1 Quick Standard Installation of MySQL. . . . . . . . . . . . . . . . . . . 71
2.1.1 Installing MySQL on Linux. . . . . . . . . . . . . . . . . . . . . 71
2.1.2 Installing MySQL on Windows . . . . . . . . . . . . . . . . . 73
2.1.2.1 Installing the Binaries . . . . . . . . . . . . . . . . . 74
2.1.2.2 Preparing the Windows MySQL
Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.1.2.3 Starting the Server for the First Time . . 76
2.1.3 Installing MySQL on Mac OS X . . . . . . . . . . . . . . . . 76
2.1.4 Installing MySQL on NetWare . . . . . . . . . . . . . . . . . . 78
2.1.4.1 Installing the MySQL for NetWare Binaries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.2 General Installation Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.2.1 How to Get MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.2.2 Verifying Package Integrity Using MD5 Checksums or
GnuPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
2.2.3 Operating Systems Supported by MySQL . . . . . . . 82
2.2.4 Which MySQL Version to Use . . . . . . . . . . . . . . . . . . 84
2.2.5 Installation Layouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
2.2.6 How and When Updates Are Released. . . . . . . . . . . 87
2.2.7 Release Philosophy - No Known Bugs in Releases
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
2.2.8 MySQL Binaries Compiled by MySQL AB. . . . . . . 89
2.2.9 Installing a MySQL Binary Distribution . . . . . . . . . 93
2.3 Installing a MySQL Source Distribution. . . . . . . . . . . . . . . . . . 96
2.3.1 Quick Installation Overview . . . . . . . . . . . . . . . . . . . . 97
2.3.2 Applying Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
2.3.3 Typical configure Options . . . . . . . . . . . . . . . . . . . 100
2.3.4 Installing from the Development Source Tree . . . 102
2.3.5 Problems Compiling MySQL? . . . . . . . . . . . . . . . . . 105
2.3.6 MIT-pthreads Notes . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2.3.7 Windows Source Distribution . . . . . . . . . . . . . . . . . . 109
2.4 Post-installation Setup and Testing . . . . . . . . . . . . . . . . . . . . . 110
2.4.1 Problems Running mysql_install_db . . . . . . . . . 114
2.4.2 Problems Starting the MySQL Server . . . . . . . . . . 115
2.4.3 Starting and Stopping MySQL Automatically . . . 117
iv
1 General Information
The MySQL ° R
software delivers a very fast, multi-threaded, multi-user, and robust SQL
(Structured Query Language) database server. MySQL Server is intended for mission-
critical, heavy-load production systems as well as for embedding into mass-deployed soft-
ware. MySQL is a trademark of MySQL AB.
The MySQL software is Dual Licensed. Users can choose to use the MySQL software as an
Open Source/Free Software product under the terms of the GNU General Public License
(http://www.gnu.org/licenses/) or can purchase a standard commercial license from
MySQL AB. See Section 1.4 [Licensing and Support], page 15.
The MySQL web site (http://www.mysql.com/) provides the latest information about the
MySQL software.
The following list describes some sections of particular interest in this manual:
• For information about the company behind the MySQL Database Server, see Section 1.3
[What is MySQL AB], page 11.
• For a discussion about the capabilities of the MySQL Database Server, see Section 1.2.2
[Features], page 5.
• For installation instructions, see Chapter 2 [Installing], page 71.
• For tips on porting the MySQL Database Software to new architectures or operating
systems, see Appendix E [Porting], page 955.
• For information about upgrading from a Version 4.0 release, see Section 2.5.1
[Upgrading-from-4.0], page 119.
• For information about upgrading from a Version 3.23 release, see Section 2.5.2
[Upgrading-from-3.23], page 121.
• For information about upgrading from a Version 3.22 release, see Section 2.5.3
[Upgrading-from-3.22], page 124.
• For a tutorial introduction to the MySQL Database Server, see Chapter 3 [Tutorial],
page 167.
• For examples of SQL and benchmarking information, see the benchmarking directory
(‘sql-bench’ in the distribution).
• For a history of new features and bug fixes, see Appendix D [News], page 847.
• For a list of currently known bugs and misfeatures, see Section 1.8.6 [Bugs], page 45.
• For future plans, see Section 1.9 [TODO], page 50.
• For a list of all the contributors to this project, see Appendix C [Credits], page 837.
Important:
Reports of errors (often called bugs), as well as questions and comments, should be sent to
the mailing list at mysql@lists.mysql.com. See Section 1.7.1.3 [Bug reports], page 27.
The mysqlbug script should be used to generate bug reports.
For source distributions, the mysqlbug script can be found in the ‘scripts’ directory. For
binary distributions, mysqlbug can be found in the ‘bin’ directory (‘/usr/bin’ for the
MySQL-server RPM package).
If you have found a sensitive security bug in MySQL Server, you should send an e-mail to
security@mysql.com.
2 MySQL Technical Reference for Version 4.1.1-alpha
This is the MySQL reference manual; it documents MySQL up to Version 4.1.1-alpha. Func-
tional changes are always indicated with reference to the version, so this manual is also suit-
able if you are using an older version of the MySQL software (such as 3.23 or 4.0-production).
There are also references for version 5.0 (development).
Being a reference manual, it does not provide general instruction on SQL or relational
database concepts.
As the MySQL Database Software is under constant development, the manual is
also updated frequently. The most recent version of this manual is available at
http://www.mysql.com/documentation/ in many different formats, including HTML,
PDF, and Windows HLP versions.
The primary document is the Texinfo file. The HTML version is produced automatically
using a modified version of texi2html. The plain text and Info versions are produced
with makeinfo. The PostScript version is produced using texi2dvi and dvips. The PDF
version is produced with pdftex.
If you have a hard time finding information in the manual, you can try our searchable
version at http://www.mysql.com/doc/.
If you have any suggestions concerning additions or corrections to this manual, please send
them to the documentation team at docs@mysql.com.
This manual was initially written by David Axmark and Michael (Monty) Widenius. It is
currently maintained by Michael (Monty) Widenius, Arjen Lentz, and Paul DuBois. For
other contributors, see Appendix C [Credits], page 837.
The copyright (2003) to this manual is owned by the Swedish company MySQL AB. See
Section 1.4.2 [Copyright], page 16.
When commands are shown that are meant to be executed by a particular program, the
program is indicated by a prompt shown before the command. For example, shell> indi-
cates a command that you execute from your login shell, and mysql> indicates a command
that you execute from the mysql client program:
shell> type a shell command here
mysql> type a mysql command here
Shell commands are shown using Bourne shell syntax. If you are using a csh-style shell,
you may need to issue commands slightly differently. For example, the sequence to set an
environment variable and run a command looks like this in Bourne shell syntax:
shell> VARNAME=value some_command
For csh, you would execute the sequence like this:
shell> setenv VARNAME value
shell> some_command
Database, table, and column names must often be substituted into commands. To indicate
that such substitution is necessary, this manual uses db_name, tbl_name, and col_name.
For example, you might see a statement like this:
mysql> SELECT col_name FROM db_name.tbl_name;
This means that if you were to enter a similar statement, you would supply your own
database, table, and column names, perhaps like this:
mysql> SELECT author_name FROM biblio_db.author_list;
SQL keywords are not case-sensitive and may be written in uppercase or lowercase. This
manual uses uppercase.
In syntax descriptions, square brackets (‘[’ and ‘]’) are used to indicate optional words or
clauses. For example, in the following statement, IF EXISTS is optional:
DROP TABLE [IF EXISTS] tbl_name
When a syntax element consists of a number of alternatives, the alternatives are separated by
vertical bars (‘|’). When one member from a set of choices may be chosen, the alternatives
are listed within square brackets (‘[’ and ‘]’):
TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)
When one member from a set of choices must be chosen, the alternatives are listed within
braces (‘{’ and ‘}’):
{DESCRIBE | DESC} tbl_name {col_name | wild}
MySQL, the most popular Open Source SQL database, is developed, distributed, and sup-
ported by MySQL AB. MySQL AB is a commercial company, founded by the MySQL developers,
that builds its business providing services around the MySQL database. See Section 1.3 [What
is MySQL AB], page 11.
The MySQL web site (http://www.mysql.com/) provides the latest information about MySQL
software and MySQL AB.
4 MySQL Technical Reference for Version 4.1.1-alpha
We started out with the intention of using mSQL to connect to our tables using our own
fast low-level (ISAM) routines. However, after some testing we came to the conclusion that
mSQL was not fast enough nor flexible enough for our needs. This resulted in a new SQL
interface to our database but with almost the same API interface as mSQL. This API was
chosen to ease porting of third-party code.
The derivation of the name MySQL is not clear. Our base directory and a large number of
our libraries and tools have had the prefix “my” for well over 10 years. However, co-founder
Monty Widenius’s daughter (some years younger) is also named My. Which of the two gave
its name to MySQL is still a mystery, even for us.
The name of the MySQL Dolphin (our logo) is Sakila. Sakila was chosen by the founders
of MySQL AB from a huge list of names suggested by users in our "Name the Dolphin"
contest. The winning name was submitted by Ambrose Twebaze, an open source software
developer from Swaziland, Africa. According to Ambrose, the name Sakila has its roots
in SiSwati, the local language of Swaziland. Sakila is also the name of a town in Arusha,
Tanzania, near Ambrose’s country of origin, Uganda.
The following list describes some of the important characteristics of the MySQL Database
Software. See Section 1.5 [MySQL 4.0 In A Nutshell], page 20.
Internals and Portability
• Written in C and C++. Tested with a broad range of different compilers.
• Works on many different platforms. See Section 2.2.3 [Which OS], page 82.
• Uses GNU Automake, Autoconf, and Libtool for portability.
• APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl. See
Chapter 9 [Clients], page 650.
• Fully multi-threaded using kernel threads. This means it can easily use
multiple CPUs if available.
• Transactional and non-transactional storage engines.
• Very fast B-tree disk tables (MyISAM) with index compression.
6 MySQL Technical Reference for Version 4.1.1-alpha
• Relatively easy to add another storage engine. This is useful if you want
to add an SQL interface to an in-house database.
• A very fast thread-based memory allocation system.
• Very fast joins using an optimised one-sweep multi-join.
• In-memory hash tables which are used as temporary tables.
• SQL functions are implemented through a highly optimised class library
and should be as fast as possible. Usually there isn’t any memory allocation
at all after query initialisation.
• The MySQL code gets tested with Purify (a commercial mem-
ory leakage detector) as well as with Valgrind, a GPL tool
(http://developer.kde.org/~sewardj/).
• Available as client/server or embedded (linked) version.
Column Types
• Many column types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes
long, FLOAT, DOUBLE, CHAR, VARCHAR, TEXT, BLOB, DATE, TIME, DATETIME,
TIMESTAMP, YEAR, SET, and ENUM types. See Section 6.2 [Column types],
page 445.
• Fixed-length and variable-length records.
Commands and Functions
• Full operator and function support in the SELECT and WHERE clauses of
queries. For example:
mysql> SELECT CONCAT(first_name, " ", last_name)
-> FROM tbl_name
-> WHERE income/dependents > 10000 AND age > 30;
• Full support for SQL GROUP BY and ORDER BY clauses. Support for group
functions (COUNT(), COUNT(DISTINCT ...), AVG(), STD(), SUM(), MAX(),
MIN(), and GROUP_CONCAT()).
• Support for LEFT OUTER JOIN and RIGHT OUTER JOIN with both standard
SQL and ODBC syntax.
• Support for aliases on tables and columns as required by SQL-92.
• DELETE, INSERT, REPLACE, and UPDATE return the number of rows that were
changed (affected). It is possible to return the number of rows matched
instead by setting a flag when connecting to the server.
• The MySQL-specific SHOW command can be used to retrieve information
about databases, tables, and indexes. The EXPLAIN command can be used
to determine how the optimiser resolves a query.
• Function names do not clash with table or column names. For example,
ABS is a valid column name. The only restriction is that for a function call,
no spaces are allowed between the function name and the ‘(’ that follows
it. See Section 6.1.7 [Reserved words], page 442.
• You can mix tables from different databases in the same query (as of Ver-
sion 3.22).
Chapter 1: General Information 7
Security
• A privilege and password system that is very flexible and secure, and allows
host-based verification. Passwords are secure because all password traffic
is encrypted when you connect to a server.
Scalability and Limits
• Handles large databases. We use MySQL Server with databases that con-
tain 50 million records. We also know of users that use MySQL Server with
60,000 tables and about 5,000,000,000 rows.
• Up to 32 indexes per table are allowed. Each index may consist of 1 to
16 columns or parts of columns. The maximum index width is 500 bytes
(this may be changed when compiling MySQL Server). An index may use
a prefix of a CHAR or VARCHAR field.
Connectivity
• Clients may connect to the MySQL server using TCP/IP Sockets, Unix Sock-
ets (Unix), or Named Pipes (NT).
• ODBC (Open-DataBase-Connectivity) support for Win32 (with source).
All ODBC 2.5 functions are supported, as are many others. For example,
you can use MS Access to connect to your MySQL server. See Section 9.2
[ODBC], page 737.
Localisation
• The server can provide error messages to clients in many languages. See
Section 4.6.2 [Languages], page 313.
• Full support for several different character sets, including ISO-8859-1
(Latin1), german, big5, ujis, and more. For example, the Scandinavian
characters ‘^
a’, ‘ä’ and ‘ö’ are allowed in table and column names.
• All data is saved in the chosen character set. All comparisons for normal
string columns are case-insensitive.
• Sorting is done according to the chosen character set (the Swedish way by
default). It is possible to change this when the MySQL server is started. To
see an example of very advanced sorting, look at the Czech sorting code.
MySQL Server supports many different character sets that can be specified
at compile and runtime.
Clients and Tools
• Includes myisamchk, a very fast utility for table checking, optimisation,
and repair. All of the functionality of myisamchk is also available through
the SQL interface. See Chapter 4 [MySQL Database Administration],
page 204.
• All MySQL programs can be invoked with the --help or -? options to obtain
online assistance.
This section addresses the questions “How stable is MySQL Server? ” and “Can I depend
on MySQL Server in this project? ” We will try to clarify these issues and answer some
8 MySQL Technical Reference for Version 4.1.1-alpha
important questions that concern many potential users. The information in this section is
based on data gathered from the mailing list, which is very active in identifying problems
as well as reporting types of use.
Original code stems back from the early ’80s, providing a stable code base, and the ISAM ta-
ble format remains backward-compatible. At TcX, the predecessor of MySQL AB, MySQL code
has worked in projects since mid-1996, without any problems. When the MySQL Database
Software was released to a wider public, our new users quickly found some pieces of
“untested code”. Each new release since then has had fewer portability problems (even
though each new release has also had many new features).
Each release of the MySQL Server has been usable. Problems have occurred only when
users try code from the “gray zones.” Naturally, new users don’t know what the gray zones
are; this section therefore attempts to document those areas that are currently known.
The descriptions mostly deal with Version 3.23 and 4.0 of MySQL Server. All known and
reported bugs are fixed in the latest version, with the exception of those listed in the bugs
section, which are things that are design-related. See Section 1.8.6 [Bugs], page 45.
The MySQL Server design is multi-layered with independent modules. Some of the newer
modules are listed here with an indication of how well-tested each of them is:
Replication – Gamma
Large server clusters using replication are in production use, with good results.
Work on enhanced replication features is continuing in MySQL 4.x.
InnoDB tables – Stable (in 3.23 from 3.23.49)
The InnoDB transactional storage engine has been declared stable in the MySQL
3.23 tree, starting from version 3.23.49. InnoDB is being used in large, heavy-
load production systems.
BDB tables – Gamma
The Berkeley DB code is very stable, but we are still improving the BDB trans-
actional storage engine interface in MySQL Server, so it will take some time
before this is as well tested as the other table types.
FULLTEXT – Beta
Full-text search works but is not yet widely used. Important enhancements
have been implemented in MySQL 4.0.
MyODBC 3.51 (uses ODBC SDK 3.51) – Stable
In wide production use. Some issues brought up appear to be application-
related and independent of the ODBC driver or underlying database server.
Automatic recovery of MyISAM tables – Gamma
This status applies only to the new code in the MyISAM storage engine that
checks if the table was closed properly on open and executes an automatic
check/repair of the table if it wasn’t.
Bulk-insert – Alpha
New feature in MyISAM tables in MySQL 4.0 for faster insert of many rows.
Locking – Gamma
This is very system-dependent. On some systems there are big problems using
standard OS locking (fcntl()). In these cases, you should run mysqld with the
Chapter 1: General Information 9
MySQL Version 3.22 had a 4 GB (4 gigabyte) limit on table size. With the MyISAM table
type in MySQL Version 3.23, the maximum table size was pushed up to 8 million terabytes
(2 ^ 63 bytes).
Note, however, that operating systems have their own file-size limits. Here are some exam-
ples:
Operating System File-Size Limit
Linux-Intel 32 bit 2 GB, 4GB or more, depends on Linux
version
Linux-Alpha 8 TB (?)
Solaris 2.5.1 2 GB (possible 4GB with patch)
Solaris 2.6 4 GB (can be changed with flag)
Solaris 2.7 Intel 4 GB
Solaris 2.7 UltraSPARC 512 GB
On Linux 2.2 you can get tables larger than 2 GB in size by using the LFS patch for the
ext2 filesystem. On Linux 2.4 patches also exist for ReiserFS to get support for big files.
In effect, then, the table size for MySQL databases is normally limited by the operating
system.
By default, MySQL tables have a maximum size of about 4 GB. You can check the maximum
table size for a table with the SHOW TABLE STATUS command or with the myisamchk -dv
table_name. See Section 4.5.7 [SHOW], page 290.
If you need a table that will be larger than 4 GB in size (and your operating system supports
this), set the AVG_ROW_LENGTH and MAX_ROWS parameters accordingly when you create your
table. See Section 6.5.3 [CREATE TABLE], page 538. You can also set these parameters
later, with ALTER TABLE. See Section 6.5.4 [ALTER TABLE], page 546.
If your big table is a read-only table, you could use myisampack to merge and compress
many tables into one. myisampack usually compresses a table by at least 50%, so you can
have, in effect, much bigger tables. See Section 4.7.4 [myisampack], page 322.
You can get around the operating system file limit for MyISAM data files using the RAID
option. See Section 6.5.3 [CREATE TABLE], page 538.
Another solution can be the included MERGE library, which allows you to handle a collection
of identical tables as one. See Section 7.2 [MERGE tables], page 572.
The MySQL Server itself has no problems with Year 2000 (Y2K) compliance:
10 MySQL Technical Reference for Version 4.1.1-alpha
• MySQL Server uses Unix time functions and has no problems with dates until 2069.
All 2-digit years are considered to be in the range 1970 to 2069, which means that if
you store 01 in a YEAR column, MySQL Server treats it as 2001.
• All MySQL date functions are stored in one file, ‘sql/time.cc’, and are coded very
carefully to be year 2000-safe.
• In MySQL Version 3.22 and later, the YEAR column type can store years 0 and 1901 to
2155 in one byte and display them using two or four digits.
You may run into problems with applications that use MySQL Server in a way that is not
Y2K-safe. For example, many old applications store or manipulate years using 2-digit values
(which are ambiguous) rather than 4-digit values. This problem may be compounded by
applications that use values such as 00 or 99 as “missing” value indicators.
Unfortunately, these problems may be difficult to fix because different applications may be
written by different programmers, each of whom may use a different set of conventions and
date-handling functions.
Here is a simple demonstration illustrating that MySQL Server doesn’t have any problems
with dates until the year 2030:
mysql> DROP TABLE IF EXISTS y2k;
Query OK, 0 rows affected (0.01 sec)
This example shows that the DATE and DATETIME data types will not give any problems
with future dates (they handle dates until the year 9999).
The TIMESTAMP data type, which is used to store the current time, supports values that
range from 19700101000000 to 20300101000000 on 32-bit machines (signed value). On
64-bit machines, TIMESTAMP handles values up to 2106 (unsigned value).
Even though MySQL Server is Y2K-compliant, it is your responsibility to provide unambigu-
ous input. See Section 6.2.2.1 [Y2K issues], page 452 for MySQL Server’s rules for dealing
with ambiguous date input data (data containing 2-digit year values).
MySQL AB is the company of the MySQL founders and main developers. MySQL AB was origi-
nally established in Sweden by David Axmark, Allan Larsson, and Michael Monty Widenius.
The developers of the MySQL server are all employed by the company. We are a virtual or-
ganisation with people in a dozen countries around the world. We communicate extensively
over the Net every day with one another and with our users, supporters, and partners.
We are dedicated to developing the MySQL software and spreading our database to new users.
MySQL AB owns the copyright to the MySQL source code, the MySQL logo and trademark, and
this manual. See Section 1.2 [What-is], page 3.
The MySQL core values show our dedication to MySQL and Open Source.
We want the MySQL Database Software to be:
• The best and the most widely used database in the world.
• Available to, and affordable by all.
• Easy to use.
• Continuously improving while remaining fast and safe.
• Fun to use and improve.
• Free from bugs.
12 MySQL Technical Reference for Version 4.1.1-alpha
One of the most common questions we encounter is: “How can you make a living from
something you give away for free? ” This is how.
MySQL AB makes money on support, services, commercial licenses, and royalties. We use
these revenues to fund product development and to expand the MySQL business.
The company has been profitable since its inception. In October 2001, we accepted ven-
ture financing from leading Scandinavian investors and a handful of business angels. This
investment is used to solidify our business model and build a basis for sustainable growth.
1.3.1.1 Support
MySQL AB is run and owned by the founders and main developers of the MySQL database. The
developers are committed to giving support to customers and other users in order to stay
in touch with their needs and problems. All our support is given by qualified developers.
Really tricky questions are answered by Michael Monty Widenius, principal author of the
MySQL Server. See Section 1.4.1 [Support], page 15.
For more information and ordering support at various levels, see http://www.mysql.com/support/
or contact our sales staff at sales@mysql.com.
MySQL AB delivers MySQL and related training worldwide. We offer both open courses and
in-house courses tailored to the specific needs of your company. MySQL Training is also
available through our partners, the Authorised MySQL Training Centers.
Our training material uses the same example databases used in our documentation and
our sample applications, and is always updated to reflect the latest MySQL version. Our
trainers are backed by the development team to guarantee the quality of the training and
the continuous development of the course material. This also ensures that no questions
raised during the courses remain unanswered.
Attending our training courses will enable you to achieve your MySQL application goals. You
will also:
• Save time.
Chapter 1: General Information 13
1.3.1.3 Consulting
MySQL AB and its Authorised Partners offer consulting services to users of MySQL Server
and to those who embed MySQL Server in their own software, all over the world.
Our consultants can help you design and tune your databases, construct efficient queries,
tune your platform for optimal performance, resolve migration issues, set up replication,
build robust transactional applications, and more. We also help customers embed MySQL
Server in their products and applications for large-scale deployment.
Our consultants work in close collaboration with our development team, which ensures the
technical quality of our professional services. Consulting assignments range from 2-day
power-start sessions to projects that span weeks and months. Our expertise not only covers
MySQL Server—it also extends into programming and scripting languages such as PHP,
Perl, and more.
If you are interested in our consulting services or want to become a consulting partner,
please visit the consulting section of our web site at http://www.mysql.com/consulting/
or contact our consulting staff at consulting@mysql.com.
The MySQL database is released under the GNU General Public License (GPL). This means
that the MySQL software can be used free of charge under the GPL. If you do not want
to be bound by the GPL terms (such as the requirement that your application must also
be GPL, you may purchase a commercial license for the same product from MySQL AB; see
http://www.mysql.com/products/pricing.html. Since MySQL AB owns the copyright to
the MySQL source code, we are able to employ Dual Licensing, which means that the same
product is available under GPL and under a commercial license. This does not in any way
affect the Open Source commitment of MySQL AB. For details about when a commercial
license is required, please see Section 1.4.3 [MySQL licenses], page 16.
We also sell commercial licenses of third-party Open Source GPL software that adds value
to MySQL Server. A good example is the InnoDB transactional storage engine that offers
ACID support, row-level locking, crash recovery, multi-versioning, foreign key support, and
more. See Section 7.5 [InnoDB], page 577.
14 MySQL Technical Reference for Version 4.1.1-alpha
1.3.1.5 Partnering
MySQL AB has a worldwide partner programme that covers training courses, consulting and
support, publications, plus reselling and distributing MySQL and related products. MySQL AB
Partners get visibility on the http://www.mysql.com/ web site and the right to use special
versions of the MySQL trademarks to identify their products and promote their business.
If you are interested in becoming a MySQL AB Partner, please e-mail partner@mysql.com.
The word MySQL and the MySQL dolphin logo are trademarks of MySQL AB. See Section 1.4.4
[MySQL AB Logos and Trademarks], page 18. These trademarks represent a significant
value that the MySQL founders have built over the years.
1.3.1.6 Advertising
The MySQL web site (http://www.mysql.com/) is popular among developers and users. In
October 2001, we served 10 million page views. Our visitors represent a group that makes
purchase decisions and recommendations for both software and hardware. Twelve percent of
our visitors authorise purchase decisions, and only nine percent are not involved in purchase
decisions at all. More than 65% have made one or more online business purchases within
the last half-year, and 70% plan to make one in the next few months.
The MySQL web site (http://www.mysql.com/) provides the latest information about MySQL
and MySQL AB.
For press services and inquiries not covered in our News releases (http://www.mysql.com/news/),
please send an e-mail to press@mysql.com.
If you have a valid support contract with MySQL AB, you will get timely, precise answers to
your technical questions about the MySQL software. For more information, see Section 1.4.1
[Support], page 15. On our web site, see http://www.mysql.com/support/, or send an
e-mail to sales@mysql.com.
For information about MySQL training, please visit the training section at
http://www.mysql.com/training/. If you have restricted access to the Internet, please
contact the MySQL AB training staff via e-mail at training@mysql.com. See Section 1.3.1.2
[Business Services Training], page 12.
For information on the MySQL Certification Program, please see http://www.mysql.com/certification
See Section 1.3.1.2 [Business Services Training], page 12.
If you’re interested in consulting, please visit the consulting section of our web site at
http://www.mysql.com/consulting/. If you have restricted access to the Internet, please
contact the MySQL AB consulting staff via e-mail at consulting@mysql.com. See Sec-
tion 1.3.1.3 [Business Services Consulting], page 13.
Commercial licenses may be purchased online at https://order.mysql.com/. There you
will also find information on how to fax your purchase order to MySQL AB. More information
about licensing can be found at http://www.mysql.com/products/pricing.html. If you
have questions regarding licensing or you want a quote for a high-volume license deal,
Chapter 1: General Information 15
please fill in the contact form on our web site (http://www.mysql.com/) or send an e-mail
message to licensing@mysql.com (for licensing questions) or to sales@mysql.com (for
sales inquiries). See Section 1.4.3 [MySQL licenses], page 16.
If you represent a business that is interested in partnering with MySQL AB, please send an
e-mail to partner@mysql.com. See Section 1.3.1.5 [Business Services Partnering], page 14.
For more information on the MySQL trademark policy, refer to http://www.mysql.com/company/trademark.
or send an e-mail to trademark@mysql.com. See Section 1.4.4 [MySQL AB Logos and
Trademarks], page 18.
If you are interested in any of the MySQL AB jobs listed in our jobs section
(http://www.mysql.com/company/jobs/), please send an e-mail to jobs@mysql.com.
Please do not send your CV as an attachment, but rather as plain text at the end of your
e-mail message.
For general discussion among our many users, please direct your attention to the appropriate
mailing list. See Section 1.7.1 [Questions], page 24.
Reports of errors (often called bugs), as well as questions and comments, should be sent to
the mailing list at mysql@lists.mysql.com. If you have found a sensitive security bug in
the MySQL Server, please send an e-mail to security@mysql.com. See Section 1.7.1.3 [Bug
reports], page 27.
If you have benchmark results that we can publish, please contact us via e-mail at
benchmarks@mysql.com.
If you have suggestions concerning additions or corrections to this manual, please send them
to the manual team via e-mail at docs@mysql.com.
For questions or comments about the workings or content of the MySQL web site
(http://www.mysql.com/), please send an e-mail to webmaster@mysql.com.
MySQL AB has a privacy policy, which can be read at http://www.mysql.com/company/privacy.html.
For any queries regarding this policy, please send an e-mail to privacy@mysql.com.
For all other inquires, please send an e-mail to info@mysql.com.
Technical support from MySQL AB means individualised answers to your unique problems
direct from the software engineers who code the MySQL database engine.
We try to take a broad and inclusive view of technical support. Almost any problem
involving MySQL software is important to us if it’s important to you. Typically customers
seek help on how to get different commands and utilities to work, remove performance
bottlenecks, restore crashed systems, understand operating system or networking impacts
on MySQL, set up best practices for backup and recovery, utilise APIs, and so on. Our
support covers only the MySQL server and our own utilities, not third-party products that
access the MySQL server, though we try to help with these where we can.
16 MySQL Technical Reference for Version 4.1.1-alpha
MySQL AB owns the copyright to the MySQL source code, the MySQL logos and trademarks
and this manual. See Section 1.3 [What is MySQL AB], page 11. Several different licenses
are relevant to the MySQL distribution:
1. All the MySQL-specific source in the server, the mysqlclient library and the client, as
well as the GNU readline library is covered by the GNU General Public License. See
Appendix H [GPL license], page 972. The text of this license can be found as the file
‘COPYING’ in the distribution.
2. The GNU getopt library is covered by the GNU Lesser General Public License. See
Appendix I [LGPL license], page 978.
3. Some parts of the source (the regexp library) are covered by a Berkeley-style copyright.
4. Older versions of MySQL (3.22 and earlier) are subject to a stricter license
(http://www.mysql.com/products/mypl.html). See the documentation of the
specific version for information.
5. The MySQL reference manual is currently not distributed under a GPL-style license. Use
of the manual is subject to the following terms:
• Conversion to other formats is allowed, but the actual content may not be altered
or edited in any way.
• You may create a printed copy for your own personal use.
• For all other uses, such as selling printed copies or using (parts of) the manual in
another publication, prior written agreement from MySQL AB is required.
Please send an e-mail to docs@mysql.com for more information or if you are interested
in doing a translation.
For information about how the MySQL licenses work in practice, please refer to Section 1.4.3
[MySQL licenses], page 16. Also see Section 1.4.4 [MySQL AB Logos and Trademarks],
page 18.
The MySQL software is released under the GNU General Public License (GPL),
which is probably the best known Open Source license. The formal terms of
the GPL license can be found at http://www.gnu.org/licenses/. See also
http://www.gnu.org/licenses/gpl-faq.html and http://www.gnu.org/philosophy/enforcing-gpl.h
Chapter 1: General Information 17
Since the MySQL software is released under the GPL, it may often be used for free, but
for certain uses you may want or need to buy commercial licenses from MySQL AB at
https://order.mysql.com/. See http://www.mysql.com/products/licensing.html for
more information.
Older versions of MySQL (3.22 and earlier) are subject to a stricter license
(http://www.mysql.com/products/mypl.html). See the documentation of the specific
version for information.
Please note that the use of the MySQL software under commercial license, GPL, or the old
MySQL license does not automatically give you the right to use MySQL AB trademarks. See
Section 1.4.4 [MySQL AB Logos and Trademarks], page 18.
The GPL license is contagious in the sense that when a program is linked to a GPL program
all the source code for all the parts of the resulting product must also be released under
the GPL. If you do not follow this GPL requirement, you break the license terms and forfeit
your right to use the GPL program altogether. You also risk damages.
You need a commercial license:
• When you link a program with any GPL code from the MySQL software and don’t want
the resulting product to be licensed under GPL, perhaps because you want to build a
commercial product or keep the added non-GPL code closed source for other reasons.
When purchasing commercial licenses, you are not using the MySQL software under GPL
even though it’s the same code.
• When you distribute a non-GPL application that only works with the MySQL software
and ship it with the MySQL software. This type of solution is considered to be linking
even if it’s done over a network.
• When you distribute copies of the MySQL software without providing the source code
as required under the GPL license.
• When you want to support the further development of the MySQL database even if you
don’t formally need a commercial license. Purchasing support directly from MySQL AB
is another good way of contributing to the development of the MySQL software, with
immediate advantages for you. See Section 1.4.1 [Support], page 15.
If you require a license, you will need one for each installation of the MySQL software. This
covers any number of CPUs on a machine, and there is no artificial limit on the number of
clients that connect to the server in any way.
For commercial licenses, please visit our website at http://www.mysql.com/products/licensing.html.
For support contracts, see http://www.mysql.com/support/. If you have special needs
or you have restricted access to the Internet, please contact our sales staff via e-mail at
sales@mysql.com.
You can use the MySQL software for free under the GPL if you adhere to the
conditions of the GPL. For additional details, including answers to common ques-
18 MySQL Technical Reference for Version 4.1.1-alpha
tions about the GPL, see the generic FAQ from the Free Software Foundation at
http://www.gnu.org/licenses/gpl-faq.html. Common uses of the GPL include:
• When you distribute both your own application and the MySQL source code under the
GPL with your product.
• When you distribute the MySQL source code bundled with other programs that are not
linked to or dependent on the MySQL system for their functionality even if you sell the
distribution commercially. This is called mere aggregation in the GPL license.
• When you are not distributing any part of the MySQL system, you can use it for free.
• When you are an Internet Service Provider (ISP), offering web hosting with MySQL
servers for your customers. We encourage people to use ISPs that have MySQL support,
as this will give them the confidence that their ISP will, in fact, have the resources to
solve any problems they may experience with the MySQL installation. Even if an ISP
does not have a commercial license for MySQL Server, their customers should at least
be given read access to the source of the MySQL installation so that the customers can
verify that it is correctly patched.
• When you use the MySQL database software in conjunction with a web server, you do
not need a commercial license (so long as it is not a product you distribute). This is
true even if you run a commercial web server that uses MySQL Server, because you are
not distributing any part of the MySQL system. However, in this case we would like you
to purchase MySQL support because the MySQL software is helping your enterprise.
If your use of MySQL database software does not require a commercial license, we encourage
you to purchase support from MySQL AB anyway. This way you contribute toward MySQL
development and also gain immediate advantages for yourself. See Section 1.4.1 [Support],
page 15.
If you use the MySQL database software in a commercial context such that you profit by its
use, we ask that you further the development of the MySQL software by purchasing some
level of support. We feel that if the MySQL database helps your business, it is reasonable to
ask that you help MySQL AB. (Otherwise, if you ask us support questions, you are not only
using for free something into which we’ve put a lot a work, you’re asking us to provide free
support, too.)
Many users of the MySQL database want to display the MySQL AB dolphin logo
on their web sites, books, or boxed products. We welcome and encourage this,
although it should be noted that the word MySQL and the MySQL dolphin logo are
trademarks of MySQL AB and may only be used as stated in our trademark policy at
http://www.mysql.com/company/trademark.html.
The MySQL dolphin logo was designed by the Finnish advertising agency Priority in 2001.
The dolphin was chosen as a suitable symbol for the MySQL database since it is a smart, fast,
and lean animal, effortlessly navigating oceans of data. We also happen to like dolphins.
Chapter 1: General Information 19
The original MySQL logo may only be used by representatives of MySQL AB and by those
having a written agreement allowing them to do so.
We have designed a set of special Conditional Use logos that may be downloaded from
our web site at http://www.mysql.com/press/logos.html and used on third-party web
sites without written permission from MySQL AB. The use of these logos is not entirely
unrestricted but, as the name implies, subject to our trademark policy that is also available
on our web site. You should read through the trademark policy if you plan to use them.
The requirements are basically as follows:
• Use the logo you need as displayed on the http://www.mysql.com/ site. You may
scale it to fit your needs, but may not change colours or design, or alter the graphics
in any way.
• Make it evident that you, and not MySQL AB, are the creator and owner of the site that
displays the MySQL trademark.
• Don’t use the trademark in a way that is detrimental to MySQL AB or to the value of
MySQL AB trademarks. We reserve the right to revoke the right to use the MySQL AB
trademark.
• If you use the trademark on a web site, make it clickable, leading directly to
http://www.mysql.com/.
• If you are use the MySQL database under GPL in an application, your application must
be Open Source and must be able to connect to a MySQL server.
Contact us via e-mail at trademark@mysql.com to inquire about special arrangements to
fit your needs.
You need written permission from MySQL AB before using MySQL logos in the following cases:
• When displaying any MySQL AB logo anywhere except on your web site.
• When displaying any MySQL AB logo except the Conditional Use logos mentioned pre-
viously on web sites or elsewhere.
Due to legal and commercial reasons we monitor the use of MySQL trademarks on prod-
ucts, books, and other items. We usually require a fee for displaying MySQL AB logos on
commercial products, since we think it is reasonable that some of the revenue is returned
to fund further development of the MySQL database.
MySQL partnership logos may be used only by companies and persons having a written
partnership agreement with MySQL AB. Partnerships include certification as a MySQL trainer
or consultant. For more information, please see Section 1.3.1.5 [Partnering], page 14.
20 MySQL Technical Reference for Version 4.1.1-alpha
MySQL AB welcomes references to the MySQL database, but it should be noted that the word
MySQL is a trademark of MySQL AB. Because of this, you must append the trademark symbol
(TM) to the first or most prominent use of the word MySQL in a text and, where appropriate,
state that MySQL is a trademark of MySQL AB. For more information, please refer to our
trademark policy at http://www.mysql.com/company/trademark.html.
Use of the word MySQL in product or company names or in Internet domain names is not
allowed without written permission from MySQL AB.
Long promised by MySQL AB and long awaited by our users, MySQL Server 4.0 is now
available in production version.
MySQL 4.0 is available for download from http://www.mysql.com/ and from our mirrors.
MySQL 4.0 has been tested by a large number of users and is in production use at many
large sites.
The major new features of MySQL Server 4.0 are geared toward our existing business and
community users, enhancing the MySQL database software as the solution for mission-
critical, heavy-load database systems. Other new features target the users of embedded
databases.
MySQL Version 4.0.12 was declared stable for production use in March 2003. This means
that, in future, only bug fixes will be done for the 4.0 release series and only critical bug fixes
will be done for the older 3.23 series. See Section 2.5.2 [Upgrading-from-3.23], page 121.
New features to the MySQL software are being added to MySQL 4.1 which is now also
available (alpha version). See Section 1.6 [MySQL 4.1 In A Nutshell], page 22.
Speed enhancements
• MySQL 4.0 has a query cache that can give a huge speed boost to appli-
cations with repetitive queries. See Section 6.9 [Query Cache], page 560.
• Version 4.0 further increases the speed of MySQL Server in a number
of areas, such as bulk INSERTs, searching on packed indexes, creation of
FULLTEXT indexes, and COUNT(DISTINCT).
Embedded MySQL Server introduced
• The new Embedded Server library (instead of client/server) can easily be
used in standalone and embedded applications. See Section 1.5.2 [Nutshell
Embedded MySQL], page 22.
Chapter 1: General Information 21
New functionality
• The enhanced FULLTEXT search properties of MySQL Server 4.0 enables
FULLTEXT indexing of large text masses with both binary and natural-
language searching logic. You can customise minimal word length and
define your own stop word lists in any human language, enabling a new
set of applications to be built on MySQL Server. See Section 6.8 [Fulltext
Search], page 555.
Internationalisation
• Our German, Austrian, and Swiss users will note that MySQL now supports
a new character set, latin1_de, which ensures that the German sorting
order sorts words with umlauts in the same order as do German telephone
books.
Usability enhancements
In the process of building features for new users, we have not forgotten requests
from our community of loyal users.
• Most mysqld parameters (startup options) can now be set without taking
down the servers. This is a convenient feature for Database Administrators
(DBAs). See Section 5.5.6 [SET OPTION], page 426.
• Multi-table DELETE and UPDATE statements have been added..
• Support has been added for symbolic linking to MyISAM at the table
level (and not just the database level as before) and for enabling symlink
handling by default on Windows.
• SQL_CALC_FOUND_ROWS and FOUND_ROWS() are new functions that make it
possible to find out the number of rows a SELECT query that includes a
LIMIT clause would have returned without that clause.
The news section of this manual includes a more in-depth list of features. See Section D.3
[News-4.0.x], page 852.
22 MySQL Technical Reference for Version 4.1.1-alpha
libmysqld makes MySQL Server suitable for a vastly expanded realm of applications. Using
the embedded MySQL server library, one can embed MySQL Server into various applications
and electronics devices, where the end user has no knowledge of there actually being an
underlying database. Embedded MySQL Server is ideal for use behind the scenes in Internet
appliances, public kiosks, turnkey hardware/software combination units, high performance
Internet servers, self-contained databases distributed on CD-ROM, and so on.
Many users of libmysqld will benefit from the MySQL Dual Licensing. For those not
wishing to be bound by the GPL, the software is also made available under a commercial
license. The embedded MySQL library uses the same interface as the normal client library,
so it is convenient and easy to use. See Section 9.1.15 [libmysqld], page 731.
MySQL Server 4.0 laid the foundation for new features such as nested subqueries and Uni-
code (implemented in version 4.1) and for the work on SQL-99 stored procedures being done
for version 5.0. These features come at the top of the wish list of many of our customers.
With these additions, critics of the MySQL Database Server have to be more imaginative
than ever in pointing out deficiencies in the MySQL Database Management System. Already
well-known for its stability, speed, and ease of use, MySQL Server will be able to fulfill the
requirement checklists of very demanding buyers.
The features listed in this section are implemented in MySQL 4.1. Few other features are
still planned for MySQL 4.1. See Section 1.9.1 [TODO MySQL 4.1], page 50.
Most new features being coded, such as stored procedures, will be available in MySQL 5.0.
See Section 1.9.2 [TODO MySQL 5.0], page 50.
Support for subqueries and derived tables
• Subqueries are now supported. Here is an example:
SELECT * FROM t1 WHERE t1.a=(SELECT t2.b FROM t2);
*
* *
Mentre Giuliano andava migliorando, assistito ogni giorno da Giulia,
ad onta delle proteste di Ettore, altro dramma politico svolgevasi, al
quale la voce pubblica voleva ad ogni patto accomunare il nome di
Giuliano.
Il deputato De Respi, il colpito dalla giustizia, era stato ferito a
morte. Il mandato di comparizione del giudice aveva seguito
immediatamente l’autorizzazione a procedere.
L’evidenza delle prove della di lui colpabilità non lo indussero a
confessare... Ma rientrato, disfatto dalla lotta impegnata col giudice,
si metteva a letto per non più rialzarsi.
Il pubblico che non crede alla logica di certi scioglimenti, lo proclamò
suicida, e vi furono i pietosi che lo compiansero vittima.
Il funerale fu sontuoso e celebravasi appunto il giorno nel quale
Giuliano, convalescente, per la prima volta affacciavasi alla finestra.
Il corteo funebre si avviava alla stazione, la salma dovendo essere
inumata nel cimitero del paesello nativo.
La banda municipale romana che precedeva il feretro eseguiva una
marcia straziante, tutta lamenti e gemiti di dolore... Al defunto,
strappato dalla morte all’azione della giustizia, rendevansi solenni gli
onori ufficiali, dovuti ai rappresentanti della nazione... Il carro
riboccava di corone. Le notabilità parlamentari lo seguivano, poi
lunga fila di carrozze signorili, fra due siepi di popolo, più attonito
che curioso. Attonito per quelle onoranze rese all’accusato da dieci
giorni in balìa agli spietati commenti della stampa, alle rivelazioni
schiaccianti di fatti innegabili, ormai dall’universale ammessi e
condannati.
— Chi è morto? chiese Giuliano all’onorevole Lastri che lo reggeva al
davanzale.
— Un disgraziato! Un’altra vittima dell’ambizione, della sensualità,
della megalomania... Vittima, ma colpevole, ha espiato colla morte...
Invochiamo l’oblìo sulla sua bara...
— Ma, chi? Chi è?
— Fu il deputato De Respi.
— Morto? Come? Suicida?
— Forse. I medici dicono aneurisma; il pubblico replica veleno.
Giuliano ancor debole si ritrasse come impaurito dalla finestra e
s’adagiò su d’una poltrona soggiungendo:
— Sarebbe stato assai meglio anche per me morire così.
— Bravo! per accomunarti ai colpevoli, ai ladri. Che c’entri tu coi
corrotti, coi corruttori?... Ti sei mangiato il tuo, hai fatto male; ma di
ciò non devi render conto al pubblico... Se tu sapessi! Nel caso tuo
ve ne sono cento alla Camera... Te l’ho detto: Montecitorio è un
ammazzatojo di riputazioni, è un abisso per i piccoli patrimonî... Tu
sei giovane. Hai l’avvenire per te, il tempo di riparare alle tue
balordaggini.
— Giovane! L’avvenire... Ho perduto la famiglia... E non ho di che
vivere.
— Si rimedia a tutto... Ritorna a Miralto...
— Impossibile...
Si coperse il volto colle mani, per nascondere le lacrime.
— Eravamo troppo felici!... soggiunse singhiozzando.
Da lungi gemevano, strazianti, gli ottoni... Lastri, non sapendo quale
conforto porgere alla disperazione del giovane protetto, stette
silenzioso scrollando il capo in atto di pietà.
Giuliano soggiunse:
— Partirò con Ettore, se mi vorrà compagno. Darò le dimissioni alla
Camera.
— Oh, non ora! Sarebbero interpretate come una confessione di
colpabilità... Un congedo... Poi, al tuo ritorno, che spero vicino, tutto
sarà assestato... A Miralto, soggiunse sorridente, ti accoglieranno
come il figliuol prodigo... Prodigo davvero, povero Giuliano!
«Ma l’avrai la forza di partire, di rompere ogni rapporto colla... colla
marchesa?
Non rispose; vagava collo sguardo azzurro impaurito per la camera,
tutta piena di cari ricordi... E quasi avesse fatto un esame di
coscienza, un lungo esame:
— Spero di sì!
— La speranza bisogna tradurla in certezza. È necessario... La
lontananza ed il tempo guariscono i più grandi dolori!
«Se saprete osare, potrete entrambi ritrovare la calma, se non la
felicità. Per te anche la famiglia. È un dovere sacrosanto per
entrambi.
— L’adempirò! mormorò Giuliano.
— Giuramento da marinajo, pensò Lastri...
Poi con amorevolezza che non si sarebbe potuta supporre nel ruvido,
vecchio parlamentare:
— La musica è cessata, finalmente. Tra poco la salma di quel
disgraziato sarà in viaggio. Il romanzo è finito. Quegli ha cominciato
di te a rovescio... Anch’egli forse, come te, portava a Montecitorio
illusioni e propositi generosi... Ma, povero, fu costretto alle prime
transazioni da esigenze che, se potessero essere valutate sulla
bilancia della rigida morale, varrebbero forse l’assoluzione.
«Sventuratamente, su quella via è soltanto il primo passo che
costa... E le seduzioni sono tali e tante... tali e tanti gli esempî dei
fortunati saliti in alto non per i meriti loro, per l’audacia e l’intrigo,
che in quell’ospedale di malarici ch’è Montecitorio, l’onestà finisce col
sembrare un fardello troppo pesante a chi vuol far cammino.
«E infatti, pochi gli integri che sono arrivati anche in tempi migliori,
pochissimi quelli che arriveranno in seguito. Giuliano, il sigaro ti dà
noja? chiese facendo pausa l’onorevole Lastri, per lasciar tempo
all’amico di meditare su ciò ch’egli aveva detto, e tempo a prepararsi
a ciò che stava per dirgli.
Il convalescente accennò col capo di no.
Chi fosse stato presente a quel colloquio avrebbe certamente
ripensato al consulto del dottor Nero, di Alfredo De Vigny, al giovane
nevropatico Stello. La Ragione e l’Imaginazione.
Giuliano, come Stello malato ed annichilito dai disinganni giovanili; il
Lastri fisiologo freddo e stringente nelle sue deduzioni, quanto il
dottor Nero.
— Quegli, continuò l’onorevole Lastri, povero, si arricchì ed al
momento di afferrare pel ciuffo definitivamente la Fortuna che lo
lusingava facendogli balenare imminenti i più alti onori, moriva
suicida per salvarsi dall’onta di una condanna infamante.
«Tu, ricco, sei stato rovinato e per poco non sei morto disonorato.
Ed ora che ti manca anche l’indipendenza, la felice indipendenza
dell’agiatezza, vorresti ricominciare?
«Una buona idea ti è venuta; seguila, parti con Ruggeri...
Riconquisterai al ritorno, colla famiglia, la felicità perduta... Spezza la
catena infiorata di rose che ti costringe a Roma... L’odio della
contessa Adele è amore... È l’ira dell’amore tradito... Te assente,
nessun motivo di continuare negli atti legali per la separazione,
vendetta della quale essa sarebbe la prima vittima. Credi a me! non
si domanda la testa di un uomo indifferente, ed Erodiade non
avrebbe voluta quella di Giovanni Battista, se non l’avesse
pazzamente amato...
«Deciditi... Al ritorno, la calma nelle gioje della casa, che colla tua
indole, col tuo carattere, non avresti mai dovuto abbandonare.
Giuliano, il capo rovesciato sullo schienale della poltrona, lacrimava
assentendo.
— Lo prometti? riprese l’onorevole Lastri.
— Lo prometto! rispose con voce strozzata il malato.
— Sta bene... Lascia fare a me ed a Ruggeri. Sopratutto non una
parola alla marchesa de’ nostri progetti. Essa, come sai, deve
assentarsi alcuni giorni dovendo assistere al processo di divorzio
intentato contro il marito.
«La tua malattia ritardò la sua partenza per Parigi... Ora deve
inesorabilmente recarvisi, e tu non sei in istato di accompagnarla...
Durante l’assenza vi imbarcherete. Ne hai il coraggio, te lo senti?
— Sì! rispose flebilmente Giuliano...
— È una trista azione, riprese Lastri, ne convengo... Necessaria! Ad
estremi mali, estremi rimedî.
Giuliano assentiva senza poter staccare lo sguardo dal ritratto ad olio
di Giulia, sorridente nella cornice dorata come nelle ore felici, per
sempre trascorse... Assentiva baciando di soppiatto la boccetta d’oro
di sali, ritrovata sul tavolino da notte al suo svegliarsi dai delirî della
febbre.
Senza volontà nel vigore della salute, nello stato di debolezza in cui
si trovava, Giuliano non sarebbe stato capace di opposizione alcuna.
La sua volontà era quella degli altri; soggetto prezioso per uno
studioso dei fenomeni ipnotici, ogni atto di lui era effetto di una
suggestione estranea.
Se in quelle ore di sconforto, la contessa Adele non fosse stata
trattenuta lontana dall’orgoglio ferito, Giuliano sarebbe forse
ritornato a Miralto, senza rimpianto... La partenza della marchesa
Giulia parve provvidenziale a Lastri ed a Ruggeri, che si lusingavano
di aver causa vinta. Strapparlo alla politica ed all’amore di Giulia era
salvarlo.
*
* *
Gli addìi della marchesa furono tristi, anch’essa era punta da un
presentimento... Ma, l’assenza doveva essere sì breve, otto, dieci
giorni al più... Lastri e Ruggeri diffidando del loro malato, ebbero
cura di non lasciarli soli... Però Giuliano mantenne il silenzio
coll’amica sulla cospirazione ordita. E Giulia partì.
— Quel tuo Giuliano mi ha fatto commettere la cattiva azione più
grossa della mia vita, diceva Lastri all’amico Ruggeri, al ritorno dalla
stazione ove erasi recato a salutare la marchesa. La buona
intenzione non attenua nulla. Ci ho il cuore grosso. Ingannare come
abbiamo fatto quella gentile creatura tutta amore e devozione fu un
delitto.
— Lo sarebbe se non si trattasse della pace di una famiglia, di ridare
il padre ad un orfano.
— Quel che vuoi! Ma la marchesa partendo ci guardava con certi
occhî, dubbiosi e supplicanti ad un tempo, che io ne ero commosso...
Non lo dimenticherò mai più quello sguardo e quel sorriso che
pareva pianto. L’abbiamo ingannata, poveretta, come de’ veri
malfattori.
«Mondaccio birbone, quello nel quale bisogna mentire, ingannare
anche a fin di bene!
CAPITOLO XXII.
In mare!
*
* *
A sera, quando giunse la cameriera di Giulia, partita da Parigi col
grosso bagaglio nel treno successivo a quello preso dalla sua
signora, a sera la cameriera, riferendo alla contessa Marcellin,
inquieta di non aver veduta la nipote, sorpresa dal nuovo viaggio da
essa intrapreso, diceva:
— Ah, contessa, la mia signora è impazzita! Avevo ordine di
raggiungerla a Torino, ove mi avrebbe aspettata, e non vi si è
neppure fermata... Giungo a Roma, ed è ripartita.
— Per quell’imbecille, pensò la contessa, punta da rimorso. La colpa
è mia! Maledetta la sera che ho fatto licenziare la carrozza di Giulia.
Chi poteva sapere che si sarebbero tanto presto combinati, e che la
loro relazione avrebbe presa la piega tragica che quella matta di
Giulia le ha data? Volevo farne un sottosegretario di Stato, invece ho
appioppato a Giulia un fallito.
Nella più grande inquietudine scrisse al commendatore Cerasi,
perchè mettesse la polizia di Napoli in moto e le mandasse notizie
della sua Giulia.
*
* *
Destino? Fatalità? Provvidenza? Se la marchesa Giulia si fosse
arrestata a Torino per attendervi la cameriera come era stato suo
primo pensiero, sarebbe giunta a Napoli troppo tardi, e l’epilogo di
questo triste racconto sarebbe stato tutt’altro. Il piroscafo della
Orient Line salpato per Plymouth-Londra e la marchesa, novella
Didone, avrebbe invano richiamato l’amico attraverso la immensità
dell’oceano.
Giulia giunse all’Hôtel des Étrangers in uno stato indescrivibile...
Pazza, veramente pazza...
— Il conte Sicuri?
— È in casa...
— Il numero della sua camera?...
— Se la signora desidera vederlo, dovrà avere la pazienza di
attenderlo in sala di ricevimento.
— Come vorrete... Aspetterò, ma chiamatelo subito.
— Chi devo annunciare?
— Inutile il nome. Dite che una signora l’attende per cosa urgente.
Condotta alla sala di ricevimento, le forze, che nel parossismo
l’avevano sostenuta, vennero meno... Cadde più che non si sedesse
su d’un divano, in preda ai dubbî più atroci...
— Se Giuliano fosse sordo alle mie preghiere! Se resistesse? Se la
decisione fosse irrevocabile... Oh misera me! Misera me! La
vendetta? E come? Ucciderlo, suicidarmi poi...
Giuliano entrò, Giulia mandò un grido e si slanciò nelle sue braccia,
rompendo in pianto.
Finalmente poteva piangere e l’angoscia che la soffocava si mutò in
gioja suprema... Aveva il suo Giuliano fra le braccia, e nessuno,
nessuno al mondo, ormai, avrebbe potuto rapirglielo.
Non una parola, singulti e scoppî di risa.
Giuliano, commosso, respirava a larghi polmoni ne’ capelli bruni di
Giulia il profumo inebbriante; anch’egli era felice, anch’egli in
quell’istante di delizia infinita era muto, e serrava forsennato alla vita
l’elegante, flessuosa personcina dell’amante, come se avesse voluto
spezzarla nell’abbraccio furente.
Una vecchia dama inglese, che inavvertita stava nella penombra, in
fondo del salone, a quell’amplesso un po’ troppo espansivo e
sconveniente in quel luogo, sorse scandalizzata... Pensando poi che
in quella sala pubblica, dalle porte vetrate semiaperte tanta
affettuosa espansione non poteva essere che legalizzata e
santificata, sorrise compiacente a tanto affetto ed uscì tossendo per
avvertire gli sposi, incontratisi certamente dopo lunga separazione,
della sua presenza... Uscì senza pur mormorare il minimo shocking,
pensando invece:
— Quanto sanno amarsi gli italiani!
E riguardò benevola, chiudendo con fracasso la porta, secondo
avvertimento a Giuliano, che si svincolò, susurrando nell’orecchio di
Giulia:
— C’è gente che ci osserva.
— Che m’importa? disse Giulia. Ti amo!... Non partirai. Non è vero
che non partirai?
— No! no, non partirò... A te, per te, con te, oggi e sempre!
Perdonami, ero tanto infelice!
— Se ti perdono! Ho sofferto, sai, ho sofferto l’inferno... Ma ti
perdono perchè ti amo, perchè, ormai, sono certa del tuo amore.
Ed abbracciò nuovamente l’amico, mormorando:
— Sempre!
*
* *
Quando Giuliano bussò all’uscio della camera di Ettore, nessuno
rispose.
Questi credendo che il compagno fosse nel salotto attiguo, aperse
senz’altro l’uscio e con sorpresa vide l’amico curvato sul letto, il volto
nascosto nel guanciale, il capo fra le mani, atteggiamento da
disperato.
— Ettore! Ettore! gridò Giuliano allarmato... Che hai?
Ettore si rizzò sorpreso, la fisionomia sconvolta, contraffatta come da
una grande sofferenza fisica.
— Chi è là! urlò, senza riconoscere Giuliano. Dopo un istante:
— Ah, sei tu?
— Ettore, che hai? Tu sei malato?
Questi, rimettendosi:
— No! non è nulla... Un capogiro. Ora tutto è passato... La fatica di
questi giorni... Ho scritto troppo... Poi l’imbarco di tutto il materiale...
Non è nulla, ti dico! soggiunse imperiosamente, allo scuotere del
capo di Giuliano in atto di incredulità.
Poi per divergere il discorso:
— Hai tutto preparato? Ci imbarcheremo stasera alle 8. Il vapore
salperà alle 10.
Giuliano non rispose; non sapeva come avvertire l’amico della sua
nuova decisione... Stette titubante...
— Dei nuovi dubbî? Nuove indecisioni?
— Sì... Giulia è arrivata; impossibile partire.
— Giulia arrivata? Impossibile partire? Ma ci pensi? Le tue promesse?
I tuoi propositi? L’annunzio del tuo viaggio?
— Non insistere... Ti dico, che è impossibile...
— Impossibile? È necessario! urlò Ettore sdegnato, percotendo col
pugno lo scrittojo al quale si era appoggiato. Miserabile! saresti
capace anche di questa viltà? Che si dirà di te? Sarai il ridicolo di
Roma, come già per poco non ne fosti il ludibrio.
Giuliano non rispose, il furore dell’amico era giustificato, lo sentiva;
ma sentiva pure che di distaccarsi nuovamente dalla marchesa non
aveva il coraggio...
Si ritirò dicendo una menzogna:
— Hai ragione, ci penserò, vedrò di persuaderla...
*
* *
A sera, quando Ruggeri si recava all’Immacolatella per imbarcarsi,
Giuliano viaggiava per Roma coll’amica...
Quest’ultimo abbandono rattristò profondamente Ruggeri, già tanto
infelice. Partiva colla disperazione in cuore.
Il giorno innanzi, mentre affaccendato nella sua camera d’albergo
stava facendo gli ultimi preparativi al lungo viaggio, il fattorino gli
aveva portato un pacco postale recante il timbro di Miralto.
Indicibile l’emozione provata pensando fossero le sue lettere
rinviategli da Stella.
Non osava aprirlo, il coraggio gli veniva meno. Aveva troppo sofferto,
troppo soffriva.
Presa una decisione eroica, l’aperse. Le sue lettere infatti ed un
involto in un fazzoletto bianco di seta allacciato da un nastro nero.
Sciolse tremante il nodo.
Un grido di sorpresa, di dolore. Le due lunghe, lussureggianti treccie
brune di Stella, barbaramente recise, ultimo ricordo, ultimo saluto di
suor Maria.
Suor Maria! così era firmata la lettera della fanciulla, lettera
straziante nel laconismo sublime.
Ettore impazziva.
Dapprima, come un senso di gioja nell’egoismo d’amante, nella
certezza che Stella non sarebbe stata d’altri mai, fedele alla
promessa, ai giuramenti; ma la gioja brutale fu soffocata dal
rimorso...
— Povera Stella! Sepolta viva in un convento...
E cadde ginocchioni piangendo sulle treccie nere che andava
coprendo di baci.
— È troppo! È troppo!
L’idea del suicidio gli balenò per la prima volta.
— Io morto, essa sarò sciolta da ogni voto; potrà ritornare alla vita,
essere forse felice.
Anche Giuliano l’abbandonava... Troppi, troppi sconforti, troppi
disinganni, troppo dolore. La sua esistenza non aveva più scopo.
*
* *
Il maestoso piroscafo dell’Orient Line navigava veloce nell’Atlantico.
La notte serena, il mare tranquillo, miriadi di stelle in cielo,
scintillante il mare, specchio all’infinito azzurro.
A bordo, silenzio profondo, la respirazione affannosa della macchina,
il friggìo monotono dell’acqua spumeggiante, tagliata dalla prua
acuminata della nave, frullata dal roteare dell’elica, null’altro.
Quando un tonfo ed un grido da poppa:
— Un uomo in mare!
— Un uomo in mare! ripeterono gli uomini di quarto...
L’elica si arrestò come per incanto; i marinaî accorsero solleciti
sbucando dai boccaporti di prua, a guisa di ombre da’ sepolcri
scoperchiati.
Le imbarcazioni furono calate, per due ore una ricerca affannosa,
senza risultato.
Ettore non era più... Degna tomba l’oceano all’immensità del suo
dolore.
*
* *
L’inchiesta di bordo appurò che il suicida si era a notte recato in
macchina ed aveva gettato alle fiamme un fascio di carte. Le sue, le
lettere di Stella.
Lasciava un piego per il deputato Lastri. In quel piego una lunga
lettera alla contessa Sicuri, madre adottiva di Stella; l’ardente
preghiera di strapparla al chiostro.
*
* *
Un poscritto diceva: «Le lettere alle fiamme; le care treccie della mia
Stella adorata, con me nelle profondità dell’Atlantico.»
Alla notizia del triste dramma il commendator Cerasi ebbe una
lacrima. Fenomeno incredibile di sensibilità nel lungo funzionario.
Parlando poi del ritorno di Giuliano alla contessa Marcellin, esclamò:
— Volevamo farne un uomo di Stato e non abbiamo fatto che un
Monsieur Alphonse...
«Prima di creare dei deputati, in avvenire, mi garantirò ben bene del
colore dei loro occhi.
«Quegli occhî blu furono fatali!
FINE.
INDICE
Capitolo
I. Partenza! Pag. 5
II. Finalmente solo! 17
III. In viaggio 29
IV. Roma! 38
V. Il sottoprefetto Cerasi e l’amico
Ferretti 45
VI. Un racconto di Poe 62
VII. A Belvedere 74
VIII. Da Roma a Miralto 90
IX. Un dietroscena politico 112
X. Eros 127
XI. Nella bolgia 145
XII. Intrighi e amore 160
XIII. La seduta reale 179
XIV. Intermezzo 195
XV. La farmacia 210
XVI. Delusioni. — Tristezze 223
XVII. Il crack 237
XVIII. I due voti di Stella 250
XIX. L’interpellanza 273
XX. La bufera 289
XXI. Cospirazioni 300
XXII. In mare! 308
Nota del Trascrittore