Commit graph

37812 commits

Author SHA1 Message Date
kaa@polly.(none)
e703c6a78c Fix for bug #32020: loading udfs while --skip-grant-tables is enabled
causes out of memory errors

The code in mysql_create_function() and mysql_drop_function() assumed
that the only reason for UDFs being uninitialized at that point is an
out-of-memory error during initialization. However, another possible 
reason for that is the --skip-grant-tables option in which case UDF 
initialization is skipped and UDFs are unavailable.

The solution is to check whether mysqld is running with
--skip-grant-tables and issue a proper error in such a case.
2007-11-09 13:29:43 +03:00
kaa@polly.(none)
349841118f 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().
2007-10-21 21:45:31 +04:00
gluh@mysql.com/eagle.(none)
7f67efccef Bug#31568 Some "information_schema" entries suddenly report a NULL default
updated result files
2007-10-17 13:22:34 +05:00
gluh@eagle.(none)
20baa313b5 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-16 13:19:01 +05:00
gluh@mysql.com/eagle.(none)
55a7338f39 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
gshchepa/uchum@gleb.loc
18ecc5bb5a 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
gkodinov/kgeorge@magare.gmz
f0d5ed8147 item_sum.cc:
Fixed dbug macros usage errors
2007-10-14 11:28:43 +03:00
gkodinov/kgeorge@magare.gmz
a4da332ea5 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
gkodinov/kgeorge@magare.gmz
737dd70435 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-13 09:12:15 +03:00
gshchepa/uchum@gleb.loc
f9c7587d8e 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
gkodinov/kgeorge@magare.gmz
d330469f10 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
holyfoot/hf@hfmain.(none)
a453b2f715 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155
2007-10-12 15:35:16 +05:00
gshchepa/uchum@gleb.loc
a1e8f81e91 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
gluh@mysql.com/eagle.(none)
db39976a06 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
2007-10-11 16:07:10 +05:00
gkodinov/kgeorge@magare.gmz
99f1606e94 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.
2007-10-11 11:29:26 +03:00
gshchepa/uchum@gleb.loc
356007a8a4 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.
2007-10-10 20:14:29 +05:00
gluh@eagle.(none)
20ec6605d3 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-10 14:31:19 +05:00
gluh@mysql.com/eagle.(none)
a5e7b726c1 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
2007-10-10 12:21:11 +05:00
gluh@mysql.com/eagle.(none)
91a7fbc8bb Bug#25359 Test 'view' is dependent on current year to be 2006
removed now() call to make the test to be year independent
2007-10-10 12:16:13 +05:00
mhansson@dl145s.mysql.com
8e2a56ea9d Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160
2007-10-09 15:25:27 +02:00
mhansson@dl145s.mysql.com
c7ff50622c 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
mhansson/martin@linux-st28.site
148ce22add 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().
2007-10-09 14:58:09 +02:00
mhansson/martin@linux-st28.site
ddc67f087a 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
mhansson/martin@linux-st28.site
d29146f9f4 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.
2007-10-09 11:36:05 +02:00
gkodinov/kgeorge@magare.gmz
67302b12f6 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).
2007-10-08 12:57:43 +03:00
gshchepa/uchum@gleb.loc
b8b199af45 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.
2007-10-08 03:48:59 +05:00
holyfoot/hf@hfmain.(none)
9c2de8b28f 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
mhansson@dl145s.mysql.com
b4b84f6134 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
holyfoot/hf@hfmain.(none)
1ab2fd9bb8 Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 16:33:08 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
39f6cbc221 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
holyfoot/hf@hfmain.(none)
b93759b011 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
holyfoot/hf@mysql.com/hfmain.(none)
b95dd64d50 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
holyfoot/hf@hfmain.(none)
36ecbf5ff8 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
holyfoot/hf@hfmain.(none)
0b79b24f03 Merge mysql.com:/home/hf/work/30286/my41-30286
into  mysql.com:/home/hf/work/30286/my50-30286
2007-10-05 15:41:56 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
54b0cf97b3 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.
2007-10-05 15:40:32 +05:00
gluh@mysql.com/eagle.(none)
ac8559359c test fix(to satisfy WIN) 2007-10-05 12:29:02 +05:00
joerg@trift2.
82767a0a45 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-10-04 19:24:32 +02:00
gluh@mysql.com/eagle.(none)
d6e626a61d Bug#30079 A check for "hidden" I_S tables is flawed
added check for hidden I_S tables for 'show columns|keys' commands
2007-10-04 16:20:56 +05:00
jperkin@production.mysql.com
583a3ef31d Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0
into  production.mysql.com:/usersnfs/jperkin/bk/bug-27692/5.0
2007-10-04 12:06:13 +02:00
jperkin@production.mysql.com
5c0c592145 Restore creation of test databases and the anonymous user which
were accidentally removed during a previous rototill of this
code.  Fixes bug#27692.
  
While it can be argued we should strive to provide a 'secure by
default' installation, this happens to be the setup currently
documented in the manual as the default, so defer changes that
improve security out of the box to a co-ordinated effort later
on.
  
For now, make a note about the test databases and anonymous user
in mysql_install_db and recommend that mysql_secure_installation
be ran for users wishing to remove these defaults.

[..re-commit of previously lost change..]
2007-10-04 11:30:30 +02:00
mhansson@dl145s.mysql.com
c10447053c Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my50-bug30942
2007-10-04 11:06:01 +02:00
mhansson/martin@linux-st28.site
028992ac69 Bug #30942: select str_to_date from derived table returns varying results
The function str_to_date has a field to say whether it's invoked constant 
arguments. But this member was not initialized, causing the function to
think that it could use a cache of the format type when said cache was in 
fact not initialized.
Fixed by initializing the field to false.
2007-10-04 09:15:26 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
16db036d82 Bug #31155 gis types in union'd select cause crash.
We use get_geometry_type() call to decide the exact type
of a geometry field to be created (POINT, POLYGON etc)
Though this function was only implemented for few items.
In the bug's case we need to call this function for the
Item_sum instance, where it was not implemented, what is
the reason of the crash.
Fixed by implementing virtual Item::get_geometry_type(),
so it can be called for any Item.
2007-10-04 12:01:28 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
a7a6c6eb08 Bug #30955 geomfromtext() crasher.
end-of-line check missed in Gis_read_stream::get_next_word,
what can lead to crashes (expecially with NULL strings).

End-of-line check added
2007-10-03 13:35:35 +05:00
gshchepa/uchum@gleb.loc
0918fe8320 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-03 11:37:29 +05:00
gshchepa/uchum@gleb.loc
a6b5121b40 mysqldump.test, mysqldump.result:
Bug #31077: post-commit fix.
2007-10-03 11:36:42 +05:00
gshchepa/uchum@gleb.loc
8049c695c3 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-03 02:51:17 +05:00
gshchepa/uchum@gleb.loc
c81751adba mysqldump.c, mysqldump.test, mysqldump.result:
Bug #31077: post-commit fix.
2007-10-03 02:50:38 +05:00
jmiller/ndbdev@mysql.com/ndb15.mysql.com
6515a7f4c3 testScanFilter.cpp:
Updated variable size arrays to use vector like Jonas did for 5.1 so that my build would not break
2007-10-02 21:21:45 +02:00
gshchepa/uchum@gleb.loc
c3ffd4ac00 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-02 22:31:51 +05:00