diff options
author | unknown <jimw@mysql.com> | 2005-11-28 10:50:23 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-11-28 10:50:23 -0800 |
commit | 43d394f5c1fea97bc8fdd07dc1393adbd0145983 (patch) | |
tree | 43d9451e988cf21058bcf0693e2f23fe14b9cab4 | |
parent | f0a73f75c6d6ceeb3bdde7c812739c8367dbd19b (diff) | |
parent | e3028f300687ddbc00c67dc507e462e1c4a61f0e (diff) | |
download | mariadb-git-43d394f5c1fea97bc8fdd07dc1393adbd0145983.tar.gz |
Merge mysql.com:/home/jimw/my/mysql-4.1-14155
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/t/create.test:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/create.result:
Resolve conflict
-rw-r--r-- | mysql-test/r/create.result | 19 | ||||
-rw-r--r-- | mysql-test/t/create.test | 14 | ||||
-rw-r--r-- | sql/table.cc | 8 |
3 files changed, 37 insertions, 4 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index a201af78518..c981d3092a7 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -743,3 +743,22 @@ t2 CREATE TABLE `t2` ( `a2` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; +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; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 470a7bcbb59..6f3bc67cb30 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -631,3 +631,17 @@ show create table t2; drop table t1, t2; # 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 diff --git a/sql/table.cc b/sql/table.cc index 8b22610a95e..07ca236854c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1405,10 +1405,10 @@ File create_frm(THD *thd, my_string name, const char *db, #if SIZEOF_OFF_T > 4 /* Fix this when we have new .frm files; Current limit is 4G rows (QQ) */ - if (create_info->max_rows > ~(ulong) 0) - create_info->max_rows= ~(ulong) 0; - if (create_info->min_rows > ~(ulong) 0) - create_info->min_rows= ~(ulong) 0; + if (create_info->max_rows > UINT_MAX32) + create_info->max_rows= UINT_MAX32; + if (create_info->min_rows > UINT_MAX32) + create_info->min_rows= UINT_MAX32; #endif /* Ensure that raid_chunks can't be larger than 255, as this would cause |