summaryrefslogtreecommitdiff
path: root/mysql-test/r/limit.result
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
commit3ad228d7fba6fa2e5b98569f798583b8f8b90db9 (patch)
tree7bffc9fc29b23db812377eacd41db43c69d03850 /mysql-test/r/limit.result
parent017307f2163a068520374b3083895e246b7a4a60 (diff)
downloadmariadb-git-3ad228d7fba6fa2e5b98569f798583b8f8b90db9.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. mysql-test/r/limit.result: Add test case result for Bug#37075 mysql-test/t/limit.test: Add test case for Bug#37075 sql/sql_lex.cc: Check for truncation of the offset value. If value was truncated, set to the maximum possible value.
Diffstat (limited to 'mysql-test/r/limit.result')
-rw-r--r--mysql-test/r/limit.result3
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result
index 2acf74162a4..caed588acdb 100644
--- a/mysql-test/r/limit.result
+++ b/mysql-test/r/limit.result
@@ -111,3 +111,6 @@ set @a=-14632475938453979136;
execute s using @a, @a;
ERROR HY000: Incorrect arguments to EXECUTE
End of 5.0 tests
+select 1 as a limit 4294967296,10;
+a
+End of 5.1 tests