[MDEV-11866] main.analyze_format_json, main.analyze_stmt_orderby can fail with a mismatch Created: 2017-01-21  Updated: 2017-11-02  Resolved: 2017-11-02

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.1, 10.2
Fix Version/s: 10.1.22

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Varun Gupta (Inactive)
Resolution: Fixed Votes: 0
Labels: contribution, patch

Sprint: 10.1.29

 Description   

Reported in the email thread.
I'm not getting it on my machine, but the reason is obvious:

main.analyze_format_json                 w4 [ fail ]
        Test ended at 2017-01-21 16:23:31
 
CURRENT_TEST: main.analyze_format_json
--- /usr/share/mysql-test/r/analyze_format_json.result  2017-01-17 20:38:20.000000000 +0100
+++ /usr/share/mysql-test/r/analyze_format_json.reject  2017-01-21 16:23:31.740853974 +0100
@@ -455,7 +455,7 @@
               "r_loops": 1,
               "rows": 10,
               "r_rows": 10,
-              "r_total_time_ms": "REPLACED",
+              "r_total_time_ms": "REPLACED"e-4,
               "filtered": 100,
               "r_filtered": 20,
               "attached_condition": "(tbl2.a in (2,3))"
 
mysqltest: Result length mismatch

main.analyze_stmt_orderby 'xtradb'       w4 [ fail ]
        Test ended at 2017-01-21 18:43:58
 
CURRENT_TEST: main.analyze_stmt_orderby
--- /usr/share/mysql-test/r/analyze_stmt_orderby.result 2017-01-17 20:38:20.000000000 +0100
+++ /usr/share/mysql-test/r/analyze_stmt_orderby.reject 2017-01-21 18:43:58.130938437 +0100
@@ -417,7 +417,7 @@
             "r_loops": 1,
             "rows": 10,
             "r_rows": 10,
-            "r_total_time_ms": "REPLACED",
+            "r_total_time_ms": "REPLACED"e-3,
             "filtered": 100,
             "r_filtered": 100
           },
@@ -486,7 +486,7 @@
                 "r_loops": 1,
                 "rows": 7,
                 "r_rows": 7,
-                "r_total_time_ms": "REPLACED",
+                "r_total_time_ms": "REPLACED"e-4,
                 "filtered": 100,
                 "r_filtered": 100
               },
 
mysqltest: Result length mismatch



 Comments   
Comment by Daniel Black [ 2017-01-23 ]

from 10.2 only:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/193566271/log.txt

--- /home/travis/build/grooverdan/mariadb-server/mysql-test/r/cte_recursive.result	2017-01-20 00:21:50.342165997 +0000
+++ /home/travis/build/grooverdan/mariadb-server/mysql-test/r/cte_recursive.reject	2017-01-20 01:05:17.674165997 +0000
@@ -2364,7 +2364,7 @@
       "r_loops": 1,
       "rows": 2,
       "r_rows": 10,
-      "r_total_time_ms": "REPLACED"e-4,
+      "r_total_time_ms": "REPLACED",
       "filtered": 100,
       "r_filtered": 100,
       "materialized": {
 
mysqltest: Result length mismatch

added commit to pr 292

Comment by Elena Stepanova [ 2017-01-23 ]

Yeah that's an easy fix, but I'm not quite sure that's what we need. Do we really want the exponent format in ANALYZE output to begin with?

Assigning to psergey to decide.

Comment by Sergei Petrunia [ 2017-01-24 ]

I don't see an issue with exponent format, it's actually good for very big/small values.
It is also nice that the patch puts the regex into one place.
I've had one change request which I posted in the github PR.

Comment by Elena Stepanova [ 2017-01-30 ]

Restoring previously removed comment. The failure in main.cte_recursive is mentioned above in the comments (which is why I deleted my comment earlier), but it turns out that the conversation on github suggests that it is currently considered not reproducible – incorrectly, because it does happen in buildbot:

http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-quantal-amd64/builds/4582/steps/test/logs/stdio

 
main.cte_recursive w3 [ fail ] 
        Test ended at 2017-01-29 20:16:34 
 
CURRENT_TEST: main.cte_recursive 
--- /usr/local/mariadb-10.2.4-linux-x86_64/mysql-test/r/cte_recursive.result 2017-01-29 19:32:09.000000000 +0200 
+++ /usr/local/mariadb-10.2.4-linux-x86_64/mysql-test/r/cte_recursive.reject 2017-01-29 20:16:34.377172490 +0200 
@@ -2364,7 +2364,7 @@ 
       "r_loops": 1, 
       "rows": 2, 
       "r_rows": 10, 
- "r_total_time_ms": "REPLACED", 
+ "r_total_time_ms": "REPLACED"e-4, 
       "filtered": 100, 
       "r_filtered": 100, 
       "materialized": { 
 
mysqltest: Result length mismatch 

Comment by Elena Stepanova [ 2017-01-30 ]

serg has fixed cte_recursive in 10.2, so you can ignore this one

Comment by Sergei Petrunia [ 2017-01-30 ]

Ok serg has fixed the 10.2 part https://github.com/MariaDB/server/commit/9f918b9cf48989a9c1fedbd3fd8849d4d6892690.

his fix is not using include/analyze-format.inc but it also works. (pull request #292 has not yet been merged from 10.1 so it's not possible to change)

Comment by Sergei Golubchik [ 2017-01-30 ]

yes, I remember that pull request, and I checked that include/analyze-format.inc wasn't in 10.2 yet.
So I consider my fix being a temporary one, and on 10.1 merge it should be replaced with include/analyze-format.inc

Comment by Varun Gupta (Inactive) [ 2017-11-02 ]

Fixed with include/analyze-format.inc in 10.1.22

Generated at Thu Feb 08 07:53:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.