Functionality added or changed:
DATE()
, TIME()
, TIMESTAMP()
,
WEEKOFYEAR()
, MICROSECOND()
, ADDTIME()
, SUBTIME()
,
DATEDIFF()
, TIMEDIFF()
, MAKEDATE()
, MAKETIME()
,
and TIMEDIFF()
.
ADDDATE()
and SUBDATE()
.
They now allow the second argument to be specified in days, to be added
to or subtracted to the first date argument.
type
values DAY_MICROSECOND
,
HOUR_MICROSECOND
, MINUTE_MICROSECOND
,
SECOND_MICROSECOND
, and MICROSECOND
for DATE_ADD()
, DATE_SUB()
, and EXTRACT()
.
%f
microseconds format specifier for DATE_FORMAT()
and
TIME_FORMAT()
.
SELECT
does not
use indices properly get into slow query log when long log format is
used.
MERGE
tables with tables in different databases.
COMPRESS()
, UNCOMPRESS()
, and
UNCOMPRESSED_LENGTH()
.
SET sql_mode=mode
for a complex mode (like ANSI
), we
now update the sql_mode
variable to include all options the mode
requires.
ROLLUP
, which gives
you summary rows for each GROUP BY
level.
SQLSTATE
codes for all server errors.
mysql_sqlstate()
and
mysql_stmt_sqlstate()
that returns the SQLSTATE error code for the
last error.
--lower-case-table-names=1
now also makes aliases case
insensitive. (Bug #534)
TIME
columns with hours > 24 (days) were returned incorrectly to the client.
ANALYZE
, OPTIMIZE
, REPAIR
, FLUSH
(and its
equivalents invoked from mysqladmin
) commands
are now stored in the binary log (hence are replicated to the slave),
except FLUSH LOGS
, FLUSH MASTER
, FLUSH SLAVE
,
FLUSH TABLES WITH READ LOCK
, and unless the optional
NO_WRITE_TO_BINLOG
keyword
(or its alias LOCAL
) was used (for a syntax example,
see section 4.5.3 FLUSH
Syntax).
RELAY_LOG_PURGE
to enable/disable automatic
relay log purging.
LOAD DATA
now produces warnings that can be fetched with
SHOW WARNINGS
.
CREATE TABLE table_name (LIKE table_name2)
.
CREATE TABLE table_name (...) TYPE=storage_engine
will give a
warning if storage engine is not honored.
PURGE BINARY LOGS
to PURGE MASTER LOGS
.
PURGE LOGS
syntax is disabled (it had been added in version
4.1.0).
It is now PURGE MASTER LOGS
or PURGE BINARY LOGS
.
SHOW BDB LOGS
for SHOW LOGS
.
SHOW MASTER LOGS
(which had been deleted in version
4.1.0) to SHOW BINARY LOGS
.
Bugs fixed:
UNION
which prohibited that NULL
values are
inserted in result set where first SELECT
contains NOT
NULL
columns
WHERE
clause bigger then outer query WHERE
clause (bug #726).
MyISAM
tables with FULLTEXT
indexes
created in 4.0.x unreadable in 4.1.x.
REPAIR TABLE ... USE_FRM
when used
with tables
that contained TIMESTAMP
fields and were created in 4.0.x.
ORDER BY
/GROUP BY
clauses (bug #442).
INSERT
/REPLACE
statements (bug #446).
CREATE FULLTEXT INDEX
syntax illegal.
SELECT
that required a temporary table
(marked by Using temporary
in EXPLAIN
output)
was used as a derived table in EXPLAIN
command (bug #251).
DELETE
from a big table with
a new (created by MySQL-4.1) fulltext index.
LAST_INSERT_ID()
will now return 0 if the last INSERT
didn't
insert any rows.
BEGIN
, in the
first relay log). (Bug #53)
CONNECTION_ID()
is now properly replicated (bug #177).
PASSWORD()
function in 4.1 is now properly replicated
(bug #344).
UNION
operations.
DERIVED TABLES
when EXPLAIN
is
used on a DERIVED TABLES
with a join.
DELETE
with ORDER BY
and
LIMIT
caused by non initiated array of reference pointers.
USER()
function caused by the error in the size of
the allocated string.
GEOMETRY
column type with a storage engine that does not support
it.
UNION
caused by the empty select list and
a non-existent field being used in some of the sub-selects.
FLUSH LOGS
was
issued on the master. (Bug #254)
REQUIRE SSL
option specified for
their accounts.
Posted by asherhastings on Tuesday July 15 2003, @11:39am | [Delete] [Edit] |
Something like the following with UNION would be cool - enabling union sets to be used as derived tables in other select statements. Not sure if this is already supported... can't seem to get it to work in 4.1 and there are no suggestions in the documentation to the contrary...
select * FROM ( (SELECT * FROM table1) AS t1 UNION ALL ( SELECT * FROM table2 ) AS t2 ) AS t3