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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ceb050a8
Commit
ceb050a8
authored
Aug 03, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
parents
237d867f
86311166
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
33 deletions
+46
-33
mysql-test/r/xml.result
mysql-test/r/xml.result
+6
-0
mysql-test/t/xml.test
mysql-test/t/xml.test
+6
-0
sql/item_xmlfunc.cc
sql/item_xmlfunc.cc
+2
-1
strings/ctype.c
strings/ctype.c
+28
-28
strings/xml.c
strings/xml.c
+4
-4
No files found.
mysql-test/r/xml.result
View file @
ceb050a8
...
...
@@ -704,3 +704,9 @@ a
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns')
myns
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar');
extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar')
Data
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something');
extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something')
Otherdata
mysql-test/t/xml.test
View file @
ceb050a8
...
...
@@ -354,3 +354,9 @@ DROP PROCEDURE p2;
select
extractValue
(
'<ns:element xmlns:ns="myns"/>'
,
'count(ns:element)'
);
select
extractValue
(
'<ns:element xmlns:ns="myns">a</ns:element>'
,
'/ns:element'
);
select
extractValue
(
'<ns:element xmlns:ns="myns">a</ns:element>'
,
'/ns:element/@xmlns:ns'
);
#
# Bug#20795 extractvalue() won't accept names containing a dot (.)
#
select
extractValue
(
'<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>'
,
'/foo/foo.bar'
);
select
extractValue
(
'<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>'
,
'/foo/something'
);
sql/item_xmlfunc.cc
View file @
ceb050a8
...
...
@@ -1356,7 +1356,8 @@ my_xpath_lex_scan(MY_XPATH *xpath,
(
length
=
xpath
->
cs
->
cset
->
ctype
(
xpath
->
cs
,
&
ctype
,
(
const
uchar
*
)
beg
,
(
const
uchar
*
)
end
))
>
0
&&
((
ctype
&
(
_MY_L
|
_MY_U
|
_MY_NMR
))
||
*
beg
==
'_'
||
*
beg
==
'-'
)
;
((
ctype
&
(
_MY_L
|
_MY_U
|
_MY_NMR
))
||
*
beg
==
'_'
||
*
beg
==
'-'
||
*
beg
==
'.'
)
;
beg
+=
length
)
/* no op */
;
lex
->
end
=
beg
;
...
...
strings/ctype.c
View file @
ceb050a8
...
...
@@ -80,35 +80,35 @@ struct my_cs_file_section_st
static
struct
my_cs_file_section_st
sec
[]
=
{
{
_CS_MISC
,
"xml"
},
{
_CS_MISC
,
"xml
.
version"
},
{
_CS_MISC
,
"xml
.
encoding"
},
{
_CS_MISC
,
"xml
/
version"
},
{
_CS_MISC
,
"xml
/
encoding"
},
{
_CS_MISC
,
"charsets"
},
{
_CS_MISC
,
"charsets
.
max-id"
},
{
_CS_CHARSET
,
"charsets
.
charset"
},
{
_CS_PRIMARY_ID
,
"charsets
.charset.
primary-id"
},
{
_CS_BINARY_ID
,
"charsets
.charset.
binary-id"
},
{
_CS_CSNAME
,
"charsets
.charset.
name"
},
{
_CS_FAMILY
,
"charsets
.charset.
family"
},
{
_CS_CSDESCRIPT
,
"charsets
.charset.
description"
},
{
_CS_MISC
,
"charsets
.charset.
alias"
},
{
_CS_MISC
,
"charsets
.charset.
ctype"
},
{
_CS_CTYPEMAP
,
"charsets
.charset.ctype.
map"
},
{
_CS_MISC
,
"charsets
.charset.
upper"
},
{
_CS_UPPERMAP
,
"charsets
.charset.upper.
map"
},
{
_CS_MISC
,
"charsets
.charset.
lower"
},
{
_CS_LOWERMAP
,
"charsets
.charset.lower.
map"
},
{
_CS_MISC
,
"charsets
.charset.
unicode"
},
{
_CS_UNIMAP
,
"charsets
.charset.unicode.
map"
},
{
_CS_COLLATION
,
"charsets
.charset.
collation"
},
{
_CS_COLNAME
,
"charsets
.charset.collation.
name"
},
{
_CS_ID
,
"charsets
.charset.collation.
id"
},
{
_CS_ORDER
,
"charsets
.charset.collation.
order"
},
{
_CS_FLAG
,
"charsets
.charset.collation.
flag"
},
{
_CS_COLLMAP
,
"charsets
.charset.collation.
map"
},
{
_CS_RESET
,
"charsets
.charset.collation.rules.
reset"
},
{
_CS_DIFF1
,
"charsets
.charset.collation.rules.
p"
},
{
_CS_DIFF2
,
"charsets
.charset.collation.rules.
s"
},
{
_CS_DIFF3
,
"charsets
.charset.collation.rules.
t"
},
{
_CS_MISC
,
"charsets
/
max-id"
},
{
_CS_CHARSET
,
"charsets
/
charset"
},
{
_CS_PRIMARY_ID
,
"charsets
/charset/
primary-id"
},
{
_CS_BINARY_ID
,
"charsets
/charset/
binary-id"
},
{
_CS_CSNAME
,
"charsets
/charset/
name"
},
{
_CS_FAMILY
,
"charsets
/charset/
family"
},
{
_CS_CSDESCRIPT
,
"charsets
/charset/
description"
},
{
_CS_MISC
,
"charsets
/charset/
alias"
},
{
_CS_MISC
,
"charsets
/charset/
ctype"
},
{
_CS_CTYPEMAP
,
"charsets
/charset/ctype/
map"
},
{
_CS_MISC
,
"charsets
/charset/
upper"
},
{
_CS_UPPERMAP
,
"charsets
/charset/upper/
map"
},
{
_CS_MISC
,
"charsets
/charset/
lower"
},
{
_CS_LOWERMAP
,
"charsets
/charset/lower/
map"
},
{
_CS_MISC
,
"charsets
/charset/
unicode"
},
{
_CS_UNIMAP
,
"charsets
/charset/unicode/
map"
},
{
_CS_COLLATION
,
"charsets
/charset/
collation"
},
{
_CS_COLNAME
,
"charsets
/charset/collation/
name"
},
{
_CS_ID
,
"charsets
/charset/collation/
id"
},
{
_CS_ORDER
,
"charsets
/charset/collation/
order"
},
{
_CS_FLAG
,
"charsets
/charset/collation/
flag"
},
{
_CS_COLLMAP
,
"charsets
/charset/collation/
map"
},
{
_CS_RESET
,
"charsets
/charset/collation/rules/
reset"
},
{
_CS_DIFF1
,
"charsets
/charset/collation/rules/
p"
},
{
_CS_DIFF2
,
"charsets
/charset/collation/rules/
s"
},
{
_CS_DIFF3
,
"charsets
/charset/collation/rules/
t"
},
{
0
,
NULL
}
};
...
...
strings/xml.c
View file @
ceb050a8
...
...
@@ -159,7 +159,7 @@ static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len)
}
if
(
st
->
attrend
>
st
->
attr
)
{
st
->
attrend
[
0
]
=
'.
'
;
st
->
attrend
[
0
]
=
'/
'
;
st
->
attrend
++
;
}
memcpy
(
st
->
attrend
,
str
,
len
);
...
...
@@ -188,9 +188,9 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen)
char
g
[
32
];
int
rc
;
/* Find previous '
.
' or beginning */
for
(
e
=
p
->
attrend
;
(
e
>
p
->
attr
)
&&
(
e
[
0
]
!=
'
.
'
)
;
e
--
);
glen
=
(
uint
)
((
e
[
0
]
==
'
.
'
)
?
(
p
->
attrend
-
e
-
1
)
:
p
->
attrend
-
e
);
/* Find previous '
/
' or beginning */
for
(
e
=
p
->
attrend
;
(
e
>
p
->
attr
)
&&
(
e
[
0
]
!=
'
/
'
)
;
e
--
);
glen
=
(
uint
)
((
e
[
0
]
==
'
/
'
)
?
(
p
->
attrend
-
e
-
1
)
:
p
->
attrend
-
e
);
if
(
str
&&
(
slen
!=
glen
))
{
...
...
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