Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 62455
Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)
mysql> create database `test`;
Query OK, 1 row affected (0,00 sec)
mysql> use test;
Database changed
mysql> create table `test` (`id` INT, `enum` ENUM ('one', 'two', 'three') NOT NULL);
Query OK, 0 rows affected (0,07 sec)
mysql> show create table `test`;
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
| test | CREATE TABLE `test` (
`id` int(11) DEFAULT NULL,
`enum` enum('one','two','three') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
mysql> insert into `test` values (1, 'one');
Query OK, 1 row affected (0,01 sec)
mysql> insert into `test` values (1, NULL);
ERROR 1048 (23000): Column 'enum' cannot be null
mysql> insert into `test` values (1);
ERROR 1136 (21S01): Column count doesn't match value count at row 1
SELECT COUNT(*) + 1 AS `position`
FROM `people` AS `p1`
JOIN `people` AS `p2` ON `p1`.`id` = :user_id
AND (`p2`.`votes_count` > `p1`.`votes_count`
OR (`p2`.`votes_count` = `p1`.`votes_count`
AND `p2`.`name` < `p1.`name`))
0x04 ^ 0x50 ^ 0x02 ^ 0x76 ^ 0x03 = 0x23
У версии 5.6 такое же поведение.