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
bfc43d57
Commit
bfc43d57
authored
Feb 27, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #17499 Alter table of ndb partitioned tables causes mysqld to core
parent
1f30b152
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
0 deletions
+106
-0
mysql-test/t/ndb_partition_range.test
mysql-test/t/ndb_partition_range.test
+104
-0
sql/sql_table.cc
sql/sql_table.cc
+2
-0
No files found.
mysql-test/t/ndb_partition_range.test
View file @
bfc43d57
...
...
@@ -93,3 +93,107 @@ show create table t1;
drop
table
t1
;
#
# Bug #17499, #17687
# Alter partitioned NDB table causes mysqld to core
#
CREATE
TABLE
t1
(
id
MEDIUMINT
NOT
NULL
,
b1
BIT
(
8
),
vc
VARCHAR
(
255
),
bc
CHAR
(
255
),
d
DECIMAL
(
10
,
4
)
DEFAULT
0
,
f
FLOAT
DEFAULT
0
,
total
BIGINT
UNSIGNED
,
y
YEAR
,
t
DATE
)
ENGINE
=
NDB
PARTITION
BY
RANGE
(
YEAR
(
t
))
(
PARTITION
p0
VALUES
LESS
THAN
(
1901
),
PARTITION
p1
VALUES
LESS
THAN
(
1946
),
PARTITION
p2
VALUES
LESS
THAN
(
1966
),
PARTITION
p3
VALUES
LESS
THAN
(
1986
),
PARTITION
p4
VALUES
LESS
THAN
(
2005
),
PARTITION
p5
VALUES
LESS
THAN
MAXVALUE
);
INSERT
INTO
t1
VALUES
(
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
SELECT
*
FROM
t1
;
ALTER
TABLE
t1
ENGINE
=
MYISAM
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
CREATE
LOGFILE
GROUP
lg1
ADD
UNDOFILE
'undofile.dat'
INITIAL_SIZE
16
M
UNDO_BUFFER_SIZE
=
1
M
ENGINE
=
NDB
;
CREATE
TABLESPACE
ts1
ADD
DATAFILE
'datafile.dat'
USE
LOGFILE
GROUP lg1
INITIAL_SIZE 12M
ENGINE NDB
;
CREATE
TABLE
test
.
t1
(
a1
INT
,
a2
TEXT
NOT
NULL
,
a3
BIT
NOT
NULL
,
a4
DECIMAL
(
8
,
3
),
a5
INT
NOT
NULL
,
a6
VARCHAR
(
255
),
PRIMARY
KEY
(
a1
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
LIST
(
a1
)
(
PARTITION
p0
VALUES
IN
(
1
,
2
,
3
,
4
,
5
),
PARTITION
p1
VALUES
IN
(
6
,
7
,
8
,
9
,
10
),
PARTITION
p2
VALUES
IN
(
11
,
12
,
13
,
14
,
15
));
let
$j
=
15
;
--
disable_query_log
while
(
$j
)
{
eval
INSERT
INTO
test
.
t1
VALUES
(
$j
,
"Tested Remotely from Texas, USA"
,
b
'1'
,
$j
.
00
,
$j
+
1
,
"By NIK
$j
"
);
dec
$j
;
}
--
enable_query_log
SELECT
COUNT
(
*
)
FROM
test
.
t1
;
ALTER
TABLE
test
.
t1
DROP
COLUMN
a4
;
SELECT
COUNT
(
*
)
FROM
test
.
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
test
.
t1
(
a1
INT
,
a2
TEXT
NOT
NULL
,
a3
BIT
NOT
NULL
,
a4
DECIMAL
(
8
,
3
),
a5
INT
NOT
NULL
,
a6
VARCHAR
(
255
),
PRIMARY
KEY
(
a1
))
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDB
PARTITION
BY
HASH
(
a1
)
PARTITIONS
4
;
let
$j
=
15
;
--
disable_query_log
while
(
$j
)
{
eval
INSERT
INTO
test
.
t1
VALUES
(
$j
,
"Tested Remotely from Texas, USA"
,
b
'1'
,
$j
.
00
,
$j
+
1
,
"By NIK
$j
"
);
dec
$j
;
}
--
enable_query_log
SELECT
COUNT
(
*
)
FROM
test
.
t1
;
ALTER
TABLE
test
.
t1
DROP
COLUMN
a4
;
SELECT
COUNT
(
*
)
FROM
test
.
t1
;
DROP
TABLE
t1
;
ALTER
TABLESPACE
ts1
DROP
DATAFILE
'datafile.dat'
ENGINE
=
NDB
;
DROP
TABLESPACE
ts1
ENGINE
=
NDB
;
DROP
LOGFILE
GROUP
lg1
ENGINE
=
NDB
;
sql/sql_table.cc
View file @
bfc43d57
...
...
@@ -5183,6 +5183,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
*/
to
->
file
->
ha_set_all_bits_in_write_set
();
from
->
file
->
ha_retrieve_all_cols
();
if
(
from
->
part_info
)
bitmap_set_all
(
&
(
from
->
part_info
->
used_partitions
));
init_read_record
(
&
info
,
thd
,
from
,
(
SQL_SELECT
*
)
0
,
1
,
1
);
if
(
ignore
||
handle_duplicates
==
DUP_REPLACE
)
...
...
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