Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17326

@@optimizer_switch = 'outer_join_with_cache=off' changes answer of query

    XMLWordPrintable

Details

    Description

      With this optimizer flag off,

      select * from v_tax_collected AS rf WHERE rf.`est_activity_date` BETWEEN date'2018-08-01' AND date'2018-08-31' AND rf.`region` LIKE 'California' and order_increment_id = '112967661'  \G
      *************************** 1. row ***************************
                         store_id: 1
                       created_at: 2018-08-07 12:17:41
                      captured_at: 2018-08-07 12:17:41
                est_activity_date: 2018-08-07
                   payment_source: other
                 payment_trans_id: ex2542vb
                          cc_type: Visa
                   payment_method: gene_braintree_creditcard
               order_increment_id: 112967661
                       invoice_id: 122916015
                    creditmemo_id: NULL
                           region: California
                         postcode: 90815
           taxable_product_amount: 55.89
         taxable_product_discount: 0.00
        nontaxable_product_amount: 0.00
      nontaxable_product_discount: 0.00
        total_product_amount_star: 55.89
         total_product_tax_amount: 5.73
                  shipping_amount: 0.00
         shipping_discount_amount: 0.00
              shipping_tax_amount: 0.00
         total_tax_collected_star: 5.73
                     store_credit: 0.00
                        gift_card: 0.00
                    reward_points: 0.00
                       adjustment: 0.00
                      grand_total: 61.62
                 grand_total_paid: 61.62
      

      With it on:

      select * from v_tax_collected AS rf WHERE rf.`est_activity_date` BETWEEN date'2018-08-01' AND date'2018-08-31' AND rf.`region` LIKE 'California' and order_increment_id = '112967661'  \G
      *************************** 1. row ***************************
                         store_id: 1
                       created_at: 2018-08-07 12:17:41
                      captured_at: 2018-08-07 12:17:41
                est_activity_date: 2018-08-07
                   payment_source: other
                 payment_trans_id: ex2542vb
                          cc_type: Visa
                   payment_method: gene_braintree_creditcard
               order_increment_id: 112967661
                       invoice_id: 122916015
                    creditmemo_id: NULL
                           region: California
                         postcode: 90815
           taxable_product_amount: 0.00
         taxable_product_discount: 0.00
        nontaxable_product_amount: 0.00
      nontaxable_product_discount: 0.00
        total_product_amount_star: 0.00
         total_product_tax_amount: 0.00
                  shipping_amount: 0.00
         shipping_discount_amount: 0.00
              shipping_tax_amount: 0.00
         total_tax_collected_star: 5.73
                     store_credit: 0.00
                        gift_card: 0.00
                    reward_points: 0.00
                       adjustment: 0.00
                      grand_total: 61.62
                 grand_total_paid: 61.62
      

      Attachments

        Activity

          People

            alice Alice Sherepa
            aredridel Aria Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.