Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.10
-
Ubuntu 14.04
-
10.1.11
Description
set session sql_mode ='NO_AUTO_VALUE_ON_ZERO';
|
|
drop table if exists test;
|
|
create table test (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`));
|
|
insert into test (id) values (0);
|
|
select id from test;
|
|
#+----+
|
# | id |
|
# +----+
|
# | 0 |
|
# +----+
|
|
drop table if exists test;
|
|
create table test (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`));
|
|
drop trigger if exists test_before_insert;
|
|
delimiter ;;
|
|
CREATE TRIGGER `test_before_insert`
|
BEFORE INSERT ON `test`
|
FOR EACH ROW
|
BEGIN
|
END ;;
|
|
delimiter ;
|
|
insert into test (id) values (0);
|
|
select id from test;
|
|
# +----+
|
# | id |
|
# +----+
|
# | 1 |
|
# +----+
|
|
Attachments
Issue Links
- relates to
-
MDEV-8605 MariaDB not use DEFAULT value even when inserted NULL for NOT NULLABLE column.
- Closed