File: explain_for_connection_small_json.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (726 lines) | stat: -rw-r--r-- 25,864 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
"WL6369 Explain for Connection"
QUERY: DELETE from t1 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -4,10 +4,3 @@
     "select_id": 1,
-    "table": {
-      "delete": true,
-      "table_name": "t1",
-      "access_type": "ALL",
-      "rows_examined_per_scan": 1,
-      "filtered": "100.00",
-      "message": "Deleting all rows"
-    }
+    "message": "Plan isn't ready yet"
   }
QUERY: SELECT * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b 
STATUS: EQUAL
QUERY: SELECT 1 FROM ( SELECT 1, 2 FROM DUAL WHERE EXISTS  ( SELECT f1 FROM t1 )) AS tt 
STATUS:NOT_EQUAL
SYNC_POINT:after_join_optimize
Diff: EXPLAIN NORMAL vs OTHER
@@ -1,28 +0,0 @@
-EXPLAIN
-{
-  "query_block": {
-    "select_id": 1,
-    "message": "no matching row in const table",
-    "table": {
-      "materialized_from_subquery": {
-        "using_temporary_table": true,
-        "dependent": false,
-        "cacheable": true,
-        "query_block": {
-          "select_id": 2,
-          "message": "Impossible WHERE",
-          "optimized_away_subqueries": [
-            {
-              "dependent": false,
-              "cacheable": true,
-              "query_block": {
-                "select_id": 3,
-                "message": "no matching row in const table"
-              }
-            }
-          ]
-        }
-      }
-    }
-  }
-}
QUERY: SELECT STRAIGHT_JOIN * FROM t3  JOIN t1 ON t3.a=t1.a  JOIN t2 ON t3.a=t2.a JOIN t4 WHERE t4.a IN (t1.b, t2.b) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -98,3 +98,3 @@
           "table_name": "t4",
-          "access_type": "ALL",
+          "access_type": "range",
           "possible_keys": [
@@ -102,5 +102,10 @@
           ],
+          "key": "PRIMARY",
+          "used_key_parts": [
+            "a"
+          ],
+          "key_length": "4",
           "rows_examined_per_scan": 7,
-          "rows_produced_per_join": 8,
-          "filtered": "28.57",
+          "rows_produced_per_join": 28,
+          "filtered": "100.00",
           "range_checked_for_each_record": "index map: 0x1",
@@ -108,5 +113,5 @@
             "read_cost": "0.50",
-            "eval_cost": "0.80",
+            "eval_cost": "2.80",
             "prefix_cost": "7.01",
-            "data_read_per_join": "128"
+            "data_read_per_join": "448"
           },
QUERY: SELECT STRAIGHT_JOIN  (SELECT SUM(t4.a) FROM t4 WHERE t4.a IN (t1.b, t2.b))  FROM t3, t1, t2 WHERE t3.a=t1.a AND t3.a=t2.a 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -116,2 +116,3 @@
             "filtered": "28.57",
+            "using_where": true,
             "using_index": true,
@@ -125,4 +126,3 @@
               "a"
-            ],
-            "attached_condition": "(`test`.`t4`.`a` in (`test`.`t1`.`b`,`test`.`t2`.`b`))"
+            ]
           }
QUERY: SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b 
STATUS: EQUAL
QUERY: DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000 
STATUS:NOT_EQUAL
SYNC_POINT:planned_single_delete
Diff: EXPLAIN NORMAL vs OTHER
@@ -1,48 +0,0 @@
-EXPLAIN
-{
-  "query_block": {
-    "select_id": 1,
-    "message": "Impossible WHERE",
-    "optimized_away_subqueries": [
-      {
-        "dependent": false,
-        "cacheable": true,
-        "query_block": {
-          "select_id": 2,
-          "cost_info": {
-            "query_cost": "3.00"
-          },
-          "grouping_operation": {
-            "using_filesort": false,
-            "table": {
-              "table_name": "t1",
-              "access_type": "range",
-              "possible_keys": [
-                "a"
-              ],
-              "key": "a",
-              "used_key_parts": [
-                "a"
-              ],
-              "key_length": "5",
-              "rows_examined_per_scan": 11,
-              "rows_produced_per_join": 11,
-              "filtered": "100.00",
-              "using_index_for_group_by": true,
-              "cost_info": {
-                "read_cost": "1.90",
-                "eval_cost": "1.10",
-                "prefix_cost": "3.00",
-                "data_read_per_join": "176"
-              },
-              "used_columns": [
-                "a",
-                "b"
-              ]
-            }
-          }
-        }
-      }
-    ]
-  }
-}
QUERY: SELECT * FROM t1 WHERE key1=1130 AND col1 IS NULL ORDER BY text1 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -24,9 +24,10 @@
         "rows_examined_per_scan": 4,
-        "rows_produced_per_join": 0,
-        "filtered": "20.00",
+        "rows_produced_per_join": 4,
+        "filtered": "100.00",
+        "using_where": true,
         "cost_info": {
           "read_cost": "0.50",
-          "eval_cost": "0.08",
+          "eval_cost": "0.40",
           "prefix_cost": "0.90",
-          "data_read_per_join": "38"
+          "data_read_per_join": "192"
         },
@@ -42,4 +43,3 @@
           "col4"
-        ],
-        "attached_condition": "(`test`.`t1`.`col1` is null)"
+        ]
       }
QUERY: SELECT t1.c2   FROM t2 STRAIGHT_JOIN t1 ON t1.c1 < t2.c1 
STATUS: EQUAL
QUERY: SELECT STRAIGHT_JOIN * FROM (t1 LEFT JOIN  (t2 LEFT JOIN (t3 LEFT OUTER JOIN t4 ON t3.c1 <= t4.c1_key) ON t2.c1 = t4.c3)  ON t1.c1 = t4.c2) RIGHT OUTER JOIN t5 ON t2.c2 <= t5.c1 WHERE t1.i1 = 1 
STATUS:NOT_EQUAL
SYNC_POINT:after_join_optimize
Diff: EXPLAIN NORMAL vs OTHER
@@ -34,2 +34,3 @@
           "filtered": "10.00",
+          "using_where": true,
           "using_join_buffer": "hash join",
@@ -45,4 +46,3 @@
             "c1"
-          ],
-          "attached_condition": "(`test`.`t1`.`i1` = 1)"
+          ]
         }
@@ -56,2 +56,3 @@
           "filtered": "33.33",
+          "using_where": true,
           "using_join_buffer": "hash join",
@@ -67,4 +68,3 @@
             "c2"
-          ],
-          "attached_condition": "(`test`.`t2`.`c2` <= `test`.`t5`.`c1`)"
+          ]
         }
QUERY: SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL GROUP BY t2.f1, t2.f2 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -47,4 +47,5 @@
             "rows_examined_per_scan": 1,
-            "rows_produced_per_join": 0,
-            "filtered": "50.00",
+            "rows_produced_per_join": 1,
+            "filtered": "100.00",
+            "using_where": true,
             "using_index": true,
@@ -52,5 +53,5 @@
               "read_cost": "0.25",
-              "eval_cost": "0.05",
+              "eval_cost": "0.10",
               "prefix_cost": "0.35",
-              "data_read_per_join": "8"
+              "data_read_per_join": "16"
             },
@@ -59,4 +60,3 @@
               "f2"
-            ],
-            "attached_condition": "(`test`.`t2`.`f2` is not null)"
+            ]
           }
QUERY: SELECT * FROM t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -46,9 +46,10 @@
           "rows_examined_per_scan": 1,
-          "rows_produced_per_join": 3,
-          "filtered": "33.33",
+          "rows_produced_per_join": 10,
+          "filtered": "100.00",
+          "using_where": true,
           "cost_info": {
             "read_cost": "2.50",
-            "eval_cost": "0.33",
+            "eval_cost": "1.00",
             "prefix_cost": "4.76",
-            "data_read_per_join": "53"
+            "data_read_per_join": "160"
           },
@@ -57,4 +58,3 @@
             "ref"
-          ],
-          "attached_condition": "(`test`.`a`.`ref` < `test`.`b`.`ref`)"
+          ]
         }
QUERY: DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -47,9 +47,10 @@
           "rows_examined_per_scan": 1,
-          "rows_produced_per_join": 3,
-          "filtered": "33.33",
+          "rows_produced_per_join": 10,
+          "filtered": "100.00",
+          "using_where": true,
           "cost_info": {
             "read_cost": "2.50",
-            "eval_cost": "0.33",
+            "eval_cost": "1.00",
             "prefix_cost": "4.76",
-            "data_read_per_join": "53"
+            "data_read_per_join": "160"
           },
@@ -58,4 +59,3 @@
             "ref"
-          ],
-          "attached_condition": "(`test`.`a`.`ref` < `test`.`b`.`ref`)"
+          ]
         }
QUERY: SELECT * from t2 left outer join t1  using (n) 
STATUS: EQUAL
QUERY: DELETE  t1,t2 from t2 left outer join t1  using (n) 
STATUS: EQUAL
QUERY: UPDATE t1 left join t2  on t1.a=t2.a set t1.b=2, t2.b=2 where t1.b=1 and t2.b=1 or t2.a is NULL 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -36,2 +36,3 @@
           "filtered": "75.00",
+          "using_where": true,
           "cost_info": {
@@ -45,4 +46,3 @@
             "b"
-          ],
-          "attached_condition": "(<if>(found_match(t2), (((`test`.`t2`.`b` = 1) and (`test`.`t1`.`b` = 1)) or (`test`.`t2`.`a` is null)), true) and <if>(is_not_null_compl(t2), (`test`.`t2`.`a` = `test`.`t1`.`a`), true))"
+          ]
         }
QUERY: UPDATE t1 LEFT JOIN t2 USING(id) SET s1 = 'b' 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -40,2 +40,3 @@
           "filtered": "100.00",
+          "using_where": true,
           "cost_info": {
@@ -49,4 +50,3 @@
             "s1"
-          ],
-          "attached_condition": "<if>(is_not_null_compl(t2), (`test`.`t2`.`id` = `test`.`t1`.`id`), true)"
+          ]
         }
QUERY: SELECT * from t1 where a = 1 and b is null order by a desc, b desc 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -28,2 +28,3 @@
         "filtered": "100.00",
+        "using_where": true,
         "using_index": true,
@@ -39,4 +40,3 @@
           "c"
-        ],
-        "attached_condition": "(`test`.`t1`.`b` is null)"
+        ]
       }
QUERY: SELECT * from t1 where b=1 or b is null order by a 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -26,3 +26,3 @@
         "filtered": "100.00",
-        "index_condition": "((`test`.`t1`.`b` = 1) or (`test`.`t1`.`b` is null))",
+        "index_condition": true,
         "cost_info": {
QUERY: SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -25,9 +25,10 @@
         "rows_examined_per_scan": 1,
-        "rows_produced_per_join": 0,
-        "filtered": "75.00",
+        "rows_produced_per_join": 1,
+        "filtered": "100.00",
+        "using_where": true,
         "cost_info": {
           "read_cost": "0.25",
-          "eval_cost": "0.08",
+          "eval_cost": "0.10",
           "prefix_cost": "0.35",
-          "data_read_per_join": "12"
+          "data_read_per_join": "16"
         },
@@ -36,4 +37,3 @@
           "c"
-        ],
-        "attached_condition": "((`test`.`t1`.`c` = 10) or (`test`.`t1`.`c` is null))"
+        ]
       }
QUERY: SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c DESC 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -25,9 +25,10 @@
         "rows_examined_per_scan": 1,
-        "rows_produced_per_join": 0,
-        "filtered": "75.00",
+        "rows_produced_per_join": 1,
+        "filtered": "100.00",
+        "using_where": true,
         "cost_info": {
           "read_cost": "0.25",
-          "eval_cost": "0.08",
+          "eval_cost": "0.10",
           "prefix_cost": "0.35",
-          "data_read_per_join": "12"
+          "data_read_per_join": "16"
         },
@@ -36,4 +37,3 @@
           "c"
-        ],
-        "attached_condition": "((`test`.`t1`.`c` = 10) or (`test`.`t1`.`c` is null))"
+        ]
       }
QUERY: UPDATE t1 SET b = CONCAT(b, ', max(a) in t2: ', (SELECT MAX(a) FROM t2)) WHERE a = 5 
STATUS:NOT_EQUAL
SYNC_POINT:planned_single_update
Diff: EXPLAIN NORMAL vs OTHER
@@ -24,3 +24,3 @@
       "filtered": "100.00",
-      "attached_condition": "(`test`.`t1`.`a` = 5)"
+      "using_where": true
     },
@@ -32,3 +32,3 @@
           "select_id": 2,
-          "message": "Select tables optimized away"
+          "message": "Plan isn't ready yet"
         }
QUERY: UPDATE t1, t2 SET t1.b = CONCAT(t1.b, ', t2.b:', t2.b), t2.b = CONCAT(t2.b, ', t1.b:', t1.b) WHERE t2.b = t1.b and t2.a = 4 
STATUS: EQUAL
QUERY: SELECT s.oxid FROM t1 v, t1 s  WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND v.oxrootid ='d8c4177d09f8b11f5.52725521' AND s.oxleft > v.oxleft AND s.oxleft < v.oxright 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -58,9 +58,10 @@
           "rows_examined_per_scan": 5,
-          "rows_produced_per_join": 4,
-          "filtered": "16.67",
+          "rows_produced_per_join": 25,
+          "filtered": "100.00",
+          "using_where": true,
           "cost_info": {
             "read_cost": "2.50",
-            "eval_cost": "0.42",
+            "eval_cost": "2.50",
             "prefix_cost": "6.00",
-            "data_read_per_join": "466"
+            "data_read_per_join": "2K"
           },
@@ -70,4 +71,3 @@
             "OXROOTID"
-          ],
-          "attached_condition": "((`test`.`s`.`OXLEFT` > `test`.`v`.`OXLEFT`) and (`test`.`s`.`OXLEFT` < `test`.`v`.`OXRIGHT`))"
+          ]
         }
QUERY: SELECT * from t1 where b = (select b from t2 where t1.a = t2.a) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -13,2 +13,3 @@
       "filtered": "100.00",
+      "using_where": true,
       "cost_info": {
@@ -23,3 +24,2 @@
       ],
-      "attached_condition": "(`test`.`t1`.`b` = (/* select#2 */ select `test`.`t2`.`b` from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))",
       "attached_subqueries": [
QUERY: DELETE from t1 where b = (select b from t2 where t1.a = t2.a) 
STATUS:NOT_EQUAL
SYNC_POINT:planned_single_delete
Diff: EXPLAIN NORMAL vs OTHER
@@ -10,40 +10,10 @@
       "filtered": "100.00",
-      "attached_condition": "(`test`.`t1`.`b` = (/* select#2 */ select `test`.`t2`.`b` from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)))",
+      "using_where": true,
       "attached_subqueries": [
         {
-          "dependent": true,
-          "cacheable": false,
+          "dependent": false,
+          "cacheable": true,
           "query_block": {
             "select_id": 2,
-            "cost_info": {
-              "query_cost": "0.35"
-            },
-            "table": {
-              "table_name": "t2",
-              "access_type": "eq_ref",
-              "possible_keys": [
-                "PRIMARY"
-              ],
-              "key": "PRIMARY",
-              "used_key_parts": [
-                "a"
-              ],
-              "key_length": "4",
-              "ref": [
-                "test.t1.a"
-              ],
-              "rows_examined_per_scan": 1,
-              "rows_produced_per_join": 1,
-              "filtered": "100.00",
-              "cost_info": {
-                "read_cost": "0.25",
-                "eval_cost": "0.10",
-                "prefix_cost": "0.35",
-                "data_read_per_join": "16"
-              },
-              "used_columns": [
-                "a",
-                "b"
-              ]
-            }
+            "message": "Plan isn't ready yet"
           }
QUERY: SELECT DISTINCT topic FROM t2 WHERE NOT EXISTS(SELECT * FROM t3 WHERE numeropost=topic) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -57,2 +57,3 @@
             "filtered": "100.00",
+            "using_where": true,
             "not_exists": true,
@@ -67,4 +68,3 @@
               "numeropost"
-            ],
-            "attached_condition": "<if>(is_not_null_compl(t3), <if>(found_match(t3), false, true), true)"
+            ]
           }
QUERY: DELETE FROM t1 WHERE topic IN (SELECT DISTINCT topic FROM t2 WHERE NOT EXISTS(SELECT * FROM t3 WHERE numeropost=topic)) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -14,2 +14,3 @@
       "filtered": "100.00",
+      "using_where": true,
       "cost_info": {
@@ -23,3 +24,2 @@
       ],
-      "attached_condition": "<in_optimizer>(`test`.`t1`.`topic`,<exists>(/* select#2 */ select `test`.`t2`.`topic` from `test`.`t2` anti join (`test`.`t3`) on((`test`.`t3`.`numeropost` = `test`.`t2`.`topic`)) where (<cache>(`test`.`t1`.`topic`) = `test`.`t2`.`topic`)))",
       "attached_subqueries": [
@@ -82,2 +82,3 @@
                   "filtered": "100.00",
+                  "using_where": true,
                   "not_exists": true,
@@ -92,4 +93,3 @@
                     "numeropost"
-                  ],
-                  "attached_condition": "<if>(is_not_null_compl(t3), <if>(found_match(t3), false, true), true)"
+                  ]
                 }
QUERY: SELECT cns.id, cns.max_anno_dep, cns.max_anno_dep = (SELECT s.anno_dep FROM t1 AS s WHERE s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM t2 AS cns 
STATUS: EQUAL
QUERY: SELECT (SELECT 1 FROM  t1 WHERE t1.a=t2.a ORDER BY t1.b LIMIT 1) AS d1 FROM t2 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -51,2 +51,3 @@
               "filtered": "100.00",
+              "using_where": true,
               "using_index": true,
@@ -61,4 +62,3 @@
                 "b"
-              ],
-              "attached_condition": "(`test`.`t1`.`a` = `test`.`t2`.`a`)"
+              ]
             }
QUERY: SELECT t1.pk FROM t1 WHERE t1.col_varchar_key < ALL ( SELECT * FROM v1 ) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -11,3 +11,3 @@
           "select_id": 2,
-          "message": "Not optimized, outer query is empty",
+          "message": "Plan isn't ready yet",
           "table": {
@@ -20,3 +20,3 @@
                   "using_temporary_table": true,
-                  "message": "Not optimized, outer query is empty",
+                  "message": "Plan isn't ready yet",
                   "query_specifications": [
@@ -27,3 +27,3 @@
                         "select_id": 3,
-                        "message": "Not optimized, outer query is empty"
+                        "message": "Plan isn't ready yet"
                       }
@@ -35,3 +35,3 @@
                         "select_id": 4,
-                        "message": "Not optimized, outer query is empty"
+                        "message": "Plan isn't ready yet"
                       }
QUERY: SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -25,2 +25,3 @@
           "filtered": "100.00",
+          "using_where": true,
           "using_index": true,
@@ -35,4 +36,3 @@
             "c"
-          ],
-          "attached_condition": "(`test`.`t3`.`b` is not null)"
+          ]
         }
QUERY: SELECT alias2.col_varchar_nokey FROM v1 AS alias1 RIGHT JOIN t1 AS alias2 ON 1 WHERE alias2.col_varchar_key IN ( SELECT sq2_alias1.col_varchar_nokey FROM v1 AS sq2_alias1 LEFT JOIN t1 AS sq2_alias2 ON (sq2_alias2.col_int_key = sq2_alias1.pk) WHERE sq2_alias1.pk != alias1.col_int_key AND sq2_alias1.col_varchar_key > alias1.col_varchar_key ) 
STATUS:NOT_EQUAL
SYNC_POINT:after_join_optimize
Diff: EXPLAIN NORMAL vs OTHER
@@ -43,2 +43,3 @@
             "filtered": "20.00",
+            "using_where": true,
             "using_join_buffer": "hash join",
@@ -53,4 +54,3 @@
               "col_varchar_nokey"
-            ],
-            "attached_condition": "(`test`.`alias2`.`col_varchar_key` = `test`.`t1`.`col_varchar_nokey`)"
+            ]
           }
@@ -66,3 +66,3 @@
             "rows_produced_per_join": 6,
-            "filtered": "26.66",
+            "filtered": "100.00",
             "range_checked_for_each_record": "index map: 0x4",
@@ -98,2 +98,3 @@
             "filtered": "100.00",
+            "using_where": true,
             "using_index": true,
@@ -107,4 +108,3 @@
               "col_int_key"
-            ],
-            "attached_condition": "<if>(is_not_null_compl(sq2_alias2), (`test`.`sq2_alias2`.`col_int_key` = `test`.`t1`.`pk`), true)"
+            ]
           }
QUERY: SELECT alias2.col_varchar_nokey FROM t1 AS alias2 LEFT JOIN v1 AS alias1 ON 1 WHERE alias2.col_varchar_key IN ( SELECT sq2_alias1.col_varchar_nokey FROM v1 AS sq2_alias1 LEFT JOIN t1 AS sq2_alias2 ON (sq2_alias2.col_int_key = sq2_alias1.pk) WHERE sq2_alias1.pk != alias1.col_int_key AND sq2_alias1.col_varchar_key > alias1.col_varchar_key ) 
STATUS:NOT_EQUAL
SYNC_POINT:after_join_optimize
Diff: EXPLAIN NORMAL vs OTHER
@@ -43,2 +43,3 @@
             "filtered": "20.00",
+            "using_where": true,
             "using_join_buffer": "hash join",
@@ -53,4 +54,3 @@
               "col_varchar_nokey"
-            ],
-            "attached_condition": "(`test`.`alias2`.`col_varchar_key` = `test`.`t1`.`col_varchar_nokey`)"
+            ]
           }
@@ -66,3 +66,3 @@
             "rows_produced_per_join": 6,
-            "filtered": "26.66",
+            "filtered": "100.00",
             "range_checked_for_each_record": "index map: 0x4",
@@ -98,2 +98,3 @@
             "filtered": "100.00",
+            "using_where": true,
             "using_index": true,
@@ -107,4 +108,3 @@
               "col_int_key"
-            ],
-            "attached_condition": "<if>(is_not_null_compl(sq2_alias2), (`test`.`sq2_alias2`.`col_int_key` = `test`.`t1`.`pk`), true)"
+            ]
           }
QUERY: SELECT d FROM (SELECT * FROM t2) AS a2 RIGHT JOIN (SELECT * FROM t1) AS a1 ON c = a WHERE d LIKE '_' ORDER BY d 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -38,2 +38,3 @@
             "filtered": "50.00",
+            "using_where": true,
             "cost_info": {
@@ -47,4 +48,3 @@
               "d"
-            ],
-            "attached_condition": "((`test`.`t2`.`c` = NULL) and (`test`.`t2`.`d` like '_'))"
+            ]
           }
QUERY: SELECT (SELECT rs.t2_id FROM t2 rs WHERE rs.t1_id= (SELECT lt.t1_id FROM t1 lt WHERE lt.t3_id=a.t3_id) ORDER BY b DESC LIMIT 1) from t3 AS a 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -51,2 +51,3 @@
               "filtered": "100.00",
+              "using_where": true,
               "using_index": true,
@@ -63,3 +64,2 @@
               ],
-              "attached_condition": "(`test`.`rs`.`t1_id` = (/* select#3 */ select NULL from `test`.`t1` `lt` where multiple equal('3', NULL)))",
               "attached_subqueries": [
QUERY: UPDATE t1 join t2 on (t1.a=t2.a) set t1.id=t2.id 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -15,2 +15,3 @@
           "filtered": "100.00",
+          "using_where": true,
           "cost_info": {
@@ -24,4 +25,3 @@
             "a"
-          ],
-          "attached_condition": "(`test`.`t2`.`a` is not null)"
+          ]
         }
QUERY: SELECT DISTINCT   alias2.col_int AS field1 , alias2.col_int AS field2 FROM  a1 AS alias1 LEFT  JOIN aa1 AS alias2 ON  alias1.pk =  alias2.pk WHERE ( alias1.col_int = 8 OR alias1 .pk <= alias1.col_int ) GROUP BY field1, field2  ORDER BY field1, field2 DESC
STATUS: EQUAL
QUERY: SELECT DISTINCT   alias1.pk AS field1 FROM  f1 AS alias1 LEFT  JOIN a2 AS alias2 ON  alias1.col_varchar_1024_latin1_key =  alias2 .col_varchar_10_utf8_key WHERE alias1.pk  IN (5, 5) GROUP BY field1 HAVING field1 <= 3
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -47,3 +47,3 @@
             "filtered": "100.00",
-            "index_condition": "(`test`.`alias1`.`pk` in (5,5))",
+            "index_condition": true,
             "cost_info": {
QUERY: SELECT alias1.pk AS field1 FROM  h2 AS alias1 LEFT  JOIN aa3 AS alias2 ON  alias1.pk =  alias2.col_int_key WHERE alias1.pk <> 9 GROUP BY field1 ORDER BY field1 LIMIT 1 OFFSET 3
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -27,2 +27,3 @@
               "filtered": "100.00",
+              "using_where": true,
               "using_index": true,
@@ -36,4 +37,3 @@
                 "pk"
-              ],
-              "attached_condition": "(`test`.`alias1`.`pk` <> 9)"
+              ]
             }
QUERY: SELECT    alias1.pk AS field1 FROM  e1 AS alias1 RIGHT  JOIN cc2 AS alias2 ON  alias1.col_int =  alias2.col_int WHERE alias1.col_int_key  IN (8) 
STATUS:NOT_EQUAL
SYNC_POINT:before_reset_query_plan
Diff: EXPLAIN NORMAL vs OTHER
@@ -44,4 +44,5 @@
           "rows_examined_per_scan": 2,
-          "rows_produced_per_join": 1,
-          "filtered": "50.00",
+          "rows_produced_per_join": 2,
+          "filtered": "100.00",
+          "using_where": true,
           "using_join_buffer": "hash join",
@@ -49,5 +50,5 @@
             "read_cost": "0.25",
-            "eval_cost": "0.10",
+            "eval_cost": "0.20",
             "prefix_cost": "0.80",
-            "data_read_per_join": "8"
+            "data_read_per_join": "16"
           },
@@ -55,4 +56,3 @@
             "col_int"
-          ],
-          "attached_condition": "(`test`.`alias2`.`col_int` = `test`.`alias1`.`col_int`)"
+          ]
         }
QUERY: SELECT DISTINCT alias2.pk AS field1, alias2.pk AS field2, alias2.pk AS field3 FROM t1 AS alias1 RIGHT JOIN t2 AS alias2  ON  alias1.col_varchar_key =  alias2.col_varchar_key WHERE alias1.col_int >alias1.col_int HAVING field3 = 7 ORDER BY field1, field2, field3 LIMIT 10 OFFSET 1
STATUS: EQUAL