Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
The current implementation of caching in mysqltest (q_lines, parser) breaks if the source command is executed conditionally in a loop.
There is a "fix" for that — commit fe3ea31d93 — where the source command is executed on the first iteration of a loop even if it should've been skipped, just to read the file into a cache.
This is, of course, wrong, because it fails if the file name is not available on the first iteration, or if t changes between iterations:
filename not available |
let $a=1;
|
while ($a < 3) {
|
if ($b) {
|
source $b;
|
}
|
let $b=1st.test;
|
inc $a;
|
}
|
filename changes |
let $a=1;
|
let $b=1st.test;
|
while ($a < 3) {
|
if ($b) {
|
source $b;
|
}
|
let $b=2nd.test;
|
inc $a;
|
}
|
Attachments
Issue Links
- relates to
-
MDEV-12130 Improve mysqltest language (Full-time project)
- Open
-
MDEV-12139 mysqltest: errors in source in a loop
- Open