Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fdee1cbb
Commit
fdee1cbb
authored
Apr 28, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#3556 - soundex
parent
b590c36a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+3
-3
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+1
-1
mysys/mf_soundex.c
mysys/mf_soundex.c
+2
-2
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
No files found.
mysql-test/r/func_str.result
View file @
fdee1cbb
...
...
@@ -77,9 +77,9 @@ bbbb bb bbbbbbbb aaaa bbbb
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ;
replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL')
this is a REAL test
select soundex(''),soundex('he'),soundex('hello all folks');
soundex('') soundex('he') soundex('hello all folks')
H000 H4142
select soundex(''),soundex('he'),soundex('hello all folks')
,soundex('#3556 in bugdb')
;
soundex('') soundex('he') soundex('hello all folks')
soundex('#3556 in bugdb')
H000 H4142
I51231
select md5('hello');
md5('hello')
5d41402abc4b2a76b9719d911017c592
...
...
mysql-test/t/func_str.test
View file @
fdee1cbb
...
...
@@ -35,7 +35,7 @@ SELECT CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),r
select
insert
(
'txs'
,
2
,
1
,
'hi'
),
insert
(
'is '
,
4
,
0
,
'a'
),
insert
(
'txxxxt'
,
2
,
4
,
'es'
);
select
replace
(
'aaaa'
,
'a'
,
'b'
),
replace
(
'aaaa'
,
'aa'
,
'b'
),
replace
(
'aaaa'
,
'a'
,
'bb'
),
replace
(
'aaaa'
,
''
,
'b'
),
replace
(
'bbbb'
,
'a'
,
'c'
);
select
replace
(
concat
(
lcase
(
concat
(
'THIS'
,
' '
,
'IS'
,
' '
,
'A'
,
' '
)),
ucase
(
'false'
),
' '
,
'test'
),
'FALSE'
,
'REAL'
)
;
select
soundex
(
''
),
soundex
(
'he'
),
soundex
(
'hello all folks'
);
select
soundex
(
''
),
soundex
(
'he'
),
soundex
(
'hello all folks'
)
,
soundex
(
'#3556 in bugdb'
)
;
select
md5
(
'hello'
);
select
sha
(
'abc'
);
select
sha1
(
'abc'
);
...
...
mysys/mf_soundex.c
View file @
fdee1cbb
...
...
@@ -51,7 +51,7 @@ void soundex(register my_string out_pntr, my_string in_pntr,
if
(
remove_garbage
)
{
while
(
*
in_pntr
&&
isspace
(
*
in_pntr
))
/* Skipp pre-space */
while
(
*
in_pntr
&&
!
isalpha
(
*
in_pntr
))
in_pntr
++
;
}
*
out_pntr
++
=
toupper
(
*
in_pntr
);
/* Copy first letter */
...
...
@@ -97,7 +97,7 @@ static char get_scode(char **ptr, pbool remove_garbage)
ch
=
toupper
(
**
ptr
);
if
(
ch
<
'A'
||
ch
>
'Z'
)
{
if
(
isalpha
(
ch
))
/* If ex
etended alf
a (country spec) */
if
(
isalpha
(
ch
))
/* If ex
tended alph
a (country spec) */
return
'0'
;
/* threat as vokal */
return
0
;
/* Can't map */
}
...
...
sql/item_strfunc.cc
View file @
fdee1cbb
...
...
@@ -1422,7 +1422,7 @@ String *Item_func_soundex::val_str(String *str)
char
*
to
=
(
char
*
)
tmp_value
.
ptr
();
char
*
from
=
(
char
*
)
res
->
ptr
(),
*
end
=
from
+
res
->
length
();
while
(
from
!=
end
&&
isspace
(
*
from
))
// Skip pre-space
while
(
from
!=
end
&&
!
isalpha
(
*
from
))
// Skip pre-space
from
++
;
/* purecov: inspected */
if
(
from
==
end
)
return
&
empty_string
;
// No alpha characters.
...
...
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