mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#1266 "Separate auto-set logic from TIMESTAMP type."
Final version of patch. Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW() clauses for TIMESTAMP field definition. Current implementation allows only one such field per table and uses several unireg types for storing info about this properties of field. It should be replaced with better implementation when new .frm format is introduced.
This commit is contained in:
@ -44,6 +44,12 @@ create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
|
||||
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
|
||||
create table test (a datetime default now());
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table test (a datetime on update now());
|
||||
ERROR HY000: Invalid ON UPDATE clause for 'a' field
|
||||
create table test (a int default 100 auto_increment);
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table 1ea10 (1a20 int,1e int);
|
||||
insert into 1ea10 values(1,1);
|
||||
select 1ea10.1a20,1e+ 1e+10 from 1ea10;
|
||||
|
Reference in New Issue
Block a user