Commit graph

37824 commits

Author SHA1 Message Date
unknown
8262c4f445 type conversion fixed to get rid of warnings
sql/opt_range.cc:
  type conversion fixed
2007-10-23 15:34:10 +05:00
unknown
e1dc86b079 type conversions fixed to avoid warnings on Windows
myisam/mi_write.c:
  type conversion fixed
myisam/sort.c:
  type conversion fixed
sql/ha_federated.cc:
  type conversion fixed
sql/ha_heap.cc:
  type conversion fixed
sql/ha_innodb.cc:
  type conversion fixed
sql/ha_myisam.cc:
  type conversion fixed
sql/opt_range.cc:
  type conversion fixed
sql/sql_map.cc:
  type conversion fixed
sql/sql_select.cc:
  type conversion fixed
sql/sql_update.cc:
  type conversion fixed
2007-10-23 14:27:11 +05:00
unknown
578c238600 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-22 10:27:35 +05:00
unknown
dda586282d Merge mysql.com:/home/hf/work/29801/my50-29801
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-22 10:26:16 +05:00
unknown
e763badfe3 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-22 01:57:49 +02:00
unknown
fb434504cc Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-21 21:55:26 +04:00
unknown
04311fabaa Bug #28550 "Potential bugs related to the return type of the CHAR function".
Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account.
  
This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().


mysql-test/r/func_str.result:
  Import patch bug288550.patch
mysql-test/t/func_str.test:
  Import patch bug288550.patch
sql/item.cc:
  Import patch bug288550.patch
sql/item.h:
  Import patch bug288550.patch
sql/item_strfunc.h:
  Import patch bug288550.patch
2007-10-21 21:45:31 +04:00
unknown
0a47c29fb0 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-18 16:09:03 +02:00
unknown
d5819c1f7c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31221-5.0-opt
2007-10-18 15:32:48 +03:00
unknown
787a4b487a Bug #31221: Optimizer incorrectly identifies impossible WHERE clause
No warning was generated when a TIMESTAMP with a non-zero time part
 was converted to a DATE value. This caused index lookup to assume
 that this is a valid conversion and was returning rows that match 
 a comparison between a TIMESTAMP value and a DATE keypart.
 Fixed by generating a warning on such a truncation.


mysql-test/r/derived.result:
  Bug #31221: fixed an existing not-precise test case
mysql-test/r/ps_2myisam.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_3innodb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_4heap.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_5merge.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_6bdb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_7ndb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_date.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_datetime.result:
  Bug #31221: test case
mysql-test/t/derived.test:
  Bug #31221: fixed an existing not-precise test case
mysql-test/t/type_date.test:
  Bug #31221: test case
sql/field.cc:
  Bug #31221: 
   - Upgraded fix for bug 29729
   - issue a warning only if the hh:mm:ss.msec is not zero consistently 
     for all the Field_newdate::store function
sql/item_timefunc.cc:
  Bug #31221: don't ignore the errors when storing data
2007-10-18 15:19:04 +03:00
unknown
fffd105fa2 Bug #30638 why doesn't > 4294967295 rows work in myisam on windows.
The BIG_TABLES define wasn't enabled on Windows.
#define added


include/config-win.h:
  Bug #30638 why doesn't > 4294967295 rows work in myisam on windows.
  
  BIG_TABLES enabled on Windows
2007-10-18 14:52:19 +05:00
unknown
b088967252 Merge sin.intern.azundris.com:/misc/mysql/31588/41-31588
into  sin.intern.azundris.com:/misc/mysql/31588/50-31588


sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  SCCS merged
mysql-test/t/variables.test:
  SCCS merged
2007-10-18 10:51:10 +02:00
unknown
cd9d89a75d Bug#31588: buffer overrun when setting variables
Buffer used when setting variables was not dimensioned to accomodate
trailing '\0'. An overflow by one character was therefore possible.
CS corrects limits to prevent such overflows.


mysql-test/r/variables.result:
  Try to overflow buffer used for setting system variables.
  Unpatched server should throw a valgrind warning here.
  Actual value and error message irrelevant, only length counts.
mysql-test/t/variables.test:
  Try to overflow buffer used for setting system variables.
sql/set_var.cc:
  Adjust maximum number of characters we can store in 'buff' by one
  as strmake() will write a terminating '\0'.
2007-10-18 10:47:54 +02:00
unknown
62a7e160bc Bug#31568 Some "information_schema" entries suddenly report a NULL default
updated result files


mysql-test/suite/funcs_1/r/innodb__datadict.result:
  updated result file
mysql-test/suite/funcs_1/r/memory__datadict.result:
  updated result file
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  updated result file
2007-10-17 13:22:34 +05:00
unknown
55a3a64eb1 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/item.cc:
  Auto merged
sql/item.h:
  manual merge
2007-10-16 13:19:01 +05:00
unknown
048006e2f9 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters


mysql-test/r/ctype_utf8.result:
  issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
  issue an error if string has illegal characters
sql/item.cc:
  issue an error if string has illegal characters
sql/item.h:
  issue an error if string has illegal characters
sql/sql_yacc.yy:
  issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
unknown
9bb3c7ebdd Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31019
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-15 13:34:58 +05:00
unknown
173eb806db bug #29801 Federated engine crashes local server
if remote server sends malicious response.

We need to check if the SHOW TABLE STATUS query we issue inside the
FEDERATED engine returned the result with the proper (or just sufficient)
number of rows. Otherwise statements like row[12] can crash the server.


sql/ha_federated.cc:
  bug #29801 Federated engine crashes local server
                 if remote server sends malicious response.
  
  Return with the error if the remote server return fewer rows than we need.
2007-10-15 10:11:52 +05:00
unknown
97a98ff59b item_sum.cc:
Fixed dbug macros usage errors


sql/item_sum.cc:
  Fixed dbug macros usage errors
2007-10-14 11:28:43 +03:00
unknown
c9141ac580 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
2007-10-13 09:20:23 +03:00
unknown
387d03f574 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt


sql/item_cmpfunc.cc:
  Auto merged
2007-10-13 09:12:15 +03:00
unknown
334686d323 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-12 20:54:54 +05:00
unknown
9380fdb1c6 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt
2007-10-12 14:11:27 +03:00
unknown
1ccf107a5e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155


sql/item.cc:
  Auto merged
2007-10-12 15:35:16 +05:00
unknown
1fc06a1f46 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-11 22:42:11 +05:00
unknown
f30eacb223 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +05:00
unknown
76af571717 Bug #31440: 'select 1 regex null' asserts debug server
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to 
return NULL at prepare time.


mysql-test/r/func_regexp.result:
  Bug #31440: test case
mysql-test/t/func_regexp.test:
  Bug #31440: test case
sql/item_cmpfunc.cc:
  Bug #31440: mark the item as fixed even when 
  known to return NULL.
2007-10-11 11:29:26 +03:00
unknown
c866f8015f Fixed bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
precision > 0 && scale <= precision'.

A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.


sql/item_cmpfunc.cc:
  Fixed bug #31471.
  The Item_func_ifnull::fix_length_and_dec method has been
  modified to update the Item_func_ifnull::unsigned_flag field
  and to take this field into account when calculating the
  Item_func_ifnull::max_length value.
  (See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
  Added test case for bug #31471.
mysql-test/r/null.result:
  Added test case for bug #31471.
mysql-test/r/create.result:
  Update test case after the bugfix of bug #31471.
2007-10-10 20:14:29 +05:00
unknown
6146c0c75d Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


libmysql/libmysql.c:
  Auto merged
2007-10-10 14:31:19 +05:00
unknown
62f72d3610 Bug#28893 --relay-log variable is not exposed with SHOW VARIABLES
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES


mysql-test/r/rpl_flush_log_loop.result:
  test result
mysql-test/t/rpl_flush_log_loop.test:
  test case
sql/set_var.cc:
  added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
  to make them visible within SHOW VARIABLES
2007-10-10 12:21:11 +05:00
unknown
15453e3a6a Bug#25359 Test 'view' is dependent on current year to be 2006
removed now() call to make the test to be year independent


mysql-test/r/view.result:
  result fix
mysql-test/t/view.test:
  removed now() call to make the test to be year independent
2007-10-10 12:16:13 +05:00
unknown
69ecde861a Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:25:27 +02:00
unknown
addc2f4720 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my50-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160
2007-10-09 15:23:16 +02:00
unknown
ae4141ed75 Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().


mysql-test/r/func_sapdb.result:
  Bug#31160: Changed test result.
mysql-test/r/func_time.result:
  Bug#31160: Test result.
mysql-test/t/func_time.test:
  Bug#31160: Test case.
sql/item_timefunc.h:
  Bug#31160: The fix: Initializing maybe_null to true
2007-10-09 14:58:09 +02:00
unknown
f2d6508fb7 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my50-bug30832-again
2007-10-09 12:04:50 +02:00
unknown
a462f34a94 Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832 completion: test result
mysql-test/t/func_misc.test:
  Bug#30832 completion: test case
  added negative numbers
sql/item_func.h:
  Bug#30832 completion
  The function that represents unary minus is considered a constant if the argument is.
2007-10-09 11:36:05 +02:00
unknown
6736d404a0 Bug #31156: mysqld: item_sum.cc:918: virtual bool
Item_sum_distinct::setup(THD*): Assertion

There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions). 


mysql-test/r/func_group.result:
  Bug #31156: test case
mysql-test/t/func_group.test:
  Bug #31156: test case
sql/item_sum.cc:
  Bug #31156: make it OK to call setup() several times:
   done for (e.g.) scalar subquery
2007-10-08 12:57:43 +03:00
unknown
60761a7cc6 Fixed bug #31019: the MOD() function and the % operator crash the server
when a divisor is less than 1 and its fractional part is very long.
For example:
1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789;

Stack buffer overflow has been fixed in the do_div_mod function.


strings/decimal.c:
  Fixed bug #31019.
  Stack buffer overflow has been fixed in the do_div_mod function:
  a value of the upper bound of the buffer was increased where
  a decrement is required.
mysql-test/t/type_decimal.test:
  Added test case for bug #31019.
mysql-test/r/type_decimal.result:
  Added test case for bug #31019.
2007-10-08 03:48:59 +05:00
unknown
d9be8ed9eb Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 18:53:44 +05:00
unknown
a2d88511f0 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my50-bug30942
2007-10-05 13:42:19 +02:00
unknown
071e55af0d Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286


mysql-test/t/gis.test:
  Auto merged
sql/gstream.cc:
  Auto merged
mysql-test/r/gis.result:
  SCCS merged
2007-10-05 16:33:08 +05:00
unknown
77d786b5a0 Merge mysql.com:/home/hf/work/30955/my41-30955
into  mysql.com:/home/hf/work/30286/my41-30286
2007-10-05 16:32:05 +05:00
unknown
c7aff98271 Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 15:50:02 +05:00
unknown
c14e8c80dd Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/30286/my41-30286
2007-10-05 15:48:42 +05:00
unknown
794ed298cf Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 15:47:55 +05:00
unknown
8e37481553 Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286


myisam/rt_index.c:
  Auto merged
myisam/rt_mbr.c:
  Auto merged
mysql-test/t/gis-rtree.test:
  Auto merged
mysql-test/r/gis-rtree.result:
  merging
2007-10-05 15:41:56 +05:00
unknown
6d54b5771b Bug #30286 spatial index cause corruption and server crash!
As the result of DOUBLE claculations can be bigger
than DBL_MAX constant we use in code, we shouldn't use this constatn
as a biggest possible value.
Particularly the rtree_pick_key function set 'min_area= DBL_MAX' relying
that any rtree_area_increase result will be less so we return valid
key. Though in rtree_area_increase function we calculate the area
of the rectangle, so the result can be 'inf' if the rectangle is
huge enough, which is bigger than DBL_MAX.

Code of the rtree_pick_key modified so we always return a valid key.


myisam/rt_index.c:
  Bug #30286 spatial index cause corruption and server crash!
  
  always set the best_key with the first key we get, so we always return
  somthing valid.
myisam/rt_mbr.c:
  Bug #30286 spatial index cause corruption and server crash!
  
  function comment extended
mysql-test/r/gis-rtree.result:
  Bug #30286 spatial index cause corruption and server crash!
  test result
mysql-test/t/gis-rtree.test:
  Bug #30286 spatial index cause corruption and server crash!
  test case
2007-10-05 15:40:32 +05:00
unknown
554d405d73 test fix(to satisfy WIN)
mysql-test/r/information_schema.result:
  result fix
2007-10-05 12:29:02 +05:00
unknown
f4b6234c48 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-10-04 19:24:32 +02:00
unknown
4ae273e395 Bug#30079 A check for "hidden" I_S tables is flawed
added check for hidden I_S tables for 'show columns|keys' commands


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_parse.cc:
  added check for hidden I_S tables for 'show columns|keys' commands
2007-10-04 16:20:56 +05:00