Commit graph

859 commits

Author SHA1 Message Date
konstantin@mysql.com
92b41ba92a Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-02 16:57:34 +03:00
jimw@mysql.com
96ae7c2e78 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-01-06 10:42:58 -08:00
serg@serg.mylan
8dc77f267b merged 2006-01-06 18:26:59 +01:00
monty@mysql.com
b0a5ea01ef Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-01-06 01:08:48 +02:00
monty@mysql.com
6e22e29de6 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null
2006-01-06 00:47:49 +02:00
serg@serg.mylan
30c09d6dc0 merged 2006-01-03 18:12:03 +01:00
serg@serg.mylan
14f94dc0ca many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
knielsen@mysql.com
9dceb4f32e BUG#15842: Change in "item.cc" adding Item_sp_variable breaks compile on HP-UX 11.23
Fix: make explicit conversion to non-constant string (char *).
Backported from 5.1 changeset 1.1968 05/12/19 17:36:20 kent@mysql.com +2 -0
2005-12-21 15:19:11 +01:00
kent@mysql.com
60a0d94733 sql_trigger.cc, item.cc:
BUG#15842: Change in "item.cc" adding Item_sp_variable breaks compile on HP-UX 11.23
  Fix: make explicit conversion to non-constant string (char *)
  (change by anozdrin@mysql.com)
2005-12-19 17:36:20 +01:00
jimw@mysql.com
00d29cd259 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-12-12 11:57:07 -08:00
igor@rurik.mysql.com
ede2e0d254 item_sum.h, item.cc:
Post review corrections in comments.
2005-12-11 22:21:19 -08:00
igor@rurik.mysql.com
ad53d72033 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-12-10 23:31:03 -08:00
anozdrin@mysql.com
5d105fb7e7 Merge mysql.com:/home/alik/MySQL/devel/5.0-wl2984
into  mysql.com:/home/alik/MySQL/devel/5.1-wl2984-merge
2005-12-09 15:14:19 +03:00
konstantin@mysql.com
bbf3a593c9 A fix and a test case for Bug#15441 "Running SP causes Server
to Crash": the bug was that due to non-standard name
resolution precedence in stored procedures (See Bug#5967)
a stored procedure variable took precedence over a table column
when the arguments for VALUES() function were resolved.
The implementation of VALUES() function was not designed to work
with Item_splocal and crashed.
VALUES() function is non-standard. It can refer to, and
is meaningful for, table columns only. The patch disables SP 
variables as possible arguments of VALUES() function.
2005-12-09 00:58:59 +03:00
anozdrin@mysql.com
5b981a4844 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-sp-vars-merge-2
2005-12-07 17:17:42 +03:00
anozdrin@mysql.com
0ff8f60b45 Patch for WL#2894: Make stored routine variables work
according to the standard.

The idea is to use Field-classes to implement stored routines
variables. Also, we should provide facade to Item-hierarchy
by Item_field class (it is necessary, since SRVs take part
in expressions).

The patch fixes the following bugs:
  - BUG#8702: Stored Procedures: No Error/Warning shown for inappropriate data 
    type matching; 
 
  - BUG#8768: Functions: For any unsigned data type, -ve values can be passed 
    and returned; 
 
  - BUG#8769: Functions: For Int datatypes, out of range values can be passed 
    and returned; 
 
  - BUG#9078: STORED PROCDURE: Decimal digits are not displayed when we use 
    DECIMAL datatype; 
 
  - BUG#9572: Stored procedures: variable type declarations ignored; 
 
  - BUG#12903: upper function does not work inside a function; 
 
  - BUG#13705: parameters to stored procedures are not verified; 
 
  - BUG#13808: ENUM type stored procedure parameter accepts non-enumerated
    data; 
 
  - BUG#13909: Varchar Stored Procedure Parameter always BINARY string (ignores 
    CHARACTER SET); 
 
  - BUG#14161: Stored procedure cannot retrieve bigint unsigned;

  - BUG#14188: BINARY variables have no 0x00 padding;

  - BUG#15148: Stored procedure variables accept non-scalar values;
2005-12-07 17:01:17 +03:00
timour@mysql.com
3d01a3affc Merge mysql.com:/home/timka/mysql/src/5.0-2486
into  mysql.com:/home/timka/mysql/src/5.1-dbg
2005-12-07 10:47:43 +02:00
timour@mysql.com
6d6b617a2e Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-12-06 18:04:26 +02:00
igor@rurik.mysql.com
09e6597015 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-12-02 20:42:36 -08:00
pem@mysql.com
e7a7af07b2 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new
2005-12-02 18:43:08 +01:00
ramil@mysql.com
681252c82d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b12956
2005-12-02 11:57:26 +04:00
jimw@mysql.com
0597c510c8 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-11-30 12:17:01 -08:00
timour@mysql.com
687b66b8da WL#2486 - natural/using joins according to SQL:2003
Post-review fixes that simplify the way access rights
are checked during name resolution and factor out all
entry points to check access rights into one single
function.
2005-11-30 21:27:11 +02:00
ramil@mysql.com
516fd4254e Addition to fix for bug #12956: cast make differ rounding.
- use rint() in some other val_int() methods as well.
2005-11-30 11:17:25 +04:00
jimw@mysql.com
f8afbe6f0c Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-11-29 15:33:58 -08:00
jimw@mysql.com
f353bec511 Merge mysql.com:/home/jimw/my/mysql-4.1-14216
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-11-29 11:52:58 -08:00
bar@mysql.com
23c4c3abc0 Merge mysql.com:/usr/home/bar/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.1-new
2005-11-29 09:30:29 +04:00
bar@mysql.com
0f73558ee3 Merge mysql.com:/usr/home/bar/mysql-4.1.b10446
into  mysql.com:/usr/home/bar/mysql-5.0
2005-11-29 09:25:51 +04:00
bar@mysql.com
5c1ba75cfd Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b10446
2005-11-29 09:21:57 +04:00
pem@mysql.com
b2a9961abf Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new
2005-11-28 20:14:12 +01:00
bar@mysql.com
1263105c43 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0.param
2005-11-28 12:49:00 +04:00
bar@mysql.com
4ac260ae27 item.cc, item.h:
Fixing Item_param::safe_charset_converter to do less "new"s.
2005-11-28 12:41:44 +04:00
konstantin@mysql.com
9fd6204ad1 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-11-25 13:57:13 +03:00
evgen@moonbone.local
a4a3215a44 Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash

resolve_const_item() substitutes item which will evaluate to constant with
equvalent constant item, basing on the item's result type. In this case
subselect was resolved as constant, and resolve_const_item() was substituting
it's result's Item_caches to Item_null. Later Item_cache's function was called
for Item_null object, which caused server crash.

resolve_const_item() now substitutes constants for items with 
result_type == ROW_RESULT only for Item_rows.
2005-11-24 19:16:51 +03:00
monty@mysql.com
4575a662cb Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-23 22:58:53 +02:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
5273071265 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2005-11-23 14:57:00 +02:00
igor@rurik.mysql.com
7b1b69a6e7 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-11-22 23:00:57 -08:00
bell@sanja.is.com.ua
83d692da88 postmerge fix 2005-11-23 02:49:44 +02:00
bell@sanja.is.com.ua
7d2442a160 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug2-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
2005-11-23 00:58:13 +02:00
bell@sanja.is.com.ua
2bcd68973b Fix for BUG#13549 "Server crash with nested stored procedures
if inner routine has more local variables than outer one, and
one of its last variables was used as argument to NOT operator".

THD::spcont was non-0 when we were parsing stored routine/trigger
definition during execution of another stored routine. This confused
methods of Item_splocal and forced them use wrong runtime context.
Fix ensures that we always have THD::spcont equal to zero during
routine/trigger body parsing. This also allows to avoid problems
with errors which occur during parsing and SQL exception handlers.
2005-11-23 00:50:37 +02:00
bell@sanja.is.com.ua
7f162c7899 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
2005-11-21 21:15:48 +02:00
bar@mysql.com
2f72e05903 Bug#10446 Illegal mix of collations:
item_strfunc.h, item_strfunc.cc, item.cc:
  Try to convert a const item into destination 
  character set. If conversion happens without
  data loss, then cache the converted value
  and return it during val_str().
  Otherwise, if conversion loses data, return
  Illeral mix of collations error, as it happened
  previously.
ctype_recoding.result, ctype_recoding.test:
  Fixing tests accordingly.
2005-11-21 17:26:31 +04:00
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02:00
guilhem@mysql.com
2f95fc2701 Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)
2005-11-18 16:38:01 +01:00
igor@rurik.mysql.com
d903d10f80 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-11-13 17:56:20 -08:00
timour@mysql.com
225e94fb75 Fix for BUG#14662: view column in ORDER BY considered ambiguous if SELECT contains
the same column as an aliased and as a non-aliased column.

The problem was that Item_direct_view_ref::eq() was first comparing view columns
by name, and in this case the name of one of them is different since it is aliased.
2005-11-11 11:40:35 +02:00
igor@rurik.mysql.com
8e8a2d79cc Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-11-04 17:54:47 -08:00
monty@mysql.com
a6f5375cb0 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-05 01:32:55 +02:00
monty@mysql.com
e5f48e13bf Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements
2005-11-01 15:54:30 +02:00