Commit graph

397 commits

Author SHA1 Message Date
monty@mysql.com
8d616390e9 After merge fixes
Fix for BIT(X) field as string
2005-01-15 17:38:43 +02:00
monty@mysql.com
d71c030587 After merge fixes 2004-12-31 00:44:00 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
ram@gw.mysql.r18.ru
92f89369ae bit type 2004-12-17 18:06:05 +04:00
ram@gw.mysql.r18.ru
7c31ea4d83 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1
2004-12-14 16:26:10 +04:00
bar@mysql.com
4fa867494d bug#6275 "client_test" fail in 4.1.7 make test
bug#6911 resultset metadata always return client character set
2004-12-14 15:58:30 +04:00
ram@gw.mysql.r18.ru
5c5d51c2d6 A quick fix for bug #7257: Crash in default tests: 'subselect' 2004-12-14 15:41:01 +04:00
sergefp@mysql.com
3c8f48d2e3 * Added comments and one assert
* Backport of safety measures from 5.0: make numeorous replaces:
    s/item->fix_fields()/if (!item->fixed) item->fix_fields()
2004-12-14 03:36:19 +03:00
sergefp@mysql.com
3ceb04a5d8 Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties 
 * Item_ref::Item_ref now expects to get in *item either
     NULL - then fix_fields() will be called later  or 
     ptr to Item it will refer to - then an equivalent of fix_fields() call is performed
2004-12-14 01:07:06 +03:00
sergefp@mysql.com
6b14f6976f Merged fixes for BUG#6976 and BUG#7079 2004-12-13 20:25:26 +03:00
sergefp@mysql.com
03acb8155f Merged (will need a post-merge fix) 2004-12-13 20:10:07 +03:00
sergefp@mysql.com
9ed8cd701b Merging fix for BUG#6976 from 4.0 to 4.1
The problem in 4.1 was the same as in 4.0 - fix_fields() not called for created Item_ref. 
The fix is similar too - initialize Item_refs in ctor (but don't interfere with cases when 
Item_ref is used by subselects).
2004-12-13 20:06:06 +03:00
bell@sanja.is.com.ua
292c71caef comment of class edded 2004-12-13 15:05:52 +02:00
bell@sanja.is.com.ua
b9abf25a55 new reference which refer to current value not to result used for resolving outer
refernces if subqueri is not in HAVING clause (BUG#7079)
  and the same used for subquery transformetion
2004-12-11 17:13:19 +02:00
monty@mysql.com
563500994a Update results for new varchar handling
Fixed compiler warnings
String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
2004-12-07 15:47:00 +02:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
serg@serg.mylan
f09429a4df protection: TRASH in delete
fixed a bug that it discovered
2004-11-28 15:53:17 +01:00
bell@sanja.is.com.ua
3c108b2a84 init values to avoid junk returning in case of null value asking without assigning value (BUG#6806) 2004-11-25 22:54:49 +02:00
bell@sanja.is.com.ua
69ec6a4592 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0
2004-11-25 02:27:02 +02:00
bell@sanja.is.com.ua
3fa511ff54 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
2004-11-24 20:01:34 +02:00
bell@sanja.is.com.ua
6d5d5ff941 fixed problem in MacOS
correct printing of aliases
2004-11-24 19:48:30 +02:00
dlenev@brandersnatch.localdomain
d201074611 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).
2004-11-24 12:24:02 +03:00
serg@serg.mylan
ee933cd198 merged 2004-11-22 21:33:15 +01:00
bell@sanja.is.com.ua
072d38eb12 merge 2004-11-21 20:08:12 +02:00
konstantin@mysql.com
6337ea8a40 A fix and test case for Bug#6297 "prepared statement, wrong handling
of <parameter> IS NULL":
we must not only set Item::null_value in Item_param, but implement
Item_param::is_null() to work well with IS NULL/IS NOT NULL clauses.
2004-11-21 12:04:27 +03:00
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
bell@sanja.is.com.ua
0ef0b030a5 merge 2004-11-11 21:18:10 +02: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