- 23 Jun, 2005 4 commits
-
-
timour@mysql.com authored
The source of the problem is in Field_longlong::cmp. If 'this' is an unsigned number, the method casts both the current value, and the constant that we compare with to an unsigned number. As a result if the constant we compare with is a negative number, it wraps to some unsigned number, and the comparison is incorrect. When the optimizer chooses the "range" access method, this problem causes handler::read_range_next to reject the current key when the upper bound key is a negative number because handler::compare_key incorrectly considers the positive and negative keys to be equal. The current patch does not correct the source of the problem in Field_longlong::cmp because it is not easy to propagate sign information about the constant at query execution time. Instead the patch changes the range optimizer so that it never compares unsiged fields with negative constants. As an added benefit, queries that do such comparisons will execute faster because the range optimizer replaces conditions like: (a) (unsigned_int [< | <=] negative_constant) == FALSE (b) (unsigned_int [> | >=] negative_constant) == TRUE with the corresponding constants. In some cases this may even result in constant time execution.
-
timour@mysql.com authored
into mysql.com:/home/timka/mysql/src/4.1-bug-11185
-
timour@mysql.com authored
into mysql.com:/home/timka/mysql/src/5.0-dbg
-
timour@mysql.com authored
The source of the problem is in Field_longlong::cmp. If 'this' is an unsigned number, the method casts both the current value, and the constant that we compare with to an unsigned number. As a result if the constant we compare with is a negative number, it wraps to some unsigned number, and the comparison is incorrect. When the optimizer chooses the "range" access method, this problem causes handler::read_range_next to reject the current key when the upper bound key is a negative number because handler::compare_key incorrectly considers the positive and negative keys to be equal. The current patch does not correct the source of the problem in Field_longlong::cmp because it is not easy to propagate sign information about the constant at query execution time. Instead the patch changes the range optimizer so that it never compares unsiged fields with negative constants. As an added benefit, queries that do such comparisons will execute faster because the range optimizer replaces conditions like: (a) (unsigned_int [< | <=] negative_constant) == FALSE (b) (unsigned_int [> | >=] negative_constant) == TRUE with the corresponding constants. In some cases this may even result in constant time execution.
-
- 22 Jun, 2005 36 commits
-
-
reggie@mdk10.(none) authored
into mdk10.(none):/home/reggie/bk/mysql-5.0-base
-
evgen@moonbone.local authored
into moonbone.local:/work/mysql-5.0-merge
-
evgen@moonbone.local authored
Fix for bugfix #9728 merge
-
evgen@moonbone.local authored
-
patg@radha.local authored
into radha.local:/Volumes/disk2s1/mysql-5.0
-
konstantin@mysql.com authored
-
lars@mysql.com authored
-
reggie@mdk10.(none) authored
into mdk10.(none):/home/reggie/bk/bug9148
-
evgen@moonbone.local authored
into moonbone.local:/work/mysql-4.1-bug-8147
-
evgen@moonbone.local authored
Fix for fix for bug#9728 decreased functionality in "on duplicate key update" Have to return false to set flag for whole expression.
-
patg@radha.local authored
into radha.local:/Volumes/disk2s1/mysql-5.0
-
patg@radha.local authored
-
kent@mysql.com authored
Add a slave when running the federated test case
-
elliot@mysql.com authored
into mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
-
elliot@mysql.com authored
into mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
-
kent@mysql.com authored
Bug#11481, set charset directory to mysqlbinlog
-
elliot@mysql.com authored
into mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
-
kent@mysql.com authored
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
-
elliot@mysql.com authored
into mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
-
sergefp@mysql.com authored
into mysql.com:/home/psergey/mysql-5.0-bug8441
-
elliot@mysql.com authored
into mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
-
evgen@moonbone.local authored
-
sergefp@mysql.com authored
into mysql.com:/home/psergey/mysql-5.0-bug8441
-
lars@mysql.com authored
-
svoj@mysql.com authored
into mysql.com:/mnt/archive/svoj/mysql/mysql-5.0
-
svoj@mysql.com authored
-
marko@hundin.mysql.fi authored
into hundin.mysql.fi:/home/marko/mysql-5.0-current
-
konstantin@mysql.com authored
into mysql.com:/opt/local/work/mysql-5.0-10736-new
-
svoj@mysql.com authored
into mysql.com:/home/svoj/devel/mysql/yassl-mysql-5.0
-
svoj@mysql.com authored
-
konstantin@mysql.com authored
into mysql.com:/opt/local/work/mysql-5.0-10736-new
-
mskold@mysql.com authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
-
marko@hundin.mysql.fi authored
-
marko@hundin.mysql.fi authored
-
marko@hundin.mysql.fi authored
into hundin.mysql.fi:/home/marko/mysql-5.0-current
-
mskold@mysql.com authored
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
-