mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix handling of maximum value for MAX_ROWS on 64-bit platforms. (Bug #14155)
mysql-test/r/create.result: Add new results mysql-test/t/create.test: Add regression test sql/table.cc: To cap a value at 2^32-1 on a 64-bit platform, use UINT_MAX32, not ~(ulong)0, since a ulong may be 64-bit itself.
This commit is contained in:
@ -621,3 +621,22 @@ create table if not exists t1 (a int);
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
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;
|
||||
|
@ -527,3 +527,17 @@ create table if not exists t1 (a int);
|
||||
drop table t1;
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user