Commit graph

369 commits

Author SHA1 Message Date
brian@avenger.(none)
b5e02d3276 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into avenger.(none):/export/brian/mysql/test/5.0
2004-11-11 19:15:41 -08:00
brian@avenger.(none)
f05daf02ba Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump) 2004-11-11 18:58:57 -08:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
bar@mysql.com
c51d7acfcc 1. When mixing NULL to a character string,
the result takes its charset/collation
attributes from the character string,
e.g.  SELECT func(NULL, _latin2'string')
now returns a latin2 result. This is
done by introducing a new derivation
(aka coercibility) level DERIVATION_IGNORABLE,
which is used with Item_null.
2. 'Pure' NULL is now BINARY(0), not CHAR(0).
I.e. NULL is now more typeless.
2004-11-10 14:05:28 +04:00
monty@mysql.com
87af3d9113 merge on pull 2004-11-09 04:06:44 +02:00
bell@sanja.is.com.ua
9d0bb7426a postreview fixes 2004-11-08 01:54:23 +02:00
monty@mysql.com
07f9c634ad After merge fixes 2004-11-08 01:51:10 +02:00
monty@mysql.com
071001950e Merge with 4.1 to get in latest bug fixes 2004-11-04 15:06:24 +02:00
monty@mysql.com
47bbf768d4 Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
2004-11-03 12:39:38 +02:00
bar@mysql.com
6a3b1d443f Many files:
Allow mixing of different character sets for more SQL functions.
item_func.h:
  Allow mixing of different character sets for more SQL functions..
2004-11-02 16:02:12 +04:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bar@mysql.com
ea49a5181a Allow to convert to non-Unicode charset when mixing a string
constant with a column. The string is converted into the column
character set. It conversion doesn't lose data, then operation
is possible. Otherwise, give an error, as it was earlier.
2004-10-29 16:00:03 +05:00
monty@mysql.com
a308981257 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-10-22 19:51:04 +03:00
konstantin@mysql.com
016d5adeeb Followup to fix for bug#6050: fix valgrind warnings. 2004-10-22 20:21:55 +04:00
monty@mysql.com
3afecef4df Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)
2004-10-22 18:44:51 +03:00
konstantin@mysql.com
a7c52d755b A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field
names with ident. tables fr. diff. schemata": revise all uses of
Item_field and make them prepared-statements friendly when necessary.
2004-10-22 14:47:35 +04:00
igor@rurik.mysql.com
a03e5ad8e4 Merge for post-merge fixes for Item_equal patch. 2004-10-19 16:07:10 -07:00
igor@rurik.mysql.com
4c8e391718 table.h, sql_select.h:
Added the code processing on expressions for applying
  multiple equalities.
sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
Many files:
  Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
item.h, item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
2004-10-19 14:12:55 -07:00
konstantin@mysql.com
f063a81755 item.h:
A fix for Bug#6042 "constants propogation works olny once (prepared
  statements)": reset item->marker in Item::cleanup, as it's used
  in propogate_cond_constants. No test case as the only way I could
  come up with to show the problem is EXPLAIN, and EXPLAIN is painful
  to use in the test suite.
2004-10-12 17:33:13 +04:00
timour@mysql.com
8ab4a7a101 Merge with implementation of WL#1724. 2004-10-11 10:47:08 +03:00
konstantin@mysql.com
e08febea0c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-hook
2004-10-10 02:39:48 +04:00
konstantin@mysql.com
daa4c2495c A fix and test case for Bug#5987 "subselect in bool function
crashes server (prepared statements)": the bug was that all boolean
items always recovered its original arguments at statement cleanup 
stage.
This collided with Item_subselect::select_transformer, which tries to 
permanently change the item tree to use a transformed subselect instead of
original one.
So we had this call sequence for prepare:
mysql_stmt_prepare -> JOIN::prepare -> 
Item_subselect::fix_fields -> the item tree gets transformed ->
Item_bool_rowready_func2::cleanup, item tree is recovered to original
state, while it shouldn't have been;
mysql_stmt_execute -> attempts to execute a broken tree -> crash.
Now instead of bluntly recovering all arguments of bool functions in 
Item_bool_rowready_func2::cleanup, we recover only those
which were changed, and do it in one place.
There still would exist a possibility for a collision with subselect
tranformation, if permanent and temporary changes were performed at the 
same stage.
But fortunately subselect transformation is always done first, so it 
doesn't conflict with the optimization done by propogate_cond_constants.
Now we have: 
mysql_stmt_prepare -> JOIN::prepare -> subselect transformation 
permanently changes the tree -> cleanup doesn't recover anything, 
because nothing was registered for recovery.
mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, 
so it doesn't change), JOIN::optimize -> 
propogate_cond_constants -> temporary changes the item tree 
with constants -> JOIN::execute -> cleanup -> 
the changes done by propogate_cond_constants are recovered, as
they were registered for recovery.
2004-10-10 02:39:22 +04:00
igor@rurik.mysql.com
71f6ab7a09 Merge for Item_equal. 2004-10-09 10:34:13 -07:00
bell@sanja.is.com.ua
b2d9799b54 args_copy and cleunup() removed from Item_sum
registration changing ITEM_SUM arguments added
2004-10-09 01:01:19 +03:00
konstantin@mysql.com
234c80b689 Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism.
2004-10-08 19:13:09 +04:00
konstantin@mysql.com
2aa7ec0d9d A fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld": implementation for a generic item tree modifications
registry. Every item tree modification which should be rolled back for
subsequent execution of a prepared statement or stored procedure should
be saved in the registry. All such modifications are rolled back at once
during cleanup stage of PS.
Actual fix for the bug just adds a call to register modifications to
convert_constant_item.
Post review fixes implemented.
2004-10-08 02:21:19 +04:00
monty@mishka.local
be4ca46fbe More fixes for strict mode:
More tests.
Better error messages.
Fixed bug when checking if we updated all needed columns for INSERT.
Give an error if we encounter a wrong float value during parsing.
Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS.
Fixed UPDATE IGNORE when using STRICT mode.
2004-10-02 22:20:08 +03:00
bell@sanja.is.com.ua
cd32040889 some comments added 2004-09-25 16:05:50 +03:00
bell@sanja.is.com.ua
26589ba8ce Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-17 19:16:54 +03:00
monty@mishka.local
095f7e8740 Removed wrong warnings in test suite (This was because select_insert / select_create results was not freed.
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early
2004-09-17 03:08:23 +03:00
bell@sanja.is.com.ua
09b316f051 updateability of field with collation support (BUG#5506) 2004-09-16 23:45:20 +03:00
bar@mysql.com
7c4ab566d2 Return character strings in table, type, possible_keys, key fields
of EXPLAIN SELECT, rather than binary strings.
2004-09-16 14:47:39 +05:00
timour@mysql.com
e76e617e01 Implementation of the last review comments for WL#1724
"Min/Max Optimization for Queries with Group By Clause"
2004-09-10 04:45:15 +03:00
bell@sanja.is.com.ua
763c57d41f Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0
2004-09-10 02:26:09 +03:00
bell@sanja.is.com.ua
a23857e071 post merge fixes 2004-09-10 02:22:44 +03:00
dlenev@mysql.com
c46e640009 Yet another manual merge with main tree for patch for WL#1218 "Triggers" 2004-09-09 19:52:10 +04:00
monty@mysql.com
49cd04b510 Merge on pull 2004-09-09 07:26:28 +03:00
monty@mysql.com
f2829d0386 After merge fixes of merge with 4.1 that included the new arena code.
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
dlenev@mysql.com
9b1bc6a4d5 Merge of changes from the main tree to tree for WL#1218 "Triggers". 2004-09-08 13:29:21 +04:00
dlenev@brandersnatch.localdomain
9ed038dd6f WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.
2004-09-07 16:29:46 +04:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
bell@sanja.is.com.ua
161662ba4c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-04 15:32:13 +03:00
monty@mysql.com
32594c9989 Print value of Item_param if it has a value (when debugging) 2004-09-04 15:02:57 +03:00
bell@sanja.is.com.ua
80a28d458a fixed printing of real constants (BUG#5160) 2004-09-01 20:30:48 +03:00
bar@mysql.com
4f32cd2b3d Move collation aggregation with superset conversion code
from Item_bool_func2 into DTCollation to make it reusable
for other types of items.
2004-09-01 13:56:33 +05:00
bell@sanja.is.com.ua
2cf1234ba2 after review patch 2004-08-31 21:10:57 +03:00
timour@mysql.com
e2cd3dd1ce WL#1724 "Min/Max Optimization for Queries with Group By Clause"
- after-review changes
- merged with the source tree from 204-08-27
2004-08-27 16:37:13 +03:00
bell@sanja.is.com.ua
b836d2ddb7 fixed updateability VIEW detection (Bug#5146)
fixed other Item_ref methods where result_field involved
2004-08-26 14:34:56 +03:00
bell@sanja.is.com.ua
8b01230e5b fix of Item_ref with result_field (BUG#5104) 2004-08-26 13:11:06 +03:00
bell@sanja.is.com.ua
5abb148d01 items for functions which is converted to constants internally to support its correct printing added (BUG#4663) 2004-08-24 18:46:27 +03:00