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
5b924b32
Commit
5b924b32
authored
Dec 10, 2008
by
V Narayanan
Browse files
Options
Browse Files
Download
Plain Diff
merging with mysql-5.1-bugteam
parents
4489e6c1
03ea91cc
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
89 additions
and
6 deletions
+89
-6
mysql-test/r/partition_mgm.result
mysql-test/r/partition_mgm.result
+7
-0
mysql-test/r/xml.result
mysql-test/r/xml.result
+24
-0
mysql-test/suite/parts/r/partition_special_innodb.result
mysql-test/suite/parts/r/partition_special_innodb.result
+5
-0
mysql-test/suite/parts/t/partition_special_innodb.test
mysql-test/suite/parts/t/partition_special_innodb.test
+2
-0
mysql-test/t/partition_mgm.test
mysql-test/t/partition_mgm.test
+11
-0
mysql-test/t/xml.test
mysql-test/t/xml.test
+25
-0
sql/ha_partition.cc
sql/ha_partition.cc
+1
-1
sql/partition_info.cc
sql/partition_info.cc
+1
-0
sql/sql_partition.cc
sql/sql_partition.cc
+2
-3
strings/xml.c
strings/xml.c
+11
-2
No files found.
mysql-test/r/partition_mgm.result
View file @
5b924b32
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY)
ENGINE MYISAM
PARTITION BY HASH (a)
PARTITIONS 1;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 REORGANIZE PARTITION;
DROP TABLE t1;
create table t1 (a int)
create table t1 (a int)
partition by range (a)
partition by range (a)
subpartition by key (a)
subpartition by key (a)
...
...
mysql-test/r/xml.result
View file @
5b924b32
...
@@ -1029,4 +1029,28 @@ SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1'));
...
@@ -1029,4 +1029,28 @@ SELECT 1 FROM t1 ORDER BY(UPDATEXML(a, '1', '1'));
1
1
1
1
DROP TABLE t1;
DROP TABLE t1;
SET @xml=
'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Title - document with document declaration
</title>
</head>
<body>
Hi, Im a webpage with document a declaration
</body>
</html>
';
SELECT ExtractValue(@xml, 'html/head/title');
ExtractValue(@xml, 'html/head/title')
Title - document with document declaration
SELECT ExtractValue(@xml, 'html/body');
ExtractValue(@xml, 'html/body')
Hi, Im a webpage with document a declaration
SELECT ExtractValue('
<xml
"
xxx
"
"
yyy
"
>
CharData
</xml>
', '/xml');
ExtractValue('
<xml
"
xxx
"
"
yyy
"
>
CharData
</xml>
', '/xml')
NULL
Warnings:
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 11: STRING unexpected ('>' wanted)'
SELECT ExtractValue('
<xml
xxx
"
yyy
"
>
CharData
</xml>
', '/xml');
ExtractValue('
<xml
xxx
"
yyy
"
>
CharData
</xml>
', '/xml')
NULL
Warnings:
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 17: STRING unexpected ('>' wanted)'
End of 5.1 tests
End of 5.1 tests
mysql-test/suite/parts/r/partition_special_innodb.result
View file @
5b924b32
...
@@ -213,5 +213,10 @@ START TRANSACTION;
...
@@ -213,5 +213,10 @@ START TRANSACTION;
INSERT INTO t1 VALUES (NULL, 'first row t2');
INSERT INTO t1 VALUES (NULL, 'first row t2');
SET autocommit=OFF;
SET autocommit=OFF;
ALTER TABLE t1 AUTO_INCREMENT = 10;
ALTER TABLE t1 AUTO_INCREMENT = 10;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES (NULL, 'second row t2');
INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
a b
1 first row t2
2 second row t2
DROP TABLE t1;
DROP TABLE t1;
mysql-test/suite/parts/t/partition_special_innodb.test
View file @
5b924b32
...
@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2');
...
@@ -68,10 +68,12 @@ INSERT INTO t1 VALUES (NULL, 'first row t2');
--
connection
con2
--
connection
con2
SET
autocommit
=
OFF
;
SET
autocommit
=
OFF
;
--
error
ER_LOCK_WAIT_TIMEOUT
ALTER
TABLE
t1
AUTO_INCREMENT
=
10
;
ALTER
TABLE
t1
AUTO_INCREMENT
=
10
;
--
connection
con1
--
connection
con1
INSERT
INTO
t1
VALUES
(
NULL
,
'second row t2'
);
INSERT
INTO
t1
VALUES
(
NULL
,
'second row t2'
);
SELECT
a
,
b
FROM
t1
ORDER
BY
a
;
--
disconnect
con2
--
disconnect
con2
--
disconnect
con1
--
disconnect
con1
--
connection
default
--
connection
default
...
...
mysql-test/t/partition_mgm.test
View file @
5b924b32
...
@@ -3,6 +3,17 @@
...
@@ -3,6 +3,17 @@
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
enable_warnings
#
# Bug 40389: REORGANIZE PARTITION crashes when only using one partition
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
)
ENGINE
MYISAM
PARTITION
BY
HASH
(
a
)
PARTITIONS
1
;
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
);
ALTER
TABLE
t1
REORGANIZE
PARTITION
;
DROP
TABLE
t1
;
#
#
# Bug 21143: mysqld hang when error in number of subparts in
# Bug 21143: mysqld hang when error in number of subparts in
# REORGANIZE command
# REORGANIZE command
...
...
mysql-test/t/xml.test
View file @
5b924b32
...
@@ -551,4 +551,29 @@ INSERT INTO t1 VALUES (0), (0);
...
@@ -551,4 +551,29 @@ INSERT INTO t1 VALUES (0), (0);
SELECT
1
FROM
t1
ORDER
BY
(
UPDATEXML
(
a
,
'1'
,
'1'
));
SELECT
1
FROM
t1
ORDER
BY
(
UPDATEXML
(
a
,
'1'
,
'1'
));
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# BUG#38227 EXTRACTVALUE doesn't work with DTD declarations
#
# Check that quoted strings work fine in DOCTYPE declaration.
#
SET
@
xml
=
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Title - document with document declaration</title>
</head>
<body> Hi, Im a webpage with document a declaration </body>
</html>'
;
SELECT
ExtractValue
(
@
xml
,
'html/head/title'
);
SELECT
ExtractValue
(
@
xml
,
'html/body'
);
# These two documents will fail.
# Quoted strings are not allowed in regular tags
#
SELECT
ExtractValue
(
'<xml "xxx" "yyy">CharData</xml>'
,
'/xml'
);
SELECT
ExtractValue
(
'<xml xxx "yyy">CharData</xml>'
,
'/xml'
);
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
sql/ha_partition.cc
View file @
5b924b32
...
@@ -3431,7 +3431,7 @@ int ha_partition::rnd_next(uchar *buf)
...
@@ -3431,7 +3431,7 @@ int ha_partition::rnd_next(uchar *buf)
while
(
TRUE
)
while
(
TRUE
)
{
{
int
result
=
file
->
rnd_next
(
buf
);
result
=
file
->
rnd_next
(
buf
);
if
(
!
result
)
if
(
!
result
)
{
{
m_last_part
=
part_id
;
m_last_part
=
part_id
;
...
...
sql/partition_info.cc
View file @
5b924b32
...
@@ -867,6 +867,7 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
...
@@ -867,6 +867,7 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
if
(
part_type
!=
HASH_PARTITION
||
!
list_of_part_fields
)
if
(
part_type
!=
HASH_PARTITION
||
!
list_of_part_fields
)
{
{
DBUG_ASSERT
(
part_expr
);
err
=
part_expr
->
walk
(
&
Item
::
check_partition_func_processor
,
0
,
err
=
part_expr
->
walk
(
&
Item
::
check_partition_func_processor
,
0
,
NULL
);
NULL
);
if
(
!
err
&&
is_sub_partitioned
()
&&
!
list_of_subpart_fields
)
if
(
!
err
&&
is_sub_partitioned
()
&&
!
list_of_subpart_fields
)
...
...
sql/sql_partition.cc
View file @
5b924b32
...
@@ -4233,9 +4233,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
...
@@ -4233,9 +4233,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
after the change as before. Thus we can reply ok immediately
after the change as before. Thus we can reply ok immediately
without any changes at all.
without any changes at all.
*/
*/
DBUG_RETURN
(
fast_end_partition
(
thd
,
ULL
(
0
),
ULL
(
0
),
*
fast_alter_partition
=
TRUE
;
table
,
NULL
,
DBUG_RETURN
(
FALSE
);
TRUE
,
NULL
,
FALSE
));
}
}
else
if
(
new_part_no
>
curr_part_no
)
else
if
(
new_part_no
>
curr_part_no
)
{
{
...
...
strings/xml.c
View file @
5b924b32
...
@@ -328,7 +328,7 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
...
@@ -328,7 +328,7 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
}
}
while
((
MY_XML_IDENT
==
(
lex
=
my_xml_scan
(
p
,
&
a
)))
||
while
((
MY_XML_IDENT
==
(
lex
=
my_xml_scan
(
p
,
&
a
)))
||
(
MY_XML_STRING
==
lex
))
(
(
MY_XML_STRING
==
lex
&&
exclam
)
))
{
{
MY_XML_ATTR
b
;
MY_XML_ATTR
b
;
if
(
MY_XML_EQ
==
(
lex
=
my_xml_scan
(
p
,
&
b
)))
if
(
MY_XML_EQ
==
(
lex
=
my_xml_scan
(
p
,
&
b
)))
...
@@ -349,13 +349,22 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
...
@@ -349,13 +349,22 @@ int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
return
MY_XML_ERROR
;
return
MY_XML_ERROR
;
}
}
}
}
else
if
(
(
MY_XML_STRING
==
lex
)
||
(
MY_XML_IDENT
==
lex
)
)
else
if
(
MY_XML_IDENT
==
lex
)
{
{
p
->
current_node_type
=
MY_XML_NODE_ATTR
;
p
->
current_node_type
=
MY_XML_NODE_ATTR
;
if
((
MY_XML_OK
!=
my_xml_enter
(
p
,
a
.
beg
,(
size_t
)
(
a
.
end
-
a
.
beg
)))
||
if
((
MY_XML_OK
!=
my_xml_enter
(
p
,
a
.
beg
,(
size_t
)
(
a
.
end
-
a
.
beg
)))
||
(
MY_XML_OK
!=
my_xml_leave
(
p
,
a
.
beg
,(
size_t
)
(
a
.
end
-
a
.
beg
))))
(
MY_XML_OK
!=
my_xml_leave
(
p
,
a
.
beg
,(
size_t
)
(
a
.
end
-
a
.
beg
))))
return
MY_XML_ERROR
;
return
MY_XML_ERROR
;
}
}
else
if
((
MY_XML_STRING
==
lex
)
&&
exclam
)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
else
break
;
break
;
}
}
...
...
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