[MDEV-4977] ./mysql-test/mysql-test-run.pl not identifying mariadb version Created: 2013-09-02 Updated: 2013-11-13 Resolved: 2013-11-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.32 |
| Fix Version/s: | 5.5.34 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Daniel Black | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
5.5.32-MariaDB-1~wheezy for debian-linux-gnu on x86_64 |
||
| Attachments: |
|
| Description |
|
I followed the following steps after having an apt sources like for mariadb apt-get build-dep mariadb-5.5 edited debian/control and debian/rules as per https://kb.askmonty.org/en/how-to-produce-a-full-stack-trace-for-mysqld-the-mariadb-server/#comment_359 (except using 5.5 as version number) dpkg-buildpackage -us -uc (http://www.debian.org/doc/manuals/maint-guide/build.en.html) resulted in error: added "mtr_report("List: ", join("\n", @list));" before the mtr_error in ./mysql-test/mysql-test-run.pl rerunnign with dpkg-buildpackage -nc -us -uc revealed: A quick tests shows the regex not matching: perl |
| Comments |
| Comment by Elena Stepanova [ 2013-09-03 ] |
|
Hi Daniel, The regex does not find a match because you have a '+' in your file path. The logic might be worth fixing, but as a workaround, could you please try to remove it? |
| Comment by Daniel Black [ 2013-09-03 ] |
|
Yes renaming works. Thanks for identifying the obvious regex fault. Logging: ./mysql-test-run.pl --force Given the standard "apt-get source mariadb-5.5" creates this directory name I still think its worth fixing. |
| Comment by Daniel Black [ 2013-09-03 ] |
|
Since exe_mysqld isn't a regex escape everything that makes it look like one. so add: before: mtr_error("Could not find version of MariaDB") to test: |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
I don't feel quite safe modifying exe_mysqld, it might happen that it's used somewhere else. On the other hand, there seems no good reason to match the line with the complete path to mysqld, it should be enough to start with the file name, something like: === modified file 'mysql-test/mysql-test-run.pl' (\S)/ $1/g; my @list= split '\n', $list;
I'll pass it to serg to decide. |
| Comment by Daniel Black [ 2013-09-06 ] |
|
> I don't feel quite safe modifying exe_mysqld, it might happen that it's used somewhere else. It was a local variable that wasn't used again. > On the other hand, there seems no good reason to match the line with the complete path to mysqld, it should be enough to start with the file name, something like: It can get the incorrect version if a exe_mysql contains for example "/test/mysqld Ver 5.6.5/mariadb-5.5-5.5.32+maria/builddir/sql/mysqld" |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
You are right of course, sorry, blame late night for that. Assigning back to myself to take another look. |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
Hi Sergei, See the original suggestion by Daniel here: https://mariadb.atlassian.net/browse/MDEV-4977?focusedCommentId=34410&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-34410 . If the standard installation procedure creates a path which is not further recognized by MTR, I think it should be fixed. |
| Comment by Daniel Black [ 2013-09-23 ] |
|
Patch added for clarity |
| Comment by Daniel Black [ 2013-11-13 ] |
|
Nice use of \Q\E in regex, thanks Sergei |