summaryrefslogtreecommitdiff
path: root/mysql-test/t/limit.test
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2008-10-15 18:34:51 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2008-10-15 18:34:51 -0300
commit4ab10baace0960f18a843beb880c99b6cd9ca2e3 (patch)
tree7bffc9fc29b23db812377eacd41db43c69d03850 /mysql-test/t/limit.test
parentd4c75b7d0fbc316e8baae96aa33cd202daecb0f1 (diff)
downloadmariadb-git-4ab10baace0960f18a843beb880c99b6cd9ca2e3.tar.gz
Bug#37075: offset of limit clause might be truncated on 32-bits server w/o big tables
The problem is that the offset argument of the limit clause might be truncated on a 32-bits server built without big tables support. The truncation was happening because the original 64-bits long argument was being cast to a 32-bits (ha_rows) offset counter. The solution is to check if the conversing resulted in value truncation and if so, the offset is set to the maximum possible value that can fit on the type.
Diffstat (limited to 'mysql-test/t/limit.test')
-rw-r--r--mysql-test/t/limit.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test
index 9cccca1adc3..5847b90367a 100644
--- a/mysql-test/t/limit.test
+++ b/mysql-test/t/limit.test
@@ -95,3 +95,11 @@ set @a=-14632475938453979136;
execute s using @a, @a;
--echo End of 5.0 tests
+
+#
+# Bug#37075: offset of limit clause might be truncated to 0 on 32-bits server w/o big tables
+#
+
+select 1 as a limit 4294967296,10;
+
+--echo End of 5.1 tests