Commit graph

1155 commits

Author SHA1 Message Date
gluh@eagle.(none)
58336411c9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-11-14 17:30:16 +04:00
gluh@eagle.(none)
246c6c35a9 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-11-14 17:26:22 +04:00
cmiller@zippy.cornsilk.net
1426320008 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-community
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
2007-11-09 14:55:32 -05:00
jani@hynda.mysql.fi
e8d8102a93 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-11-08 13:23:08 +02:00
kostja@bodhi.(none)
26326ed0b7 A fix for Bug#32007 select udf_function() doesn't return an error if error
during udf initialization. The bug is spotted while working on Bug 12713.

If a user-defined function was used in a SELECT statement, and an
error would occur during UDF initialization, this error would not terminate
execution of the SELECT, but rather would be converted to a warning.

The fix is to use a stack buffer to store the message from udf_init instead
of private my_error() buffer.
2007-11-01 00:31:57 +03:00
istruewing@stella.local
cd49a77add Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-10-31 12:31:36 +01:00
kostja@bodhi.(none)
e4b353c40c Use an inline getter method (thd->is_error()) to query if there is an error
in THD.
In future the error may be stored elsewhere (not in net.report_error) and 
it's important to start using an opaque getter to simplify merges.
2007-10-30 20:08:16 +03:00
cmiller@zippy.cornsilk.net
61621a9791 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1
2007-10-29 12:42:06 -04:00
gluh@eagle.(none)
61bdbf8a90 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-29 15:40:41 +04:00
gluh@mysql.com/eagle.(none)
6b92ec4acb Bug#30889: filesort and order by with float/numeric crashes server
There are two problems with ROUND(X, D) on an exact numeric 
(DECIMAL, NUMERIC type) field of a table:
1) The implementation of the ROUND function would change the number of decimal
places regardless of the value decided upon in fix_length_and_dec. When the
number of decimal places is not constant, this would cause an inconsistent
state where the number of digits was less than the number of decimal places,
which crashes filesort.

Fixed by not allowing the ROUND operation to add any more decimal places than
was decided in fix_length_and_dec.

2) fix_length_and_dec would allow the number of decimals to be greater than
the maximium configured value for constant values of D. This led to the same 
crash as in (1).

Fixed by not allowing the above in fix_length_and_dec.
2007-10-29 15:39:56 +04:00
svoj@june.mysql.com
9f1d9beffa Merge mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-5.0-engines
2007-10-24 16:39:13 +05:00
svoj@mysql.com/june.mysql.com
5d1ccce58a BUG#31159 - fulltext search on ucs2 column crashes server
ucs2 doesn't provide required by fulltext ctype array. Crash
happens because fulltext attempts to use unitialized ctype
array.

Fixed by converting ucs2 fields to compatible utf8 analogue.
2007-10-24 16:09:30 +05:00
gluh@eagle.(none)
17acda6ca8 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-23 19:08:21 +05:00
gluh@eagle.(none)
237383f0fe Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-23 18:51:43 +05:00
gkodinov/kgeorge@magare.gmz
fb640797b8 Bug #31157: crash when select+order by the avg of some field within the group by
The uncacheable flag should be set at fix_fields() stage.
Fixed by moving the flag setting to match the one in 5.1
2007-10-19 15:43:19 +03:00
dkatz@damien-katzs-computer.local
86082dfcef Bug #29804 UDF parameters don't contain correct string length
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
    
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.
2007-10-17 17:54:11 -04:00
cmiller@zippy.cornsilk.net
f3d77c1979 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-comeng-unification
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge
2007-10-17 14:05:43 -04:00
cmiller@zippy.cornsilk.net
91b5c11922 Doxygenization of comments. 2007-10-11 13:29:09 -04:00
monty@mysql.com/narttu.mysql.fi
7887babe69 Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1
- Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options
- Added syncing of directory when creating .frm files
- Portability fixes
- Added missing cast that could cause bugs
- Code cleanups
- Made some bit functions inline
- Moved things out of myisam.h to my_handler.h to make them more accessable
- Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM)
- Fixed bugs in error conditions
- Use compiler time asserts instead of run time
- Fixed indentation
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong
(Added a define for old value to ensure we don't break any old code)
Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong)
- Initialize error messages early to get better errors when mysqld or an engine fails to start
- Fix windows bug that query_performance_frequency was not initialized if registry code failed
- thread_stack -> my_thread_stack_size
2007-10-11 18:07:40 +03:00
anozdrin/alik@station.
50c8101ad8 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2007-10-10 13:35:40 +04:00
anozdrin/alik@station.
707f067446 Fix for BUG#31035: select from function, group by result crasher.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
  - used_tables() returned RAND_TABLE, which means that the item
    can produce "random" results;
  - but const_item() returned TRUE, which means that the item is
    a constant one.

The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.
2007-10-04 17:19:14 +04:00
gkodinov/kgeorge@magare.gmz
5ac2fd0b1b Merge macbook:mysql/work/B30587-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30587-5.1-opt
2007-09-28 17:03:14 +03:00
gkodinov/kgeorge@magare.gmz
fbdf00f085 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30587-5.0-opt
2007-09-28 16:57:36 +03:00
gkodinov/kgeorge@macbook.gmz
aa2d545de2 Bug #30587: mysql crashes when trying to group by TIME div NUMBER
When calculating the result length of an integer DIV function 
the number of decimals was used without checking the result type
first. Thus an uninitialized number of decimals was used for some 
types. This caused an excessive amount of memory to be allocated 
for the field's buffer and crashed the server.

 
Fixed by using the number of decimals only for data types that 
can have decimals and thus have valid decimals number.
2007-09-28 16:46:05 +03:00
evgen@sunlight.local
4fd6de8b1a Merge sunlight.local:/local_work/27216-bug-5.0-opt-mysql
into  sunlight.local:/local_work/merge-5.1-opt-mysql
2007-09-24 17:23:40 +04:00
evgen@sunlight.local
36bf417b40 Bug#27216: functions with parameters of different date types may return wrong
type of the result.

There are several functions that accept parameters of different types.
The result field type of such functions was determined based on
the aggregated result type of its arguments. As the DATE and the DATETIME
types are represented by the STRING type, the result field type
of the affected functions was always STRING for DATE/DATETIME arguments.
The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.

Now the affected functions aggregate the field types of their arguments rather
than their result types and return the result of aggregation as their result
field type.
The cached_field_type member variable is added to the number of classes to
hold the aggregated result field type.
The str_to_date() function's result field type now defaults to the
MYSQL_TYPE_DATETIME.
The agg_field_type() function is added. It aggregates field types with help
of the Field::field_type_merge() function.
The create_table_from_items() function now uses the 
item->tmp_table_field_from_field_type() function to get the proper field
when the item is a function with a STRING result type.
2007-09-22 11:49:27 +04:00
joerg@trift2.
20ce606797 Merge trift2.:/MySQL/M51/target-5.1.22
into  trift2.:/MySQL/M51/push-5.1

Includes manual merges.
2007-08-22 16:08:55 +02:00
jani@hynda.mysql.fi
2fd7a743e4 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-21 19:03:28 +03:00
monty@narttu.mysql.fi
9d609a59fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-14 00:22:34 +03:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
tsmith@ramayana.hindu.god
2073c488af Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-08-06 16:34:30 -06:00
dkatz@damien-katzs-computer.local
a933f28a93 Bug #29804 UDF parameters don't contain correct string length
Previously, UDF *_init functions were passed constant strings with erroneous lengths.
The length came from the containing variable's size, not the length of the value itself.

Now the *_init functions get the constant as a null terminated string with the correct
length supplied.
2007-08-05 21:37:55 -04:00
mkindahl@dl145h.mysql.com
ea9848094a Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-2team
2007-08-03 18:59:16 +02:00
bar@bar.myoffice.izhnet.ru
fb8dff9721 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875
into  mysql.com:/home/bar/mysql-work/mysql-5.1.b28875
2007-08-03 17:16:02 +05:00
bar@bar.myoffice.izhnet.ru
c01ce7b1e3 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875
into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
2007-08-03 15:30:31 +05:00
bar@mysql.com/bar.myoffice.izhnet.ru
4eebfd09c2 Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
2007-08-03 15:25:23 +05:00
ramil/ram@ramil.myoffice.izhnet.ru
54ddf93240 Merge mysql.com:/home/ram/work/b30200/b30200.5.0
into  mysql.com:/home/ram/work/b30200/b30200.5.1
2007-08-02 15:26:52 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
dc84a5fd52 Fix for bug #30200: mysqlbinlog.test: connection_id() not restored under ps-protocol
Problem: thd->thread_specific_used flag is not set executing a statement
containig connection_id() function using PS protocol, that leads to 
improper binlog event creation.

Fix: set the flag in the Item_func_connection_id::fix_fields().
2007-08-02 14:51:03 +05:00
tsmith@ramayana.hindu.god
8575227571 Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-08-01 18:14:50 -06:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
c5209fcbd0 Merge mysql.com:/home/ram/work/b29928.new/b29928.new.5.0
into  mysql.com:/home/ram/work/b29928.new/b29928.new.5.1
2007-08-01 15:31:20 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
7fb417d0ba Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out

Problem: using "mysqlbinlog | mysql" for recoveries the connection_id() 
result may differ from what was used when issuing the statement.

Fix: if there is a connection_id() in a statement, write to binlog
SET pseudo_thread_id= XXX; before it and use the value later on.
2007-08-01 15:27:03 +05:00
gshchepa/uchum@gleb.loc
f7010479fb Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-22 00:53:01 +05:00
gshchepa/uchum@gleb.loc
73b2848f4f Fixed bug #29338.
Optimization of queries with DETERMINISTIC functions in the
WHERE clause was not effective: sequential scan was always
used.
Now a SF with the DETERMINISTIC flags is treated as constant
when it's arguments are constants (or a SF doesn't has arguments).
2007-07-19 18:39:01 +05:00
gshchepa/uchum@gleb.loc
6fc62a8e4a Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-06-16 22:40:25 +05:00
gshchepa/uchum@gleb.loc
3d4e75d583 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt-28625
2007-06-16 13:49:26 +05:00
gshchepa/uchum@gleb.loc
8f09a374ea Fixed bug #28625:
DECIMAL column was used instead of BIGINT for the minimal possible
BIGINT (-9223372036854775808).

The Item_func_neg::fix_length_and_dec has been adjusted to
to inherit the type of the argument in the case when it's an 
Item_int object whose value is equal to LONGLONG_MIN.
2007-06-16 13:05:07 +05:00
igor@olga.mysql.com
0f0d4720b8 Fixed bug #27932: the function LOCATE returned NULL if any
of its arguments was evaluated to NULL, while the predicate
LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE.

This happened because the Item_func_locate::fix_length_and_dec
method by mistake set the value of the maybe_null flag for 
the function item to 0. In consequence of this the function 
was considered as the one that could not ever return NULL.
2007-06-14 18:55:07 -07:00
holyfoot/hf@hfmain.(none)
76e0a0768a Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-06-14 16:35:20 +05:00
igor@olga.mysql.com
20ad515003 Fixed bug #28980: the result of ROUND(<decimal expr>,<int column>)
was erroneously converted to double, while the result of
ROUND(<decimal expr>, <int literal>) was preserved as decimal.
As a result of such a conversion the value of ROUND(D,A) could
differ from the value of ROUND(D,val(A)) if D was a decimal expression.

Now the result of the ROUND function is never converted to 
double if the first argument is decimal.
2007-06-13 09:32:36 -07:00
joerg@trift2.
018a5d403b sql/item_func.cc
Improved check for thread identity in the "embedded" case,
    provided by Monty.
    
    This finishes the fixes for bug#27078.
2007-06-13 13:33:00 +02:00
gkodinov/kgeorge@magare.gmz
eb1fb60975 5.0-opt -> 5.1-opt merge 2007-06-12 18:41:56 +03:00
gkodinov/kgeorge@magare.gmz
fbefe9d552 Merge bk-internal:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
2007-06-12 16:34:54 +03:00
gkodinov/kgeorge@magare.gmz
5ea9964b9f Bug #28992: trigger fails in pushbuild
- fixed wrong test case for bug 20903
 - closed the dangling connections in trigger.test
 - GET_LOCK() and RELEASE_LOCK() now produce more detailed log
 - fixed an omission in GET_LOCK() : assign the thread_id when
    acquiring the lock.
2007-06-12 14:35:36 +03:00
igor@olga.mysql.com
ca49b83d5a Merge olga.mysql.com:/home/igor/mysql-5.1
into  olga.mysql.com:/home/igor/mysql-5.1-opt-merge
2007-06-03 22:52:02 -07:00
evgen@moonbone.local
b642eb121f item_func.h, item_func.cc:
Post merge fix for the bug#28494.
2007-06-03 21:52:00 +04:00
evgen@moonbone.local
6acad85a95 Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-06-03 16:06:55 +04:00
evgen@moonbone.local
88147d5cfe user_var.result:
Corrected test case result for the bug#28494.
item_func.h, item_func.cc:
  Corrected function names after fix for the bug#28494.
2007-06-03 15:56:48 +04:00
evgen@moonbone.local
9967e513a5 Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-06-03 09:17:31 +04:00
evgen@moonbone.local
162a6b42ec item_func.cc:
Post fix for bug#28494.
  The Item_func_set_user_var::check method now silently doesn't use result_field
  if it isn't defined.
2007-06-03 01:24:56 +04:00
evgen@moonbone.local
400bfb92b8 Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-06-02 23:49:52 +04:00
evgen@moonbone.local
4934646764 Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
This is an additional fix.
Item::val_xxx methods are supposed to use original data source and
Item::val_xxx_result methods to use the item's result field. But for the
Item_func_set_user_var class val_xxx_result methods were mapped to val_xxx
methods. This leads, in particular, to producing bad sort keys and thus
wrong order of the result set of queries with group by/order by clauses.

The set of val_xxx_result methods is added to the Item_func_set_user_var
class. It's the same as the val_xxx set of method but uses the result_field
to return a value.
2007-06-02 23:17:46 +04:00
kostja@bodhi.(none)
16633169e4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-06-01 12:12:06 +04:00
ibabaev@bk-internal.mysql.com
d460dc700a Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-06-01 06:33:37 +02:00
gshchepa/uchum@gleb.loc
3cb5a0202f Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
2007-06-01 03:05:25 +05:00
evgen@moonbone.local
f70ae3a6de Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
The end_update() function uses the Item::save_org_in_field() function to
save original values of items into the group buffer. But for the 
Item_func_set_user_var this method was mapped to the save_in_field method.
The latter function wrongly decides to use the result_field. This leads to
saving incorrect value in the grouping buffer and wrong result of the whole
query.

The can_use_result_field argument of the bool type is added to the
Item_func_set_user_var::save_in_field() function. If it is set to FALSE
then the item's result field won't be used. Otherwise it will be detected
whether the result field will be used (old behaviour).
Two wrapping functions for the function above are added to the 
Item_func_set_user_var class:
the save_in_field(Field *field, bool no_conversions) - it calls the above
function with the can_use_result_field set to TRUE.
the save_org_in_field(Field *field) - same, but the can_use_result_field
is set to FALSE.
2007-06-01 01:17:14 +04:00
evgen@moonbone.local
75afe5cab5 Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-05-30 19:35:35 +04:00
mhansson@dl145s.mysql.com
d20a1977b5 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/my50-bug28250
2007-05-30 14:43:59 +02:00
mhansson@dl145s.mysql.com
51de1c5708 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/my51-bug28250
2007-05-30 10:31:41 +02:00
gkodinov/kgeorge@magare.gmz
a6ebd63479 Bug #28605: SHOW CREATE VIEW with views using stored_procedures no
longer showing SP names.
SHOW CREATE VIEW uses Item::print() methods to reconstruct the 
statement text from the parse tree.
The print() method for stored procedure calls needs allocate 
space to print the function's quoted name.
It was incorrectly calculating the length of the buffer needed 
(was too short).
Fixed to reflect the actual space needed.
2007-05-29 14:45:30 +03:00
mhansson@dl145s.mysql.com
8d2768a1da Merge dl145s.mysql.com:/users/mhansson/mysql/push/bug28250/my50-bug28250
into  dl145s.mysql.com:/users/mhansson/mysql/push/bug28250/my51-bug28250
2007-05-29 11:16:30 +02:00
ibabaev@bk-internal.mysql.com
faf19f9d60 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-05-28 06:25:03 +02:00
ibabaev@bk-internal.mysql.com
040e46fc1c Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-05-28 00:05:38 +02:00
gshchepa/uchum@gleb.loc
fae737b426 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
2007-05-28 00:22:44 +05:00
kostja@vajra.(none)
0162745cff Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  vajra.(none):/opt/local/work/mysql-5.1-runtime
2007-05-24 19:34:14 +04:00
jani@a88-113-38-195.elisa-laajakaista.fi
fc3b3a0a86 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-05-24 13:24:36 +03:00
evgen@moonbone.local
559063177f Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27563-bug-5.0-opt-mysql
2007-05-23 23:31:33 +04:00
evgen@moonbone.local
d1d58b5f1d Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
If a stored function or a trigger was killed it had aborted but no error
was thrown. This allows the caller statement to continue without a notice.
This may lead to a wrong data being inserted/updated to/deleted as in such
cases the correct result of a stored function isn't guaranteed. In the case
of triggers it allows the caller statement to ignore kill signal and to
waste time because of re-evaluation of triggers that always will fail
because thd->killed flag is still on.

Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions
check whether a function or a trigger were killed during execution and
throws an appropriate error if so.
Now the fill_record() function stops filling record if an error was reported
through thd->net.report_error.
2007-05-23 23:24:16 +04:00
mhansson@dl145s.mysql.com
85111f0a95 Bug #28250: Run-Time Check Failure #3 - The variable 'value' is
being used without being def

Inside method Item_func_unsigned::val_int, the variable value 
can be returned without being initialized when the CAST argument
is of type DECIMAL and has a NULL value. This gives a run-time 
error when building debug binaries using Visual C++ 2005.

Solution: Initialize value to 0
2007-05-23 14:43:06 +02:00
thek@adventure.(none)
783b1738c7 Merge adventure.(none):/home/thek/Development/cpp/bug26277/my51-bug26277
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-05-18 14:29:24 +02:00
thek@adventure.(none)
637f85ca21 Bug#26277 User variable returns one type in SELECT @v and other for CREATE as SELECT @v
- Adding variable m_cached_result_type to keep the variable type consistent
  during the execution of a statement.
- Before each result set is returned to the client the description of each
  column is sent as meta data.
  Previously the result type for a column could change if the hash variable
  entry changed between statements. This caused the result set of the query
  to alternate column types in certain cases which is not supported by MySQL
  client-server protocol. Example:
  Previously this sequence:
    SET @a:=1;
    SELECT @a:="text", @a;
  would return "text", "text";
 
  After the change the SELECT returns "text", 0
  The reson for this is that previously the result set from 'SELECT @a;'
  would always be of the type STRING, whereas now the type of the variable
  is taken from the last SET statement. However, 'SELECT @a:="text"' will
  return type of STRING since the right side of the assignment is used.
2007-05-18 12:44:03 +02:00
tsmith@siva.hindu.god
4a4590cd49 Merge siva.hindu.god:/home/tsmith/m/bk/51
into  siva.hindu.god:/home/tsmith/m/bk/maint/51
2007-05-17 14:21:35 -06:00
tsmith@siva.hindu.god
30bc713c77 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-05-17 14:17:50 -06:00
msvensson@pilot.blaudden
47d3829f0b Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype
- Since isinf() portability across various platforms and
  compilers is a complicated question, we should not use
  it directly. Instead, the my_isinf() macro should be used,
  which is defined as an alias to the system-defined isinf()
  if it is safe to use, or a workaround implementation otherwise
2007-05-16 10:10:02 +02:00
kostja@vajra.(none)
0a061c902b Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  vajra.(none):/opt/local/work/mysql-5.1-runtime
2007-05-15 17:54:11 +04:00
kostja@vajra.(none)
7ff604eb76 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  vajra.(none):/opt/local/work/mysql-5.0-runtime
2007-05-15 13:56:09 +04:00
holyfoot/hf@hfmain.(none)
7b6a467cee Merge mysql.com:/home/hf/work/27957/my50-27957
into  mysql.com:/home/hf/work/27957/my51-27957
2007-05-11 20:58:25 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
17265468ac merging fixes 2007-05-11 20:56:22 +05:00
holyfoot/hf@hfmain.(none)
69cd72faad Merge mysql.com:/home/hf/work/27921/my51-27921
into  mysql.com:/home/hf/work/27957/my51-27957
2007-05-11 18:14:04 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
069314eaf3 Merge mysql.com:/home/hf/work/27921/my50-27921
into  mysql.com:/home/hf/work/27957/my50-27957
2007-05-11 18:13:06 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
8df08a2de2 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/27957/my50-27957
2007-05-11 17:42:50 +05:00
holyfoot/hf@hfmain.(none)
b3ee5e878d Merge mysql.com:/home/hf/work/27921/my50-27921
into  mysql.com:/home/hf/work/27921/my51-27921
2007-05-11 13:07:53 +05:00
kaa@polly.local
722b690743 Merge polly.local:/home/kaa/src/maint/bug28240/my50-bug24240
into  polly.local:/home/kaa/src/maint/bug28240/my51-bug24240
2007-05-10 17:07:27 +04:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c
2007-05-10 12:59:39 +03:00
holyfoot/hf@hfmain.(none)
39597b791b Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28005/my51-28005
2007-05-10 11:30:50 +05:00
holyfoot/hf@hfmain.(none)
d76a3ef165 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28005/my51-28005
2007-05-10 08:16:20 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
d99b4c6a1a Bug #27921 View ignores precision for CAST()
Item_decimal_typecast::print properly implemented
2007-05-10 00:17:21 +05:00
ibabaev@bk-internal.mysql.com
71b2667abd Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-05-09 17:07:11 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
e3fa9c594d Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
Missing check for overflow added to the Item_decimal_typecast::val_decimal
2007-05-09 17:27:14 +05:00
kaa@polly.local
51af6a4077 Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype
Since isinf() portability across various platforms and compilers is a complicated question, we should not use it directly. Instead, the my_isinf() macro should be used, which is defined as an alias to the system-defined isinf() if it is safe to use, or a workaround implementation otherwise.
2007-05-08 21:11:46 +04:00
evgen@moonbone.local
df081a3a4f Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-05-08 15:54:49 +04:00