Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.0.25, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
mariaDB 10.0.25
-
10.2.2-3
Description
On mariaDB 10.0.25. I've got a problem when i delete some rows with a primary key VARCHAR + INT and a request with AND and OR conditions.
mysql> select version(); |
+--------------------------+ |
| version() |
|
+--------------------------+ |
| 10.0.25-MariaDB-0+deb8u1 |
|
+--------------------------+ |
1 row in set (0.00 sec) |
|
mysql> set autocommit=0;
|
Query OK, 0 rows affected (0.00 sec)
|
|
mysql> SHOW CREATE TABLE test;
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| test | CREATE TABLE `test` (
|
`key1varchar` varchar(14) NOT NULL,
|
`key2int` int(11) NOT NULL DEFAULT '0',
|
PRIMARY KEY (`key1varchar`,`key2int`),
|
KEY `key1varchar` (`key1varchar`),
|
KEY `key2int` (`key2int`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
|
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
mysql> SELECT * FROM test; |
+-------------+---------+ |
| key1varchar | key2int |
|
+-------------+---------+ |
| value1 | 0 |
|
| value1 | 1 |
|
| value1 | 1000685 |
|
| value1 | 1003560 |
|
| value1 | 1004807 |
|
+-------------+---------+ |
5 rows in set (0.00 sec) |
mysql> DELETE FROM test |
-> WHERE 1 |
-> AND `key1varchar`='value1' |
-> AND ( key2int <=1 OR key2int > 1); |
Query OK, 1 row affected (0.00 sec)
|
mysql> SELECT * FROM test; |
+-------------+---------+ |
| key1varchar | key2int |
|
+-------------+---------+ |
| value1 | 1 |
|
| value1 | 1000685 |
|
| value1 | 1003560 |
|
| value1 | 1004807 |
|
+-------------+---------+ |
4 rows in set (0.00 sec) |
Attachments
Issue Links
- duplicates
-
MDEV-10795 not match update rows
- Closed