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
e827b51f
Commit
e827b51f
authored
Jun 13, 2011
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
5276d419
44aa582b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
2 deletions
+67
-2
mysql-test/r/partition.result
mysql-test/r/partition.result
+29
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+31
-0
sql/ha_partition.cc
sql/ha_partition.cc
+7
-2
No files found.
mysql-test/r/partition.result
View file @
e827b51f
drop table if exists t1, t2;
drop table if exists t1, t2;
#
#
# Bug#11765667: bug#58655: ASSERTION FAILED,
# SERVER CRASHES WITH MYSQLD GOT SIGNAL 6
#
CREATE TABLE t1 (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
dt DATE, st VARCHAR(255), uid INT,
id2nd LONGBLOB, filler VARCHAR(255), PRIMARY KEY(id, dt)
);
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
('1991-03-14', 'Initial Insert', 200, 1234567, 'No Data'),
('1991-02-26', 'Initial Insert', 201, 1234567, 'No Data'),
('1992-03-16', 'Initial Insert', 234, 1234567, 'No Data'),
('1992-07-02', 'Initial Insert', 287, 1234567, 'No Data'),
('1991-05-26', 'Initial Insert', 256, 1234567, 'No Data'),
('1991-04-25', 'Initial Insert', 222, 1234567, 'No Data'),
('1993-03-12', 'Initial Insert', 267, 1234567, 'No Data'),
('1993-03-14', 'Initial Insert', 291, 1234567, 'No Data'),
('1991-12-20', 'Initial Insert', 298, 1234567, 'No Data'),
('1994-10-31', 'Initial Insert', 220, 1234567, 'No Data');
ALTER TABLE t1 PARTITION BY LIST (YEAR(dt)) (
PARTITION d1 VALUES IN (1991, 1994),
PARTITION d2 VALUES IN (1993),
PARTITION d3 VALUES IN (1992, 1995, 1996)
);
INSERT INTO t1 (dt, st, uid, id2nd, filler) VALUES
('1991-07-14', 'After Partitioning Insert', 299, 1234567, 'Insert row');
UPDATE t1 SET filler='Updating the row' WHERE uid=298;
DROP TABLE t1;
#
# Bug#59297: Can't find record in 'tablename' on update inner join
# Bug#59297: Can't find record in 'tablename' on update inner join
#
#
CREATE TABLE t1 (
CREATE TABLE t1 (
...
...
mysql-test/t/partition.test
View file @
e827b51f
...
@@ -14,6 +14,37 @@
...
@@ -14,6 +14,37 @@
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
--
enable_warnings
--
echo
#
--
echo
# Bug#11765667: bug#58655: ASSERTION FAILED,
--
echo
# SERVER CRASHES WITH MYSQLD GOT SIGNAL 6
--
echo
#
CREATE
TABLE
t1
(
id
MEDIUMINT
NOT
NULL
AUTO_INCREMENT
,
dt
DATE
,
st
VARCHAR
(
255
),
uid
INT
,
id2nd
LONGBLOB
,
filler
VARCHAR
(
255
),
PRIMARY
KEY
(
id
,
dt
)
);
INSERT
INTO
t1
(
dt
,
st
,
uid
,
id2nd
,
filler
)
VALUES
(
'1991-03-14'
,
'Initial Insert'
,
200
,
1234567
,
'No Data'
),
(
'1991-02-26'
,
'Initial Insert'
,
201
,
1234567
,
'No Data'
),
(
'1992-03-16'
,
'Initial Insert'
,
234
,
1234567
,
'No Data'
),
(
'1992-07-02'
,
'Initial Insert'
,
287
,
1234567
,
'No Data'
),
(
'1991-05-26'
,
'Initial Insert'
,
256
,
1234567
,
'No Data'
),
(
'1991-04-25'
,
'Initial Insert'
,
222
,
1234567
,
'No Data'
),
(
'1993-03-12'
,
'Initial Insert'
,
267
,
1234567
,
'No Data'
),
(
'1993-03-14'
,
'Initial Insert'
,
291
,
1234567
,
'No Data'
),
(
'1991-12-20'
,
'Initial Insert'
,
298
,
1234567
,
'No Data'
),
(
'1994-10-31'
,
'Initial Insert'
,
220
,
1234567
,
'No Data'
);
ALTER
TABLE
t1
PARTITION
BY
LIST
(
YEAR
(
dt
))
(
PARTITION
d1
VALUES
IN
(
1991
,
1994
),
PARTITION
d2
VALUES
IN
(
1993
),
PARTITION
d3
VALUES
IN
(
1992
,
1995
,
1996
)
);
INSERT
INTO
t1
(
dt
,
st
,
uid
,
id2nd
,
filler
)
VALUES
(
'1991-07-14'
,
'After Partitioning Insert'
,
299
,
1234567
,
'Insert row'
);
UPDATE
t1
SET
filler
=
'Updating the row'
WHERE
uid
=
298
;
DROP
TABLE
t1
;
--
echo
#
--
echo
#
--
echo
# Bug#59297: Can't find record in 'tablename' on update inner join
--
echo
# Bug#59297: Can't find record in 'tablename' on update inner join
--
echo
#
--
echo
#
...
...
sql/ha_partition.cc
View file @
e827b51f
...
@@ -3456,9 +3456,13 @@ exit:
...
@@ -3456,9 +3456,13 @@ exit:
index)
index)
mysql_update does not set table->next_number_field, so we use
mysql_update does not set table->next_number_field, so we use
table->found_next_number_field instead.
table->found_next_number_field instead.
Also checking that the field is marked in the write set.
*/
*/
if
(
table
->
found_next_number_field
&&
new_data
==
table
->
record
[
0
]
&&
if
(
table
->
found_next_number_field
&&
!
table
->
s
->
next_number_keypart
)
new_data
==
table
->
record
[
0
]
&&
!
table
->
s
->
next_number_keypart
&&
bitmap_is_set
(
table
->
write_set
,
table
->
found_next_number_field
->
field_index
))
{
{
if
(
!
table_share
->
ha_part_data
->
auto_inc_initialized
)
if
(
!
table_share
->
ha_part_data
->
auto_inc_initialized
)
info
(
HA_STATUS_AUTO
);
info
(
HA_STATUS_AUTO
);
...
@@ -4110,6 +4114,7 @@ void ha_partition::position(const uchar *record)
...
@@ -4110,6 +4114,7 @@ void ha_partition::position(const uchar *record)
void
ha_partition
::
column_bitmaps_signal
()
void
ha_partition
::
column_bitmaps_signal
()
{
{
handler
::
column_bitmaps_signal
();
handler
::
column_bitmaps_signal
();
/* Must read all partition fields to make position() call possible */
bitmap_union
(
table
->
read_set
,
&
m_part_info
->
full_part_field_set
);
bitmap_union
(
table
->
read_set
,
&
m_part_info
->
full_part_field_set
);
}
}
...
...
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