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
81cb8ad3
Commit
81cb8ad3
authored
Nov 23, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of maximum value for MAX_ROWS on 64-bit platforms. (Bug #14155)
parent
7510c454
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
4 deletions
+37
-4
mysql-test/r/create.result
mysql-test/r/create.result
+19
-0
mysql-test/t/create.test
mysql-test/t/create.test
+14
-0
sql/table.cc
sql/table.cc
+4
-4
No files found.
mysql-test/r/create.result
View file @
81cb8ad3
...
@@ -621,3 +621,22 @@ create table if not exists t1 (a int);
...
@@ -621,3 +621,22 @@ create table if not exists t1 (a int);
Warnings:
Warnings:
Note 1050 Table 't1' already exists
Note 1050 Table 't1' already exists
drop table t1;
drop table t1;
create table t1 (i int) engine=myisam max_rows=100000000000;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
alter table t1 max_rows=100;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=100
alter table t1 max_rows=100000000000;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
drop table t1;
mysql-test/t/create.test
View file @
81cb8ad3
...
@@ -527,3 +527,17 @@ create table if not exists t1 (a int);
...
@@ -527,3 +527,17 @@ create table if not exists t1 (a int);
drop
table
t1
;
drop
table
t1
;
# End of 4.1 tests
# End of 4.1 tests
#
# Bug #14155: Maximum value of MAX_ROWS handled incorrectly on 64-bit
# platforms
#
create
table
t1
(
i
int
)
engine
=
myisam
max_rows
=
100000000000
;
show
create
table
t1
;
alter
table
t1
max_rows
=
100
;
show
create
table
t1
;
alter
table
t1
max_rows
=
100000000000
;
show
create
table
t1
;
drop
table
t1
;
# End of 5.0 tests
sql/table.cc
View file @
81cb8ad3
...
@@ -1253,10 +1253,10 @@ File create_frm(register my_string name, const char *db, const char *table,
...
@@ -1253,10 +1253,10 @@ File create_frm(register my_string name, const char *db, const char *table,
#if SIZEOF_OFF_T > 4
#if SIZEOF_OFF_T > 4
/* Fix this when we have new .frm files; Current limit is 4G rows (QQ) */
/* Fix this when we have new .frm files; Current limit is 4G rows (QQ) */
if
(
create_info
->
max_rows
>
~
(
ulong
)
0
)
if
(
create_info
->
max_rows
>
UINT_MAX32
)
create_info
->
max_rows
=
~
(
ulong
)
0
;
create_info
->
max_rows
=
UINT_MAX32
;
if
(
create_info
->
min_rows
>
~
(
ulong
)
0
)
if
(
create_info
->
min_rows
>
UINT_MAX32
)
create_info
->
min_rows
=
~
(
ulong
)
0
;
create_info
->
min_rows
=
UINT_MAX32
;
#endif
#endif
/*
/*
Ensure that raid_chunks can't be larger than 255, as this would cause
Ensure that raid_chunks can't be larger than 255, as this would cause
...
...
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