Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
Description
CREATE TABLE t1 ( |
pk INT(11) NOT NULL, |
c VARCHAR(3) DEFAULT NULL, |
vc VARCHAR(3) GENERATED ALWAYS AS (c) VIRTUAL, |
PRIMARY KEY (pk), |
KEY (vc) |
) ENGINE=InnoDB;
|
|
INSERT INTO t1 (pk,c) VALUES |
(1,'foo'),(2,'bar'),(3,'qux'),(4,'foo'),(5,'bar'), |
(6,'qux'),(7,'foo'),(8,'bar'),(9,'qux'),(10,'foo'); |
|
CREATE TABLE t2 ( |
pk INT(11) NOT NULL, |
c VARCHAR(3), |
PRIMARY KEY (pk) |
) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1,'foo'),(2,'bar'); |
SELECT t1.pk, t2.pk FROM t1, t2 WHERE t2.c = t1.vc AND t2.c = t1.c AND t2.pk > t1.pk; |
+----+----+ |
| pk | pk |
|
+----+----+ |
| 1 | 1 |
|
| 4 | 1 |
|
| 7 | 1 |
|
| 10 | 1 |
|
| 2 | 2 |
|
| 5 | 2 |
|
| 8 | 2 |
|
+----+----+ |
7 rows in set (0.00 sec) |
Attachments
Issue Links
- duplicates
-
MDEV-11736 InnoDB: Failing assertion: n < rec_offs_n_fields(offsets)
- Closed
- relates to
-
MDEV-5800 indexes on virtual (not materialized) columns
- Closed