Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
3a5de3cb
Commit
3a5de3cb
authored
May 27, 2004
by
bugreport%peshkin.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 243351: Fix mysql version sensitivity in case-sensitive search
r=jouni a=justdave
parent
c5718f38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
DB.pm
Bugzilla/DB.pm
+10
-0
Search.pm
Bugzilla/Search.pm
+9
-1
checksetup.pl
checksetup.pl
+5
-0
No files found.
Bugzilla/DB.pm
View file @
3a5de3cb
...
...
@@ -164,6 +164,16 @@ sub _handle_error {
return
0
;
# Now let DBI handle raising the error
}
my
$cached_server_version
;
sub
server_version
{
return
$cached_server_version
if
defined
(
$cached_server_version
);
my
$dbh
=
Bugzilla
->
dbh
;
my
$sth
=
$dbh
->
prepare
(
'SELECT VERSION()'
);
$sth
->
execute
();
(
$cached_server_version
)
=
$sth
->
fetchrow_array
();
return
$cached_server_version
;
}
1
;
__END__
...
...
Bugzilla/Search.pm
View file @
3a5de3cb
...
...
@@ -711,7 +711,15 @@ sub init {
$term
=
"$ff != $q"
;
},
",casesubstring"
=>
sub
{
$term
=
"INSTR(CAST($ff AS BINARY), CAST($q AS BINARY))"
;
# mysql 4.0.1 and lower do not support CAST
# mysql 3.*.* had a case-sensitive INSTR
# (checksetup has a check for unsupported versions)
my
$server_version
=
Bugzilla::
DB
->
server_version
;
if
(
$server_version
=~
/^3\./
)
{
$term
=
"INSTR($ff ,$q)"
;
}
else
{
$term
=
"INSTR(CAST($ff AS BINARY), CAST($q AS BINARY))"
;
}
},
",substring"
=>
sub
{
$term
=
"INSTR(LOWER($ff), "
.
lc
(
$q
)
.
")"
;
...
...
checksetup.pl
View file @
3a5de3cb
...
...
@@ -1449,6 +1449,11 @@ if ($my_db_check) {
" Bugzilla requires version $sql_want or later of MySQL.\n"
.
" Please visit http://www.mysql.com/ and download a newer version.\n"
;
}
if
((
$sql_vers
=~
/^4\.0\.(\d+)/
)
&&
(
$1
<
2
))
{
die
"\nYour MySQL server is incompatible with Bugzilla.\n"
.
" Bugzilla does not support versions 4.x.x below 4.0.2.\n"
.
" Please visit http://www.mysql.com/ and download a newer version.\n"
;
}
my
@databases
=
$dbh
->
func
(
'_ListDBs'
);
unless
(
grep
/^$my_db_name$/
,
@databases
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment