Closed
Bug 405861
Opened 17 years ago
Closed 17 years ago
Checking the field "matches the Regexp" in the Environment Name
Categories
(Testopia :: Environments, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vsushma54, Assigned: gregaryh)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10
Build Identifier:
1. Click on the tab "Find Test Run Environment"
2. Then select "matches the Regexp" from the down menu which besides the "Environment Name".
3. Then type * in the text box .
4. Don't select anything else
5. Then click on the "search" button
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Actual Results:
Software error:
DBD::mysql::db selectcol_arrayref failed: Got error 'repetition-operator operand invalid' from regexp [for Statement "SELECT test_environments.environment_id FROM test_environments WHERE test_environments.product_id IN (66,123,128,96,64,58,20,122,109,49,110,86,69,25,26,29,104,44,45,28,50,21,11,12,47,51,90,120,70,2,40,106,127,54,56,16,15,18,92,117,63,38,89,17,3,98,84,116,114,129,113,126,125,48,7,105,24,124,55,53,119,4,78,68,52,19,121,118,107,112,111,115,13,1,100,108,94,6) AND ((test_environments.name REGEXP '*')) GROUP BY test_environments.environment_id"] at Bugzilla/Testopia/Table.pm line 121
Bugzilla::Testopia::Table::init('Bugzilla::Testopia::Table=HASH(0xa748124)', 'environment', 'tr_list_environments.cgi', 'Bugzilla::CGI=HASH(0xa5734c8)', 'undef', 'SELECT test_environments.environment_id FROM test_environment...') called at Bugzilla/Testopia/Table.pm line 88
Bugzilla::Testopia::Table::new('Bugzilla::Testopia::Table', 'environment', 'tr_list_environments.cgi', 'Bugzilla::CGI=HASH(0xa5734c8)', 'undef', 'SELECT test_environments.environment_id FROM test_environment...') called at /var/www/html/testopia_tip/tr_list_environments.cgi line 53
For help, please send mail to the webmaster (webmaster@bugzilla.org), giving this error message and the time and date of the error.
Expected Results:
Then it should display Environment Names having * if exists , or should display some error message if its not proper Regexp
Comment 1•17 years ago
|
||
> Expected Results:
> Then it should display Environment Names having * if exists
"*" by itself is not a valid regexp.
> or should display
> some error message if its not proper Regexp
Perl cannot tell what mysql or postgresql consider valid. The error message you received is the only one possible. This is really the same problem as bug 157092, except that bug is against Bugzilla.
BTW, if you want all environments, searching by regexp is a really bad idea. If you just leave Environment Name blank, you'll get the same effect but much more efficiently.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Comment 2•17 years ago
|
||
Vance--I discovered this problem when I was using Testopia last night to demonstrate to my students the diff between "*" and ".*" when interpreted within regular expressions. I was using the Search form for Test Runs, I believe. Since one can do...
grep "*" <filename>
to look for an actual asterisk within <filename>, I fully expected Testopia to either return a short list of Test Runs that contained an asterisk in their summaries OR (more likely) an empty list. I was then going to demonstrate how much longer the list of hits was when we switched to .* But the * search string gave us the error above, so I asked my students to file this bug.
To summarize my view on this bug:
1. While perhaps not very common, a Testopia user *could* need to search for an actual asterisk at the beginning of a regular expression.
2. If Testopia cannot easily be made to handle #1, it would be nice if it could at least provide a more user-friendly rejection of the user's input.
Comment 3•17 years ago
|
||
> 1. While perhaps not very common, a Testopia user *could* need to search for
> an actual asterisk at the beginning of a regular expression.
In that case, try \*
> 2. If Testopia cannot easily be made to handle #1, it would be nice if it
> could at least provide a more user-friendly rejection of the user's input.
But we can't. Testopia cannot tell how the database is going to interpret regular expressions.
Summary: Testopia is not doing any regular expression handling here. Rather, the database (MySQL or PostgreSQL) is doing it. Bugzilla has the exact same issue, and the bug has been open since 2002. If Bugzilla fixes it, Testopia might be able to pick up the fix. Don't hold your breath though -- sorry.
You need to log in
before you can comment on or make changes to this bug.
Description
•