INSERT to table without PK possible with insertable VIEW when pxc_strict_mode=ENFORCING
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Fix Committed
|
Medium
|
Unassigned | ||
5.7 |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
When pxc_strict_mode is set to enforcing inserting data into a table without a primary key is still possible with insertable views.
mysql> select @@GLOBAL.
+------
| @@GLOBAL.
+------
| ENFORCING | ENFORCING |
+------
mysql> create table t_wo_pk (id int);
mysql> INSERT INTO t_wo_pk SET id =1;
ERROR 1105 (HY000): Percona-
mysql> CREATE VIEW v_wo_pk AS SELECT id FROM t_wo_pk;
mysql> INSERT INTO v_wo_pk SET id = 1;
Query OK, 1 row affected (0.01 sec)
mysql> select * from t_wo_pk;
+------+
| id |
+------+
| 1 |
+------+
Tested against 5.7.19.
description: | updated |
Changed in percona-xtradb-cluster: | |
status: | New → Fix Committed |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PXC-880