具体表现如下:
MySQL行为:
desc mysql_autoinc;
+--------+------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------+------+-----+---------+----------------+
| c_char | char(255) | YES | | NULL | |
| id | bigint(20) | NO | PRI | NULL | auto_increment |
+--------+------------+------+-----+---------+----------------+
2 rows in set (0.02 sec)
[test_yhq]>insert into mysql_autoinc values('1',1);
Query OK, 1 row affected (0.01 sec)
dble行为
desc sharding_four_node_autoinc;
+--------+------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------+------+-----+---------+----------------+
| c_char | char(255) | YES | | NULL | |
| id | bigint(20) | NO | PRI | NULL | auto_increment |
+--------+------------+------+-----+---------+----------------+
2 rows in set (0.01 sec)
[testdb]>insert into sharding_four_node_autoinc values('2',2);
ERROR 1064 (HY000): In insert Syntax, you can't set value for Autoincrement column!