Commit graph

6174 commits

Author SHA1 Message Date
unknown
4b36c1d8ff Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
'SELECT DISTINCT a,b FROM t1' should not use temp table if there is unique 
index (or primary key) on a.
There are a number of other similar cases that can be calculated without the
use of a temp table : multi-part unique indexes, primary keys or using GROUP BY 
instead of DISTINCT.
When a GROUP BY/DISTINCT clause contains all key parts of a unique
index, then it is guaranteed that the fields of the clause will be
unique, therefore we can optimize away GROUP BY/DISTINCT altogether.
This optimization has two effects:
* there is no need to create a temporary table to compute the
   GROUP/DISTINCT operation (or the temporary table will be smaller if only GROUP 
   is removed and DISTINCT stays or if DISTINCT is removed and GROUP BY stays)
* this causes the statement in effect to become updatable in Connector/Java
because the result set columns will be direct reference to the primary key of 
the table (instead to the temporary table that it currently references). 

Implemented a check that will optimize away GROUP BY/DISTINCT for queries like 
the above.
Currently it will work only for single non-constant table in the FROM clause.


mysql-test/r/distinct.result:
  Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
    - test case
mysql-test/t/distinct.test:
  Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
    - test case
sql/sql_select.cc:
  Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
    - disable GROUP BY if contains the fields of a unique index.
2006-06-27 17:40:19 +03:00
unknown
fbed697d86 Merge mysql.com:/home/hf/work/mysql-4.1.10166
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-06-26 21:07:13 +05:00
unknown
89e415950c Bug#11228: DESC shows arbitrary column as "PRI"
An UNIQUE KEY consisting of NOT NULL columns
  was displayed as PRIMARY KEY in "DESC t1".
  According to the code, that was intentional
  behaviour for some reasons unknown to me.
  This code was written before bitkeeper time,
  so I cannot check who and why made this.
  After discussing on dev-public, a decision
  was made to remove this code


mysql-test/r/key.result:
  Adding test case.
mysql-test/t/key.test:
  Adding test case.
sql/table.cc:
  Removing old wrong code
2006-06-23 13:19:30 +05:00
unknown
d62551af39 Added a test case for bug #18359.
This was another manifestation of the problems fixed in the
patch for bug 16674.
Wrong calculation of length of the search prefix in the pattern
string led here to a wrong result set for a query in 4.1. 
The bug could be demonstrated for any multi-byte character set. 


mysql-test/r/ctype_utf8.result:
  Added a test case for bug #18359.
mysql-test/t/ctype_utf8.test:
  Added a test case for bug #18359.
2006-06-22 20:39:46 -07:00
unknown
e8adb49910 Fixed bug #20076.
Server crashed in some cases when a query required a MIN/MAX
agrregation for a 'ucs2' field. 
In these cases  the aggregation caused calls of the function
update_tmptable_sum_func that indirectly invoked 
the method Item_sum_hybrid::min_max_update_str_field() 
containing a call to strip_sp for a ucs2 character set.
The latter led directly to the crash as it used my_isspace
undefined for the ucs2 character set.
Actually the call of strip_sp is not needed at all in this
situation and has been removed by the fix.


mysql-test/r/ctype_ucs.result:
  Added a test case for bug #20076.
mysql-test/t/ctype_ucs.test:
  Added a test case for bug #20076.
2006-06-22 15:50:15 -07:00
unknown
9a4b76ed64 bug #10166 (Signed byte values cause data to be padded)
The AsBinary function returns VARCHAR data type with binary collation.
It can cause problem for clients that treat that kind of data as
different from BLOB type.
So now AsBinary returns BLOB.


mysql-test/r/gis.result:
  result fixed
mysql-test/t/gis.test:
  test case added
sql/item_geofunc.h:
  Now we return MYSQL_TYPE_BLOB for asBinary function
2006-06-22 22:11:27 +05:00
unknown
af3c76631c Modified the test case for bug 16674 to have the same
execution plans in 4.1 and 5.0.
2006-06-21 22:39:48 -07:00
unknown
6a63106558 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt


mysql-test/r/ctype_utf8.result:
  SCCS merged
mysql-test/t/ctype_utf8.test:
  SCCS merged
2006-06-21 16:29:58 -07:00
unknown
d5797063e3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-22 00:29:47 +04:00
unknown
822e8866c7 Fixed bug #14896.
This bug in Field_string::cmp resulted in a wrong comparison 
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
  
Wrong key comparisons could lead to wrong result sets if 
the selected query execution plan used a range scan by 
a partial index over a utf8 character field.
This also caused wrong results in many other cases.


mysql-test/t/ctype_utf8.test:
  Added test cases for bug #14896.
mysql-test/r/ctype_utf8.result:
  Added test cases for bug #14896.
sql/field.cc:
  Fixed bug #14896.
  This bug in Field_string::cmp resulted in a wrong comparison 
  with keys in partial indexes over multi-byte character fields.
  Given field a is declared as a varchar(16) collate utf8_unicode_ci
  INDEX(a(4)) gives us an example of such an index.
       
  Wrong key comparisons could lead to wrong result sets if 
  the selected query execution plan used a range scan by 
  a partial index over a utf8 character field.
  This also caused wrong results in many other cases.
2006-06-22 00:29:04 +04:00
unknown
630a1ee440 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
2006-06-21 19:41:08 +05:00
unknown
fa83f8baa0 added missing MYSQLTEST_VARDIR declaration 2006-06-21 16:41:07 +02:00
unknown
bf76f070dd Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1


sql/opt_sum.cc:
  Auto merged
mysql-test/r/myisam.result:
  SCCS merged
mysql-test/t/myisam.test:
  SCCS merged
2006-06-21 17:51:16 +05:00
unknown
5c0cdea623 BUG#20357 - Got error 124 from storage engine using MIN and MAX
functions in queries

Using MAX()/MIN() on table with disabled indexes (by ALTER TABLE)
results in error 124 (wrong index) from storage engine.

The problem was that optimizer use disabled index to optimize
MAX()/MIN(). Normally it must skip disabled index and perform
table scan.

This patch skips disabled indexes for min/max optimization.


mysql-test/r/myisam.result:
  Test case for BUG#20357.
mysql-test/t/myisam.test:
  Test case for BUG#20357.
sql/opt_sum.cc:
  Skip disabled/ignored indexes for min/max optimization.
2006-06-21 17:30:59 +05:00
unknown
3efeb89246 Fix for bug #15977 (switch ordering of DISABLE KEYS/LOCK TABLE in mysqldump) 2006-06-21 00:12:23 -07:00
unknown
8516546c80 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt
2006-06-20 22:15:30 -07:00
unknown
69977fa50b Fixed bug #16674.
The length of the prefix of the pattern string in the LIKE predicate that 
determined the index range to be scanned was calculated incorrectly for
multi-byte character sets. 
As a result of this in 4. 1 the the scanned range was wider then necessary
if the prefix contained not only one-byte characters.  
In 5.0 additionally it caused missing some rows from the result set.


mysql-test/r/ctype_utf8.result:
  Added test cases for bug #16674.
mysql-test/t/ctype_utf8.test:
  Added test cases for bug #16674.
strings/ctype-mb.c:
  Fixed bug #16674.
  The length of the prefix of the pattern string in the LIKE predicate that 
  determined the index range to be scanned was calculated incorrectly for
  multi-byte character sets. 
  As a result of this in 4. 1 the the scanned range was wider then necessary
  if the prefix contained not only one-byte characters.  
  In 5.0 additionally it caused missing some rows from the result set.
      
  The function my_like_range_mb was fixed to calculate the length of
  the prefix in a pattern string correctly in all cases.
2006-06-20 19:57:21 -07:00
unknown
49042de5b2 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 23:49:33 +04:00
unknown
3e7d68b11c select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.  
select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal


sql/item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal
mysql-test/t/select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/r/select.result:
  Added test case for bug#18759 Incorrect string to numeric conversion.
2006-06-20 23:05:55 +04:00
unknown
91a766838f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-4.1
2006-06-20 09:35:25 +05:00
unknown
846c46ea4d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 02:04:36 +04:00
unknown
495c6b13d1 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 01:56:33 +04:00
unknown
028fa1e454 item_cmpfunc.cc, func_in.result, func_in.test:
Reverted fix for bug#18360


mysql-test/t/func_in.test:
  Reverted fix for bug#18360
mysql-test/r/func_in.result:
  Reverted fix for bug#18360
sql/item_cmpfunc.cc:
  Reverted fix for bug#18360
2006-06-20 00:50:09 +04:00
unknown
6cf425b856 Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/B9676
2006-06-19 13:25:28 +03:00
unknown
124cb126fa * Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
tables
Currently in INSERT ... SELECT ... LIMIT ... the compiler uses a 
temporary table to store the results of SELECT ... LIMIT .. and then
uses that table as a source for INSERT. The problem is that in some cases
it actually skips the LIMIT clause in doing that and materializes the 
whole SELECT result set regardless of the LIMIT.
This fix is limiting the process of filling up the temp table with only 
that much rows that will be actually used by propagating the LIMIT value.


mysql-test/r/insert_select.result:
  * Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
                tables
  - a test demonstrating the code path
mysql-test/t/insert_select.test:
  * Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
                tables
  - a test demonstrating the code path
sql/sql_select.cc:
  * Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
                tables
  - pass through the real LIMIT number if the temp table is created for
    buffering results.
  - set the counter for all the cases when the temp table is not used for
    grouping
2006-06-19 13:22:42 +03:00
unknown
5375bcad69 Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-4.1
2006-06-19 14:13:44 +05:00
unknown
46cdd39ea6 BUG#18036 - update of table joined to self reports table as crashed
Certain updates of table joined to self results in unexpected
behavior.

The problem was that record cache was mistakenly enabled for
self-joined table updates. Normally record cache must be disabled
for such updates.

Fixed wrong condition in code that determines whether to use
record cache for self-joined table updates.

Only MyISAM tables were affected.


mysql-test/r/myisam.result:
  Test case for BUG#18036.
mysql-test/t/myisam.test:
  Test case for BUG#18036.
sql/sql_update.cc:
  Fixed wrong condition in code that determines whether to use
  record cache for self-joined table updates.
2006-06-19 14:05:14 +05:00
unknown
95939476ab Fix for bug #20496: func_time.test failure
mysql-test/r/func_time.result:
  Fix for bug #20496: func_time.test failure                                      
    - floating point calculations removed.
mysql-test/t/func_time.test:
  Fix for bug #20496: func_time.test failure                                      
    - floating point calculations removed.
2006-06-19 13:03:29 +05:00
unknown
d0f39b6aeb Manually merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
2006-06-17 02:11:12 +04:00
unknown
629830d962 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
into moonbone.local:/work/16377-4.1-after
2006-06-15 16:41:26 +04:00
unknown
e4bfa961ae item_cmpfunc.h, cast.result:
Post fix for bug#16377


mysql-test/r/cast.result:
  Post fix for bug#16377
sql/item_cmpfunc.h:
  Post fix for bug#16377
2006-06-15 16:39:18 +04:00
unknown
99c320d7cf Merge moonbone.local:/work/15351-bug-4.1-mysql
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt


sql/item_strfunc.cc:
  Auto merged
2006-06-15 14:57:53 +04:00
unknown
ef02d496a0 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b15558
2006-06-15 11:15:56 +05:00
unknown
06828ae513 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main


sql/ha_ndbcluster.cc:
  Auto merged
2006-06-14 20:18:01 +02:00
unknown
ca1fd91f16 Bug #19493 NDB does not ignore duplicate keys when using LOAD DATA LOCAL
- make sure to disable bulk insert when check for duplicate key is needed


mysql-test/r/ndb_loaddatalocal.result:
  New BitKeeper file ``mysql-test/r/ndb_loaddatalocal.result''
mysql-test/t/ndb_loaddatalocal.test:
  New BitKeeper file ``mysql-test/t/ndb_loaddatalocal.test''
2006-06-14 20:16:32 +02:00
unknown
a1017b09b4 Bug#8663 cant use bgint unsigned as input to cast
Problem: cast to unsigned limited result to 
max signed bigint 9223372036854775808,
instead of max unsigned bigint 18446744073709551615.

Fix: don't use args[0]->val_int() when casting from
a floating point number, use val() instead, with range checkings,
special to unsigned data type.

item_func.cc:
  Special handling of cast from REAL_RESULT
  to unsigned int: we cannot execute args[0]->val_int()
  because it cuts max allowed value to LONGLONG_INT,
  instead of ULONGLONG_INT required.
count_distinct3.test:
  Getting rid of "Data truncated; out of range ..." warnings.
cast.test, cast.result:
  Adding test case.
ps.result:
  Fixing that cast from 6570515219.6535 
  to unsigned didn't round to 6570515220,
  and returned 6570515219 instead.


mysql-test/r/cast.result:
  Adding test case.
mysql-test/r/ps.result:
  Fixing that cast from 6570515219.6535 
  to unsigned didn't round to 6570515220,
  and returned 6570515219 instead.
mysql-test/t/cast.test:
  Adding test case.
mysql-test/t/count_distinct3.test:
  Get rid of "wring unsigned value"
  warnings.
sql/item_func.cc:
  Special handling of cast from REAL)RESULT
  to unsigned int: we cannot execute args[0]->val_int()
  because it cuts max allowed value to LONGLONG_INT,
  instead of ULONGLONG_INT required.
2006-06-14 13:40:21 +05:00
unknown
9237d65d33 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-06-13 22:53:30 +04:00
unknown
6297d1ab38 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/16377-bug-4.1-opt-mysql
2006-06-13 19:10:27 +04:00
unknown
47311e8e87 Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.

All date/time functions has the STRING result type thus their results are
compared as strings. The string date representation allows a user to skip 
some of leading zeros. This can lead to wrong comparison result if a date/time 
function result is compared to such a string constant.

The idea behind this bug fix is to compare results of date/time functions
and data/time constants as ints, because that date/time representation is 
more exact. To achieve this the agg_cmp_type() is changed to take in the
account that a date/time field or an date/time item should be compared 
as ints.

This bug fix is partially back ported from 5.0.

The agg_cmp_type() function now accepts THD as one of parameters. 
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.

From the Item_func_between::fix_length_and_dec() function removed the part
which was converting date/time constants to int if possible. Now this is 
done by the agg_cmp_type() function.

The new function result_as_longlong() is added to the Item class. 
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.

Correct val_int() methods are implemented for classes Item_date_typecast, 
Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
classes are derived from Item_str_func and Item_str_func::val_int() converts
its string value to int without regard to the date/time type of these items.

Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant. This is done
to get a correct result of comparisons like date_time_function() = string_constant.


mysql-test/r/cast.result:
  Fixed wrong test case result after bug fix#16377.
sql/item_timefunc.h:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  The result_as_longlong() function is set to return TRUE for these classes:
  Item_date, Item_date_func, Item_func_curtime, Item_func_sec_to_time,
  Item_date_typecast, Item_time_typecast, Item_datetime_typecast,
  Item_func_makedate.
sql/item_timefunc.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.Correct val_int() methods are implemented for classes Item_date_typecast, 
  Item_func_makedate, Item_time_typecast, Item_datetime_typecast.
sql/item_cmpfunc.h:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
  functions are changed to substitute result type of an item with the INT_RESULT
  if the item is a date/time item and another item is a constant.
sql/field.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  Field::set_warning(), Field::set_datetime_warning() now use current_thd to get thd if table isn't set.
sql/item_cmpfunc.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  The agg_cmp_type() function now accepts THD as one of parameters. 
  In addition, it now checks if a date/time field/function is present in the
  list. If so, it tries to coerce all constants to INT to make date/time
  comparison return correct result. The field for the constant coercion is
  taken from the Item_field or constructed from the Item_func. In latter case
  the constructed field will be freed after conversion of all constant items.
  Otherwise the result is same as before - aggregated with help of the
  item_cmp_type() function.
sql/item.h:
  The new function result_as_longlong() is added to the Item class. 
  It indicates that the item is a date/time item and result of it can be
  compared as int. Such items are date/time fields/functions.
mysql-test/t/func_time.test:
  Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
mysql-test/r/func_time.result:
  Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
2006-06-13 19:09:24 +04:00
unknown
05750704a8 Fix for bug #12728: Very strange behaviour of ELT
mysql-test/r/func_str.result:
  Fix for bug #12728: Very strange behaviour of ELT
    - test case
mysql-test/t/func_str.test:
  Fix for bug #12728: Very strange behaviour of ELT
    - test result
sql/item_strfunc.cc:
  Fix for bug #12728: Very strange behaviour of ELT
    - Item_func_elt::eq() introduced: check 'item' member as well
      (to distinguish for instance elt(1, 'a', 'b') and elt(2, 'a', 'b')
sql/item_strfunc.h:
  Fix for bug #12728: Very strange behaviour of ELT
    - Item_func_elt::eq() introduced: check 'item' member as well
      (to distinguish for instance elt(1, 'a', 'b') and elt(2, 'a', 'b')
2006-06-13 16:01:54 +05:00
unknown
b10b25fbb5 Added order by 2006-06-12 15:35:47 +02:00
unknown
7b207a8301 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-4.1
2006-06-12 15:35:46 +02:00
unknown
8d33265571 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-06-12 15:56:21 +04:00
unknown
ce8b60b4f9 Merge moonbone.local:/work/16716-bug-4.1-mysql
into moonbone.local:/work/16716-bug-4.1-opt-mysql
2006-06-12 15:50:59 +04:00
unknown
a3f3696697 Added lock test on index scan 2006-06-12 09:28:27 +02:00
unknown
ac7d73b004 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/data0/mysqldev/my/mysql-4.1
2006-06-09 22:42:34 +02:00
unknown
a6042ffbe9 Merge trift2.mysql.com:/M41/bug20303-4.1
into trift2.mysql.com:/M41/mysql-4.1


mysql-test/mysql-test-run.pl:
  Auto merged
2006-06-09 14:37:24 +02:00
unknown
f32d05f516 mysql-test/mysql-test-run.pl : Output the usage error if one is given. (Found when fixing bug#20303)
mysql-test/mysql-test-run.pl:
  Found when fixing bug#20303: The "usage()" function ignored the message it was given,
  so we got no real indication about the problem. Print it if one is given.
2006-06-08 19:55:22 +02:00
unknown
20e54ae6c5 Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: implemented ha_ndblcuster::unlock_row() and explicitly lock all rows that are not being unlocked 2006-06-08 16:12:38 +02:00
unknown
d0d69b7676 mysql-test/mysql-test-run.pl : A fix for bug#20303 "mysql-test-run.pl: Does not recognize -- argument"
mysql-test/mysql-test-run.pl:
  A fix for bug#20303 "mysql-test-run.pl: Does not recognize -- argument":
  Due to the use of 'pass_through' in option processing this lone '--' will remain
  as an argument, it must be ignored explicitly.
2006-06-08 14:52:33 +02:00
unknown
3cbf2eafbf Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b6880
2006-06-07 14:40:33 +05:00
unknown
febe7eb64a Fix for bug #6880: LAST_INSERT_ID() within a statement
mysql-test/r/auto_increment.result:
  Fix for bug #6880: LAST_INSERT_ID() within a statement
    - test result
mysql-test/r/rpl_log.result:
  Fix for bug #6880: LAST_INSERT_ID() within a statement
    - test result
mysql-test/t/auto_increment.test:
  Fix for bug #6880: LAST_INSERT_ID() within a statement
    - test case
mysql-test/t/rpl_log.test:
  Fix for bug #6880: LAST_INSERT_ID() within a statement
    - test case
sql/item_func.cc:
  Fix for bug #6880: LAST_INSERT_ID() within a statement
    - return the first thd->last_insert_id set (within a query)
2006-06-07 14:01:10 +05:00
unknown
f1b1c0eb3f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16546


sql/item_timefunc.cc:
  Auto merged
mysql-test/r/func_time.result:
  merging
mysql-test/t/func_time.test:
  merging
2006-06-06 09:10:28 +05:00
unknown
ccad0572f5 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt
2006-06-02 14:16:22 -07:00
unknown
e3e0658779 Fixed bug #18206.
The bug report revealed two problems related to min/max optimization:
1. If the length of a constant key used in a SARGable condition for
for the MIN/MAX fields is greater than the length of the field an 
unwanted warning on key truncation is issued;
2. If MIN/MAX optimization is applied to a partial index, like INDEX(b(4))
than can lead to returning a wrong result set.


mysql-test/r/func_group.result:
  Added test cases for bug #18206.
mysql-test/t/func_group.test:
  Added test cases for bug #18206.
sql/opt_sum.cc:
  Fixed bug #18206.
  Suppressed the warning about data truncation when store_val_in_field
  was used to store keys for the field used in MIN/MAX optimization.
  Blocked MIN/MAX optimization for partial keys, such as in INDEX(b(4)).
sql/sql_select.cc:
  Fixed bug #18206.
  Added a parameter for the function store_val_in_field allowing to
  control setting warnings about data truncation in the function.
sql/sql_select.h:
  Fixed bug #18206.
  Added a parameter for the function store_val_in_field allowing to
  control setting warnings about data truncation in the function.
2006-06-02 14:14:57 -07:00
unknown
3390eaa085 Bug #4981: 4.x and 5.x produce non-optimal execution path,
3.23 regression test failure

The member SEL_ARG::min_flag was not initialized, 
due to which the condition for no GEOM_FLAG in function 
key_or did not choose "Range checked for each record" as 
the correct access method.


mysql-test/r/select.result:
  testcase for 'Range checked' access method
mysql-test/t/select.test:
  testcase for 'Range checked' access method
sql/opt_range.cc:
  All of the class members initialized
2006-06-02 12:04:03 +03:00
unknown
22e3b0c66f Bug #18864 TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table 2006-06-02 07:26:45 +02:00
unknown
a9824f263d Merge moonbone.local:/work/18630-bug-4.1-mysql
into moonbone.local:/work/18360-bug-4.1-mysql-opt
2006-05-30 18:57:08 +04:00
unknown
f982aa934a Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
2006-05-30 13:20:38 +02:00
unknown
a2993441ab Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.


mysql-test/r/select.result:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
mysql-test/t/select.test:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
sql/share/czech/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/danish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/dutch/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/english/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/estonian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/french/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/german/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/greek/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/hungarian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/italian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/japanese-sjis/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/japanese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/korean/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian-ny/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/polish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/portuguese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/romanian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/russian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/serbian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/slovak/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/spanish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/swedish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/ukrainian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
2006-05-30 00:08:58 -07:00
unknown
c007dabaf6 Fixed bug#18360: Incorrect type coercion in IN() results in false comparison
The IN() function uses agg_cmp_type() to aggregate all types of its arguments
to find out some common type for comparisons. In this particular case the 
char() and the int was aggregated to double because char() can contain values
like '1.5'. But all strings which do not start from a digit are converted to
0. thus 'a' and 'z' become equal. 
This behaviour is reasonable when all function arguments are constants. But 
when there is a field or an expression this can lead to false comparisons. In
this case it makes more sense to coerce constants to the type of the field
argument.

The agg_cmp_type() function now aggregates types of constant and non-constant
items separately. If some non-constant items will be found then their
aggregated type will be returned. Thus after the aggregation constants will be
coerced to the aggregated type. 


mysql-test/t/func_in.test:
  Added test case for bug#18360: Incorrect type coercion in IN() results in false comparison.
mysql-test/r/func_in.result:
  Added test case for bug#18360: Incorrect type coercion in IN() results in false comparison.
sql/item_cmpfunc.cc:
  Fixed bug#18360: Incorrect type coercion in IN() results in false comparison.
  The agg_cmp_type() function now aggregates types of constant and non-constant
  items separately. If some non-constant items will be found then their
  aggregated type will be returned. Thus after the aggregation constants will
  be coerced to the aggregated type.
2006-05-30 00:36:48 +04:00
unknown
b29e052dbf Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-05-28 14:23:28 -07:00
unknown
2264b64473 Fixed bug#19225: unchecked error results in server crash
In multi-table delete a table for delete can't be used for selecting in
subselects. Appropriate error was raised but wasn't checked which leads to a
crash at the execution phase.

The mysql_execute_command() now checks for errors before executing select
for multi-delete.


mysql-test/t/multi_update.test:
  Added test case for bug#19225: unchecked error results in server crash
mysql-test/r/multi_update.result:
  Added test case for bug#19225: unchecked error results in server crash
sql/sql_parse.cc:
  Fixed bug#19225: unchecked error results in server crash
  The mysql_execute_command() now checks for errors before executing select for multi-delete.
2006-05-29 00:32:59 +04:00
unknown
fd7d4d7429 Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.

md5() and sha() functions treat their arguments as case sensitive strings.
But when they are compared their arguments were compared as a case
insensitive strings which leads to two functions with different arguments
and thus different results to being identical. This can lead to a wrong
decision made in the range optimizer and thus lead to a wrong result set.

Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
functions now set binary collation on their arguments.


sql/item_strfunc.cc:
  Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
  Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
  functions now set binary collation on their arguments.
mysql-test/r/func_str.result:
   Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
mysql-test/t/func_str.test:
  Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
2006-05-28 22:01:38 +04:00
unknown
d50e3433b4 BUG#14157: utf8 encoding in binlog without set character_set_client
refining the test case to exclude problems with koi8r on some platforms.


mysql-test/t/mysqlbinlog.test:
  replacing unavailble on some platforms koi8r with latin1 still to preserve the essence of the testcase:
  to generate utf8 names in binlog, despite client charset was different, and
  to digest this binlog.
2006-05-28 19:47:01 +03:00
unknown
42104b2efd Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.
Added a new error message ER_INDEX_DOES_NOT_EXIST.


include/mysqld_error.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
include/sql_state.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/explain.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/key_cache.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/preload.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/select.result:
  Added a test case for bug #17873.
mysql-test/t/explain.test:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/t/select.test:
  Added a test case for bug #17873.
sql/share/czech/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/danish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/dutch/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/english/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/estonian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/french/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/german/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/greek/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/hungarian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/italian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese-sjis/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/korean/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian-ny/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/polish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/portuguese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/romanian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/russian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/serbian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/slovak/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/spanish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/swedish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/ukrainian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
2006-05-27 23:57:33 -07:00
unknown
a3040aa74a Merge mysql.com:/data0/mysqldev/my/mysql-4.1.20-release
into  mysql.com:/data0/mysqldev/my/mysql-4.1


sql/sql_lex.cc:
  Auto merged
2006-05-26 18:31:25 +02:00
unknown
1991a87d83 Fixed bug#16716: subselect in concat() may lead to a wrong result.
The Item_func_concat::val_str() function tries to make as less re-allocations
as possible. This results in appending strings returned by 2nd and next
arguments to the string returned by 1st argument if the buffer for the first
argument has enough free space. A constant subselect is evaluated only once 
and its result is stored in an Item_cache_str. In the case when the first
argument of the concat() function is such a subselect Item_cache_str returns
the stored value and Item_func_concat::val_str() append values of other
arguments to it. But for the next row the value in the Item_cache_str isn't
restored because the subselect is a constant one and it isn't evaluated second
time. This results in appending string values of 2nd and next arguments to the 
result of the previous Item_func_concat::val_str() call.

The Item_func_concat::val_str() function now checks whether the first argument 
is a constant one and if so it doesn't append values of 2nd and next arguments
to the string value returned by it.


mysql-test/t/func_concat.test:
  Added test case for bug#16716: subselect in concat() may lead to a wrong result.
mysql-test/r/func_concat.result:
  Added test case for bug#16716: subselect in concat() may lead to a wrong result.
sql/item_strfunc.cc:
  Fixed bug#16716: subselect in concat() may lead to a wrong result.
  The Item_func_concat::val_str() function now checks whether the first argument 
  is a constant one and if so it doesn't append values of 2nd and next arguments
  to the string value returned by it.
2006-05-26 01:24:14 +04:00
unknown
f1c8dab368 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  dl145h.mysql.com:/tmp/andrei/4.1-bug14157-utf8_binlog_testcases
2006-05-24 16:55:04 +02:00
unknown
80e7938736 Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-4.1.20-release


tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
2006-05-24 14:12:19 +02:00
unknown
81dd2cd096 Merge neptunus.(none):/home/msvensson/mysql/bug15328/my41-bug15328
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/mysqldump.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Manual merge
2006-05-24 10:16:31 +02:00
unknown
6a60accef2 don't let bugfix for bug#8303 break the bugfix for bug#8378
revert the fix for bug#8303
correct the test for bug#8378


mysql-test/r/ctype_sjis.result:
  updated
mysql-test/t/ctype_sjis.test:
  updated
sql/sql_lex.cc:
  revert the fix for bug#8303
tests/mysql_client_test.c:
  correct the test for bug#8378
2006-05-24 00:55:53 +02:00
unknown
39d07a22c3 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b18536
2006-05-22 11:49:35 +05:00
unknown
328bc657bc Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-05-21 18:19:51 +05:00
unknown
85528e63a6 #14157: utf8 encoding in binlog without set character_set_client
fixing an issue with the test portability.


mysql-test/t/mysqlbinlog.test:
  BUG#14157: utf8 encoding in binlog without set character_set_client
  
  fixing koi8r specific case to run on all platforms. client does not announce in cmd line any specific
  encoding but rather set it via `set names'.
2006-05-20 12:34:56 +03:00
unknown
c41b767a26 Fix for bug #18536: mysqldump does not maintain table orders as per --tables option
client/mysqldump.c:
  Fix for bug #18536: mysqldump does not maintain table orders as per --tables option
    - use list to store table names instead of hash.
mysql-test/r/mysqldump.result:
  Fix for bug #18536: mysqldump does not maintain table orders as per --tables option
    - test result.
mysql-test/t/mysqldump.test:
  Fix for bug #18536: mysqldump does not maintain table orders as per --tables option
    - test case.
2006-05-19 16:21:32 +05:00
unknown
5632d02c8d Fix for bug #15558: truncate doesn't clear table on archive storage engine tables.
mysql-test/r/archive.result:
  Fix for bug #15558: truncate doesn't clear table on archive storage engine tables.
    - adjusted result
mysql-test/t/archive.test:
  Fix for bug #15558: truncate doesn't clear table on archive storage engine tables.
    - adjusted test
sql/examples/ha_archive.cc:
  Fix for bug #15558: truncate doesn't clear table on archive storage engine tables.
    - return an error as we don't suport delete_all_rows.
2006-05-18 17:10:58 +05:00
unknown
23006f9b54 Fix for #16327: invalid TIMESTAMP values retrieved
mysql-test/r/func_time.result:
  Fix for #16327: invalid TIMESTAMP values retrieved
    - test result
mysql-test/t/func_time.test:
  Fix for #16327: invalid TIMESTAMP values retrieved
    - test case
sql/field.cc:
  Fix for #16327: invalid TIMESTAMP values retrieved
    - let 1969 as well
2006-05-17 17:00:30 +05:00
unknown
afb3f432b0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/tulin/mysql-4.1
2006-05-16 21:46:52 +02:00
unknown
32d954f3e6 BUG#14157: utf8 encoding in binlog without set character_set_client: e.g DROP temporary
fixing encoding example because of table names can not be in koi8r 
on some platforms.


mysql-test/t/rpl_temporary.test:
  koi8r encoding to name tables is changed for latin1 for the former does not work
  on some platforms.
  The effect of the test remains: a test table is named to have multibyte utf8 representation,
  which is the essence of the bug.
2006-05-16 16:50:05 +03:00
unknown
c62cf51859 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
2006-05-16 12:32:36 +02:00
unknown
e399658517 Bug #16875 , correction of previous patch 2006-05-15 17:16:21 +02:00
unknown
37f940ce86 Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
- invalidate ndb dict cache on cluster disconnect (ClusterMgr.cpp)
- add check for correct frm on external lock when table cache is found invalid


ndb/include/ndbapi/ndb_cluster_connection.hpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/ClusterMgr.cpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/ClusterMgr.hpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/DictCache.cpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/DictCache.hpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/TransporterFacade.hpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
ndb/src/ndbapi/ndb_cluster_connection_impl.hpp:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
sql/ha_ndbcluster.cc:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
mysql-test/r/ndb_autodiscover3.result:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
mysql-test/t/ndb_autodiscover3.test:
  Bug #16875 Using stale MySQLD FRM files can cause restored cluster to fail
2006-05-15 16:23:59 +02:00
unknown
d388da989e BUG#14157: utf8 encoding in binlog without set character_set_client
fixing names length. Got an issue when merged to 5.0, decided to fix starting from 4.1


mysql-test/t/mysqlbinlog.test:
  fixing temp table name to fit to 64 bytes for 5.0
mysql-test/t/rpl_temporary.test:
  fixing temp table name to fit to 64 bytes for 5.0
2006-05-14 20:09:09 +03:00
unknown
d7d88e59f5 bug 15430 (init_connect test fails with the embedded server)
mysqltest program should be really multithreaded to perform this
test with the embedded server. So this test disabled until we
redo mysqltest this way


mysql-test/t/init_connect.test:
  test can't work properly with the embedded server yet
2006-05-14 21:49:33 +05:00
unknown
7c19c4da1a bug #15435 (wait_timeout.test fails with the embedded server)
this test just can't work in the embedded server


mysql-test/t/wait_timeout.test:
  test can't work properly with the embedded server yet
2006-05-14 21:43:22 +05:00
unknown
62be79a2e6 BUG#14157: utf8 encoding in binlog without set character_set_client
fixing a path to find charset by $MYSQL client. I believe the fix is done what should be
by default. 


mysql-test/t/mysqlbinlog.test:
  --character-sets-dir=../sql/share/charsets  is added otherwise client/.libs/lt-mysql
  searches in /usr/local/mysql ... A bug?
mysql-test/t/rpl_temporary.test:
  --character-sets-dir=../sql/share/charsets/
2006-05-13 12:14:20 +03:00
unknown
ee1a284416 Merge mysql.com:/net/nb/home/elkin/MySQL/FIXES/4.1-bug19188_tmp_name
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/4.1


mysql-test/r/rpl_temporary.result:
  Auto merged
mysql-test/t/rpl_temporary.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/mysql_priv.h:
  manual merge, a comment added
2006-05-12 21:38:41 +03:00
unknown
daebc0d63b Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/4.1-bug14157-utf8_binlog
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/4.1
2006-05-12 21:33:24 +03:00
unknown
c212cb25ed BUG#19188: incorrect temporary table name of DROP query in replication
A pattern to generate binlog for DROPped temp table in close_temporary_tables
  was buggy: could not deal with a grave-accent-in-name table.

  The fix exploits `append_identifier()' for quoting and duplicating accents.


mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/rpl_temporary.test:
  more correct internal table emulation; typo of @@session in bug#17263.
sql/mysql_priv.h:
  bool is_user_table(TABLE * table) 
  is added to answer wheather temporary table was created explicitly.
sql/sql_base.cc:
  Utilizing `append_identifier' to quote. `close_temporary_tables' once again recoded
  I hope to become much simplier than previously. No-binlog branch is separated completely the
  rest that adopts String's methods.
2006-05-12 21:29:06 +03:00
unknown
cba185d924 Merge mysql.com:/home/marty/MySQL/mysql-4.1_old
into  mysql.com:/home/marty/MySQL/mysql-4.1
2006-05-12 10:21:17 +02:00
unknown
a9e0d2779e Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
- Check that length of value is longer than 1 before decrementing length by 2.
 - Backport from 5.0, make it possible to use my_print_defaults in tests


mysql-test/mysql-test-run.pl:
  Backport from 5.0, make it possible to use my_print_defaults from tests
mysql-test/mysql-test-run.sh:
  Backport from 5.0, make it possible to use my_print_defaults from tests
mysql-test/r/mysqldump.result:
  Update result
mysql-test/t/mysqldump.test:
  Test that my_print default don't segfault when encountering an option without closing "
mysys/default.c:
  Check that length of value is longer than 1 before deciding to decrement its length by 2.
mysql-test/std_data/bug15328.cnf:
  New BitKeeper file ``mysql-test/std_data/bug15328.cnf''
2006-05-11 14:13:14 +02:00
unknown
ec83dd7c61 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/mysql-4.1-10418
2006-05-11 12:48:49 +02:00
unknown
3f73225669 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b18501


sql/item_timefunc.cc:
  Auto merged
2006-05-10 13:27:48 +05:00
unknown
c23c38fa31 BUG#14157: utf8 encoding in binlog without set character_set_client e.g DROP temporary
Binlog lacks encoding info about DROPped temporary table.

Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, that automatically, but not the client, who generates the query
the binlog should be updated on the server's encoding for the coming DROP.
The `write_binlog_with_system_charset()' is introduced to replace similar problematic places in the code.


mysql-test/r/drop_temp_table.result:
  results changed
mysql-test/r/mix_innodb_myisam_binlog.result:
  results changed
mysql-test/r/mysqlbinlog.result:
  results changed
mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/mysqlbinlog.test:
  Check roll-forward recovery from binlog where there are DROP temporary tables created
  in koi8r.
mysql-test/t/rpl_temporary.test:
  Check slave digests binlog with DROP temporary tables created in koi8r.
sql/mysql_priv.h:
  `write_binlog_with_system_charset()' is added to be called when a binlog event
  is created "implicitly" like DROP temporary table is case of closing connection.
sql/sql_base.cc:
  Idea of the fix is to switch temporary to system_charset_info when a temporary table
  is DROPped for binlog. Since that is the server, not the client, who generates the query
  the binlog should be updated on server's encoding for the coming DROP.
2006-05-09 23:01:31 +03:00
unknown
dd934da915 Bug#10418: LOAD_FILE does not behave like in manual if file does not exist
load_file() string-function should return NULL rather than throw an error if
the file doesn't exist, as per the manual.


mysql-test/t/outfile.test:
  expect NULL rather than error if file given to load_file() doesn't exist
mysql-test/t/func_str.test:
  show that load_file() will return NULL rather than throw an error
  if file doesn't exist
mysql-test/r/outfile.result:
  expect NULL rather than error if file given to load_file() doesn't exist
mysql-test/r/func_str.result:
  expect NULL rather than error if file given to load_file() doesn't exist
sql/item_strfunc.cc:
  load_file() should return NULL as per the docs if file not found,
  rather than throw an error
2006-05-08 04:37:58 +02:00
unknown
e4e67d587e Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  rurik.mysql.com:/home/igor/mysql-4.1
2006-05-07 11:25:33 -07:00
unknown
ce6a2d32b3 Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/4.1-bug19136_unass_user_var


sql/item_func.cc:
  Auto merged
2006-05-07 11:43:27 +03:00
unknown
375749b8af Fixed bug #14927.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct 
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.



mysql-test/r/having.result:
  Added a test case for bug #14927.
mysql-test/t/having.test:
  Added a test case for bug #14927.
sql/sql_lex.cc:
  Fixed bug #14927.
  Initialized fields for having conditions in  st_select_lex::init_query().
sql/sql_lex.h:
  Fixed bug #14927.
  Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
  Fixed bug #14927.
  Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
  Fixed bug #14927.
  Performed evaluation of constant expressions in having clauses.
  If the having condition contains a constant conjunct that is always false
  an empty result set is returned after the optimization phase.
  In this case the corresponding EXPLAIN command now returns 
  "Impossible HAVING" in the last column.
2006-05-06 23:48:13 -07:00
unknown
427bcfb440 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug16798
2006-05-06 22:15:27 +04:00
unknown
a60bd69777 Fix race condition in the test for bug#16501.
mysql-test/r/func_misc.result:
  Update the result.
2006-05-06 18:24:41 +04:00
unknown
447d5a0fac Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug16798
2006-05-06 13:48:20 +04:00
unknown
c13144722a BUG#16798: Inapplicable ref_or_null query plan and bad query result on random occasions
The bug was as follows: When merge_key_fields() encounters "t.key=X OR t.key=Y" it will 
try to join them into ref_or_null access via "t.key=X OR NULL". In order to make this 
inference it checks if Y<=>NULL, ignoring the fact that value of Y may be not yet known.

The fix is that the check if Y<=>NULL is made only if value of Y is known (i.e. it is a
constant).
TODO: When merging to 5.0, replace used_tables() with const_item() everywhere in merge_key_fields().


mysql-test/r/innodb_mysql.result:
  Testcase for BUG16798
mysql-test/t/innodb_mysql.test:
  Testcase for BUG16798
sql/sql_select.cc:
  BUG#16798: Inapplicable ref_or_null query plan and bad query result on random occasions 
  In merge_key_fields() don't call val->is_null() if the value of val is not known.
2006-05-06 13:15:00 +04:00
unknown
b1e20006b6 Bug#16997 Table rename that changes database does not rename indexes, recreate indexes in new database 2006-05-05 17:18:47 +02:00
unknown
4ab4631b06 Bug#19136: Crashing log-bin and uninitialized user variables in a derived table
The reason of the bug is in that `get_var_with_binlog' performs missed
assingment of
the variables as side-effect. Doing that it eventually calls
`free_underlaid_joins' to pass as an argument `thd->lex->select_lex' of the lex
which belongs to the user query, not 
to one which is emulated i.e SET @var1:=NULL.


`get_var_with_binlog' is refined to supply a temporary lex to sql_set_variables's stack.


mysql-test/r/rpl_user_variables.result:
  results changed
mysql-test/t/rpl_user_variables.test:
  a problematic query to be binlogged is added
sql/item_func.cc:
  BUG#19136: Crashing log-bin and uninitialized user variables
  
  The reason of the bug is in that how `get_var_with_binlog' performs missed
  assingment of the variables: `free_underlaid_joins' gets as an argument `thd->lex->select_lex'
  which belongs to the user query, not to one which is emulated i.e SET @var1:=NULL.
  
  `get_var_with_binlog' is refined to supply a temporary lex to sql_set_variables's stack.
2006-05-05 11:21:21 +03:00
unknown
5f7fec791e Merge mysql.com:/home/tomash/src/mysql_ab/mysql-4.1
into  mysql.com:/home/tomash/src/mysql_ab/mysql-4.1-bug16501
2006-05-05 11:35:38 +04:00
unknown
02dcc76e37 Fixed Bug#11324:
TIME_FORMAT using "%l:%i" returns 36:00 with 24:00:00 in TIME column


mysql-test/r/date_formats.result:
  Added test case for Bug#11324,
  "TIME_FORMAT using "%l:%i" returns 36:00 with 24:00:00 in TIME column"
mysql-test/t/date_formats.test:
  Added test case for Bug#11324,
  "TIME_FORMAT using "%l:%i" returns 36:00 with 24:00:00 in TIME column"
2006-05-04 20:19:37 +03:00
unknown
bcb61e6860 Fix for Bug#11326.
mysql-test/r/date_formats.result:
  Added test cases for Bug#11326
mysql-test/t/date_formats.test:
  Added test cases for Bug#11326
2006-05-04 19:31:10 +03:00
unknown
144d2ec9ee Merge mysql.com:/home/tomash/src/mysql_ab/mysql-4.1
into  mysql.com:/home/tomash/src/mysql_ab/mysql-4.1-bug16501
2006-05-04 18:36:00 +04:00
unknown
ac94170069 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1
into  hundin.mysql.fi:/home/jani/mysql-4.1


sql/sql_show.cc:
  Auto merged
2006-05-04 13:17:16 +03:00
unknown
a5a4f767b5 Merge mysql.com:/home/tomash/src/mysql_ab/mysql-4.1
into  mysql.com:/home/tomash/src/mysql_ab/mysql-4.1-bug16501
2006-05-04 11:25:48 +04:00
unknown
66d4b40cee Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/mysql-4.1-19025e
2006-05-04 09:06:27 +02:00
unknown
af2f9b90fa Bugs#17647: Trouble with "create database"
Problem:
if a user was granted privileges on database "d1",
it also was able to act on "D1" (i.e. in upper case),
even on Unix with case sensitive file system.

Fix:
Initialize grant hash to use binary comparison
if lower_case_file_system is not set (on most unixes),
and case insensitive comparison otherwise (Windows, MacOSX).


sql/sql_acl.cc:
  Initialize hash to use binary comparison with case sensitive FS.
mysql-test/include/have_case_sensitive_file_system.inc:
  New BitKeeper file ``mysql-test/include/have_case_sensitive_file_system.inc''
  Backporting from 5.1
mysql-test/r/case_sensitive_file_system.require:
  New BitKeeper file ``mysql-test/r/case_sensitive_file_system.require''
  Backporting from 5.1
mysql-test/r/lowercase_fs_off.result:
  Adding test case
mysql-test/t/lowercase_fs_off.test:
  Adding test case
2006-05-04 11:55:09 +05:00
unknown
812a82edfa test result fixed
mysql-test/r/mysqltest.result:
  result fixed
2006-05-04 09:58:03 +05:00
unknown
d300ceea3f Bug#19025 4.1 mysqldump doesn't correctly dump "auto_increment = [int]"
mysqldump / SHOW CREATE TABLE will show the NEXT available value for
the PK, rather than the *first* one that was available (that named in
the original CREATE TABLE ... AUTO_INCREMENT = ... statement).

This should produce correct and robust behaviour for the obvious use
cases -- when no data were inserted, then we'll produce a statement
featuring the same value the original CREATE TABLE had; if we dump
with values, INSERTing the values on the target machine should set the
correct next_ID anyway (and if not, we'll still have our AUTO_INCREMENT =
... to do that). Lastly, just the CREATE statement (with no data) for
a table that saw inserts would still result in a table that new values
could safely be inserted to).

There seems to be no robust way however to see whether the next_ID
field is > 1 because it was set to something else with CREATE TABLE
... AUTO_INCREMENT = ..., or because there is an AUTO_INCREMENT column
in  the table (but no initial value was set with AUTO_INCREMENT = ...)
and then one or more rows were INSERTed, counting up next_ID. This
means that in both cases, we'll generate an AUTO_INCREMENT =
... clause in SHOW CREATE TABLE / mysqldump.  As we also show info on,
say, charsets even if the user did not explicitly give that info in
their own CREATE TABLE, this shouldn't be an issue.

As per above, the next_ID will be affected by any INSERTs that have
taken place, though.  This /should/ result in correct and robust
behaviour, but it may look non-intuitive to some users if they CREATE
TABLE ... AUTO_INCREMENT = 1000 and later (after some INSERTs) have
SHOW CREATE TABLE give them a different value (say, CREATE TABLE
... AUTO_INCREMENT = 1006), so the docs should possibly feature a
caveat to that effect.

It's not very intuitive the way it works now (with the fix), but it's
*correct*.  We're not storing the original value anyway, if we wanted
that, we'd have to change on-disk representation?

If we do dump/load cycles with empty DBs, nothing will change.  This
changeset includes an additional test case that proves that tables
with rows will create the same next_ID for AUTO_INCREMENT = ... across
dump/restore cycles.

Confirmed by support as likely solution for client's problem.


mysql-test/r/auto_increment.result:
  test for creation of AUTO_INCREMENT=... clause
mysql-test/r/gis-rtree.result:
  Add AUTO_INCREMENT=... clauses where appropriate
mysql-test/r/mysqldump.result:
  show that AUTO_INCREMENT=... will survive dump/restore cycles
mysql-test/r/symlink.result:
  Add AUTO_INCREMENT=... clauses where appropriate
mysql-test/t/auto_increment.test:
  test for creation of AUTO_INCREMENT=... clause
mysql-test/t/mysqldump.test:
  show that AUTO_INCREMENT=... will survive dump/restore cycles
sql/sql_show.cc:
  Add AUTO_INCREMENT=... to output of SHOW CREATE TABLE if there is an
  AUTO_INCREMENT column, and NEXT_ID > 1 (the default).  We must not print
  the clause for engines that do not support this as it would break the
  import of dumps, but as of this writing, the test for whether
  AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=...
  is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT))
  Because of that, we do not explicitly test for the feature,
  but may extrapolate its existence from that of an AUTO_INCREMENT column.
2006-05-04 03:12:51 +02:00
unknown
f0c693cc86 Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.mrg


mysql-test/mysql-test-run.pl:
  Auto merged
sql/sql_table.cc:
  Auto merged
2006-05-04 00:03:58 +05:00
unknown
050a9f3f3f Merge hf@192.168.21.28:work/mysql-4.1.16892
into mysql.com:/home/hf/work/mysql-4.1.mrg
2006-05-03 15:53:36 +05:00
unknown
f4c6c0ed40 Merge mysql.com:/home/hf/work/mysql-4.1.15442
into mysql.com:/home/hf/work/mysql-4.1.mrg
2006-05-03 15:52:07 +05:00
unknown
bb95643f73 Merge mysql.com:/home/hf/work/mysql-4.1.15225
into mysql.com:/home/hf/work/mysql-4.1.mrg


sql/sql_table.cc:
  Auto merged
2006-05-03 15:51:19 +05:00
unknown
409fb4895f Fix for bug #16546: DATETIME+0 not always coerced the same way
mysql-test/r/func_time.result:
  Fix for bug #16546: DATETIME+0 not always coerced the same way
    - test case
mysql-test/t/func_time.test:
  Fix for bug #16546: DATETIME+0 not always coerced the same way
    - test case
sql/item_timefunc.cc:
  Fix for bug #16546: DATETIME+0 not always coerced the same way
    - set decimals to DATETIME_DEC
sql/item_timefunc.h:
  Fix for bug #16546: DATETIME+0 not always coerced the same way
    - set decimals to DATETIME_DEC
2006-05-02 18:00:44 +05:00
unknown
e93b203d08 ndb - bug#19201 (4.1), see comment in NdbBlob.cpp
ndb/test/ndbapi/testBlobs.cpp:
  option -fac (fetch across commit)
ndb/tools/delete_all.cpp:
  option --transactional (default remains truncate)
mysql-test/r/ndb_blob.result:
  bug#19201
mysql-test/t/ndb_blob.test:
  bug#19201
ndb/include/kernel/signaldata/TcKeyReq.hpp:
  bug#19201
ndb/include/ndbapi/NdbBlob.hpp:
  bug#19201
ndb/src/ndbapi/NdbBlob.cpp:
  bug#19201
2006-05-02 14:33:55 +02:00
unknown
09e83259fe Added tests for Bug#14515 2006-05-01 21:30:09 +03:00
unknown
dd68976a24 BUG#19145: mysqld crashes if you set the default value of an enum field to NULL
Now test for NULLness the pointers returned from objects created from the
default value. Pushing patch on behalf of cmiller.


mysql-test/r/null.result:
  Add test case
mysql-test/t/null.test:
  Add test case
sql/sql_table.cc:
  No longer blindly dereference pointer of the string representation of the
  values, where "NULL" is NUL. Raise INVALID DEFAULT error messages where
  appropriate.
  
  Note that the -O1 optimization flag made debugging this extremely tricky, with
  misleading results, and that removing it from the Makefile during debugging can
  be invaluable.
2006-04-28 12:15:29 -04:00
unknown
3a0d0b4ce5 BUG#18492: mysqld reports ER_ILLEGAL_REFERENCE in --ps-protocol
In the code that converts IN predicates to EXISTS predicates it is changing
the select list elements to constant 1. Example :
SELECT ... FROM ...  WHERE a IN (SELECT c FROM ...)
is transformed to :
SELECT ... FROM ... WHERE EXISTS (SELECT 1 FROM ...  HAVING a = c)
However there can be no FROM clause in the IN subquery and it may not be
a simple select : SELECT ... FROM ... WHERE a IN (SELECT f(..) AS
c UNION SELECT ...) This query is transformed to : SELECT ... FROM ...
WHERE EXISTS (SELECT 1 FROM (SELECT f(..) AS c UNION SELECT ...)
x HAVING a = c) In the above query c in the HAVING clause is made to be
an Item_null_helper (a subclass of Item_ref) pointing to the real
Item_field (which is not referenced anywhere else in the query anymore).
This is done because Item_ref_null_helper collects information whether
there are NULL values in the result.  This is OK for directly executed
statements, because the Item_field pointed by the Item_null_helper is
already fixed when the transformation is done.  But when executed as
a prepared statement all the Item instances are "un-fixed" before the
recompilation of the prepared statement. So when the Item_null_helper
gets fixed it discovers that the Item_field it points to is not fixed
and issues an error.  The remedy is to keep the original select list
references when there are no tables in the FROM clause. So the above
becomes : SELECT ... FROM ...  WHERE EXISTS (SELECT c FROM (SELECT f(..)
AS c UNION SELECT ...) x HAVING a = c) In this way c is referenced
directly in the select list as well as by reference in the HAVING
clause. So it gets correctly fixed even with prepared statements.  And
since the Item_null_helper subclass of Item_ref_null_helper is not used
anywhere else it's taken out.


mysql-test/r/ps_11bugs.result:
  Test case for the bug
mysql-test/r/subselect.result:
  Explain updated because of the tranformation
mysql-test/t/ps_11bugs.test:
  Testcase for the bug
sql/item.cc:
  Taking out Item_null_helper as it's no longer needed
sql/item.h:
  Taking out Item_null_helper as it's no longer needed
sql/item_subselect.cc:
  The described change to the IN->EXISTS transformation
2006-04-28 11:23:31 +02:00
unknown
966658fa48 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/innodb/mysql-4.1-innodb
2006-04-26 12:39:47 +04:00
unknown
c2e6c898ac Make innodb_mysql produce a non-empty output.
mysql-test/r/innodb_mysql.result:
  Fix result.
2006-04-26 11:15:09 +04:00
unknown
a4c62dbb8a Files innodb.[test|result] are to be used by Innobase only.
Use files innodb_mysql.[test|result] instead.


mysql-test/t/innodb.test:
  This file is to be used by Innobase only.
mysql-test/r/innodb_mysql.result:
  New BitKeeper file ``mysql-test/r/innodb_mysql.result''
   Use this file instead of innodb.result.
mysql-test/t/innodb_mysql.test:
  New BitKeeper file ``mysql-test/t/innodb_mysql.test''
   Use this file instead of innodb.test.
2006-04-26 09:51:57 +04:00
unknown
3ca1852cba Fix for bug #18501: Server crashes with monthname().
mysql-test/r/func_time.result:
  Fix for bug #18501: Server crashes with monthname().
    - test case
mysql-test/t/func_time.test:
  Fix for bug #18501: Server crashes with monthname().
    - test case
sql/item_timefunc.cc:
  Fix for bug #18501: Server crashes with monthname().
    - check null_value as well.
2006-04-25 14:34:19 +05:00
unknown
354e75939d Merge mysql.com:/home/tomash/src/mysql_ab/mysql-4.1
into  mysql.com:/home/tomash/src/mysql_ab/mysql-4.1-bug16501
2006-04-25 13:01:27 +04:00
unknown
9fc25141a2 Bug#16501: IS_USED_LOCK does not appear to work
Update User_level_lock::thread_id on acquiring an existing lock,
and reset it on lock release.


mysql-test/r/func_misc.result:
  Add result for bug#16501.
mysql-test/t/func_misc.test:
  Add test case for bug#16501.
sql/item_func.cc:
  Update User_level_lock::thread_id on acquiring an existing lock,
  and reset it on lock release (for safety).
2006-04-24 18:06:43 +04:00
unknown
f9216cdf8d Fix typo in mysql-test-run.pl (not caught by aotupush since it uses mysql-test-run.sh).
mysql-test/mysql-test-run.pl:
  Fix typo.
2006-04-24 15:34:01 +02:00
unknown
73f5ae213d Merge knielsen@10.100.52.19:/usr/local/mysql/mysql-4.1-mtr-fix
into  mysql.com:/data0/knielsen/mysql-4.1-mtr-fix
2006-04-24 10:28:31 +02:00
unknown
651c0c18f0 bug #16892 (mysql_client_test fails in embedded server)
mysql-test/t/mysql_client_test.test:
  test disabled in embedded server
2006-04-24 13:07:53 +05:00
unknown
9a7a78f700 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b17896
2006-04-24 08:01:10 +02:00
unknown
329ebbd14d Bug#17263 temporary tables and replication
Backporting a changeset made for 5.0. Comments from there:

  The fix refines the algorithm of generating DROPs for binlog.
  Temp tables with common pseudo_thread_id are clustered into one query.
  Consequently one replication event per pseudo_thread_id is generated.




mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/rpl_temporary.test:
  test to generate problematic drop in binlog to feed it to restarting slave
  to see no stop.
sql/sql_base.cc:
  change in drop temprorary tables alg in close_temporary_tables.
2006-04-23 12:18:57 +03:00
unknown
bb40065a1f Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  rurik.mysql.com:/home/igor/mysql-4.1
2006-04-21 08:22:03 -07:00
unknown
04be401f96 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b18643
2006-04-21 13:56:40 +02:00
unknown
d4f4f5bdaf Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-04-20 22:34:37 -07:00
unknown
9225a51c58 Fixed bug #18767.
The bug caused wrong result sets for union constructs of the form
(SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2.
For such queries order lists were concatenated and limit clause was
completely neglected. 


mysql-test/r/order_by.result:
  Added a test case for bug #18767.
mysql-test/t/order_by.test:
  Added a test case for bug #18767.
sql/sql_lex.h:
  Fixed bug #18767.
  Placed the code the created a fake SELECT_LEX into a separate function.
sql/sql_parse.cc:
  Fixed bug #18767.
  Placed the code the created a fake SELECT_LEX into a separate function.
sql/sql_select.cc:
  Fixed bug #18767.
  Changed the condition on which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence.
sql/sql_union.cc:
  Fixed bug #18767.
  Changed the condition at which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence.
sql/sql_yacc.yy:
  Fixed bug #18767.
  Changed the condition at which a SELECT is treated as part of a UNION.
  The SELECT in 
  (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 
  now is handled in the same way as the first SELECT in a UNION
  sequence. In the same way is handled the SELECT in
  (SELECT ... LIMIT n) ORDER BY order list.
  Yet if there is neither ORDER BY nor LIMIT in the single-select
  union construct
  (SELECT ...) ORDER BY order_list
  then it is still handled as simple select with an order clause.
2006-04-20 22:15:38 -07:00
unknown
9328e8874a Bug#9509: Optimizer: wrong result after AND with latin1_german2_ci comparisons
Fixing part2 of this problem: AND didn't work well 
with utf8_czech_ci and utf8_lithianian_ci in some cases.

The problem was because when during condition optimization
field was replaced with a constant, the constant's collation
and collation derivation was used later for comparison instead
of the field collation and derivation, which led to non-equal
new condition in some cases.

This patch copies collation and derivation from the field being removed
to the new constant, which makes comparison work using the same collation
with the one which would be used if no condition optimization were done.

In other words:

  where s1 < 'K' and s1 = 'Y';

was rewritten to:

  where 'Y' < 'K' and s1 = 'Y';

Now it's rewritten to:

  where 'Y' collate collation_of_s1 < 'K' and s1 = 'Y'

  (using derivation of s1)


Note, the first problem of this bug (with latin1_german2_ci) was fixed
earlier in 5.0 tree, in a separate changeset.


mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
sql/sql_select.cc:
  Set proper collation of the new item
2006-04-20 15:09:01 +05:00
unknown
5f3c91080c Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/mleich/src
2006-04-20 11:31:22 +02:00
unknown
fffe7c4d1e func_gconcat.test:
Clean up test case for bug#14169


mysql-test/t/func_gconcat.test:
  Clean up test case for bug#14169
2006-04-20 12:35:33 +04:00
unknown
e4d653abb8 Temporarily commented out a query from the test case for bug 14169 to make it pass with --ps-protocol.
mysql-test/r/func_gconcat.result:
  Added DROP TABLE command to the test case for bug 14169.
2006-04-19 16:08:37 -07:00
unknown
34efb701ed Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-2
2006-04-19 14:42:51 -07:00
unknown
913c8fa185 func_gconcat.result:
Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.


mysql-test/r/func_gconcat.result:
  Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.
2006-04-20 00:27:43 +04:00
unknown
b97e48a95b Fixed bug #19079.
The bug caused a reported index corruption in the cases when
key_cache_block_size was not a multiple of myisam_block_size,
e.g. when key_cache_block_size=1536 while myisam_block_size=1024.


mysql-test/r/key_cache.result:
  Added a test case for bug #19079.
mysql-test/t/key_cache.test:
  Added a test case for bug #19079.
2006-04-18 20:57:31 -07:00
unknown
eb9c676fa2 Merge mysql.com:/home/matthias/Arbeit/mysql-4.1/src
into  mysql.com:/home/matthias/Arbeit/mysql-4.1/src-1
2006-04-18 14:18:51 +02:00
unknown
d7055274ed Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14169-bug-4.1-mysql
2006-04-14 17:25:58 +04:00
unknown
f1a5003548 Fixes for Bug#12429: Replication tests fail: "Slave_IO_Running" (?) differs related to
MySQL 4.1
  and Bug#16920 rpl_deadlock_innodb fails in show slave status (reported for MySQL 5.1)
  - backport of several fixes done in MySQL 5.0 to 4.1
  - fix for new discovered instability (see comment on Bug#12429 + Bug#16920)
  - reenabling of testcases


mysql-test/r/rpl_deadlock.result:
  Updated results
mysql-test/r/rpl_relayrotate.result:
  Updated results
mysql-test/t/disabled.def:
  Reenabling of tests
mysql-test/t/rpl_deadlock.test:
  - replace sleep with real_sleep (backport fix for Bug#15624 MySQL 5.0)
  - egalized value for Slave_IO_Running 
  - line 105 (backport fix for Bug#12429 MySQL 5.0)
  - line 85 (see comment in Bug#12429 
             + Bug#16920 rpl_deadlock_innodb fails in show slave status)
  - improve readability of show slave status output (--vertical_results)
mysql-test/t/rpl_relayrotate.test:
  - Replace select ... with select max(a)
  - add sync_with_master (backport fix done by Kristian in MySQL 5.0 because of timing
    problems similar to Bug#15624)
mysql-test/t/rpl_until.test:
  Add wait_for_slave_to_stop like in the current MySQL 5.0 version of this test.
  I assume this makes the test results more predictable.
2006-04-13 20:42:48 +02:00
unknown
5c87b55f7e Fix for bug #18643: crazy UNCOMPRESS().
mysql-test/r/func_compress.result:
  Fix for bug #18643: crazy UNCOMPRESS().
    - test-case
mysql-test/t/func_compress.test:
  Fix for bug #18643: crazy UNCOMPRESS().
    - test-case
sql/item_strfunc.cc:
  Fix for bug #18643: crazy UNCOMPRESS().
    - set null_value.
2006-04-13 16:19:21 +05:00
unknown
5c0c1dcc3d Bug#18691: Converting number to UNICODE string returns invalid result.
Conversion from int and real numbers to UCS2 didn't work fine: 
CONVERT(100, CHAR(50) UNICODE)
CONVERT(103.9, CHAR(50) UNICODE)

The problem appeared because numbers have binary charset, so,
simple charset recast binary->ucs2 was performed
instead of real conversion.

Fixed to make numbers pretend to be non-binary.


mysql-test/r/ctype_ucs.result:
  Adding test case
mysql-test/t/ctype_ucs.test:
  Adding test case
sql/item_timefunc.cc:
  Adding new member from_cs, to replace my_charset_bin
  to a non-binary charset when converting from numbers to UCS2
sql/item_timefunc.h:
  Adding new member from_cs, to replace my_charset_bin
  to a non-binary charset when converting from numbers to UCS2
2006-04-13 10:55:48 +05:00
unknown
a2066982f1 Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was
used

In a simple queries a result of the GROUP_CONCAT() function was always of 
varchar type.
But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
table is used during select then the result is converted to blob, due to
policy to not to store fields longer than 512 chars in tmp table as varchar
fields.

In order to provide consistent behaviour, result of GROUP_CONCAT() now
will always be converted to blob if it is longer than 512 chars.
Item_func_group_concat::field_type() is modified accordingly.


mysql-test/t/func_gconcat.test:
  Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
mysql-test/r/func_gconcat.result:
  Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
sql/unireg.h:
  Added the CONVERT_IF_BIGGER_TO_BLOB constant
sql/sql_select.cc:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  The unnamed constant 255 in the create_tmp_field() and create_tmp_field_from_item() functions now defined as the CONVERT_IF_BIGGER_TO_BLOB constant.
  The create_tmp_field() function now converts the Item_sum string result to a blob field based on its char length.
sql/item_sum.h:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  To the Item_func_group_concat calls added the member function field_type() which returns the BLOB or VAR_STRING type based on the items length.
sql/item_func.cc:
  Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
  In the Item_func::tmp_table_field() function the unnamed constant 255 is changed to the CONVERT_IF_BIGGER_TO_BLOB constant.
  The Item_func::tmp_table_field() function now measures the result length in chars rather than bytes when converting string result to a blob.
2006-04-12 23:05:38 +04:00
unknown
ab72618b71 Fix broken --valgrind-options option. 2006-04-12 14:32:34 +02:00
unknown
259f8c7953 Merge mysql.com:/home/mydev/mysql-4.0
into  mysql.com:/home/mydev/mysql-4.0-bug5390
2006-04-11 18:55:24 +02:00
unknown
d8a46094be Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug5390
2006-04-11 15:18:16 +02:00
unknown
d7caa2a02a after merge fix. 2006-04-11 15:26:18 +05:00
unknown
57ecf2b4b4 bug #15442 (mysqltest.test doesn't work with the embedded server)
mysql-test/mysql-test-run.pl:
  no ndbcluster needed here
mysql-test/mysql-test-run.sh:
  no ndbcluster needed here
mysql-test/t/mysqltest.test:
  this test shouldn't work with the embedded server
2006-04-11 15:01:21 +05:00
unknown
974752bc1e Merge mysql.com:/usr/home/ram/work/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.1


mysql-test/r/func_op.result:
  Auto merged
sql/item_func.cc:
  Auto merged
mysql-test/t/func_op.test:
  SCCS merged
2006-04-11 13:53:44 +05:00
unknown
d943c58761 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.0
2006-04-11 10:46:21 +05:00
unknown
fc9dccaf3f Merge mysql.com:/usr/local/mysql/mysql-4.1-vgfix
into  mysql.com:/usr/local/mysql/mysql-4.1
2006-04-09 00:22:05 +02:00
unknown
5a19f3bc71 $MYSQL_TEST was broken with --valgrind. 2006-04-08 22:27:43 +02:00
unknown
f37d610147 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-16365


sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-04-07 23:50:45 +04:00
unknown
5b5530daa5 A fix and a test case for Bug#16365 "Prepared Statements: DoS with
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume 
100MB of RAM. Once this limit has been reached, the server will 
refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared 
statements is now available through a global read-only variable 
@@prepared_stmt_count.


mysql-test/r/ps.result:
  Test results fixed (a test case for Bug#16365)
mysql-test/t/ps.test:
  A test case for Bug#16365 "Prepared Statements: DoS with too many 
  open statements". Also fix statement leaks in other tests.
sql/mysql_priv.h:
  Add declarations for new global variables.
sql/mysqld.cc:
  Add definitions of max_prepared_stmt_count, prepared_stmt_count.
sql/set_var.cc:
  Implement support for @@prepared_stmt_count and 
  @@max_prepared_stmt_count. Currently these variables are queried
  without acquiring LOCK_prepared_stmt_count due to limitations of
  the set_var/sys_var class design. Updates are, however, protected 
  with a lock.
sql/set_var.h:
  New declarations to add support for @@max_prepared_stmt_count.
  Implement a new class, where the lock to be used when updating
  a variable is a parameter.
sql/sql_class.cc:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_class.h:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_prepare.cc:
  Statement_map::insert will now send a message in case of an
  error.
2006-04-07 23:37:06 +04:00
unknown
e4e37ae5a1 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/mtr-4.1
2006-04-07 21:07:53 +02:00
unknown
9b6e83f4b8 A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?))
gives wrong results". Implement previously missing 
Item_row::cleanup. The bug is not repeatable in 5.0, probably 
due to a coincidence: the problem is present in 5.0 as well.


mysql-test/r/ps.result:
  Update the result file (Bug#16248)
mysql-test/t/ps.test:
  Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
  wrong results"
sql/item_row.cc:
  Implement Item_row::cleanup(): we should reset used_tables_cache
  before reexecution of a prepared statement. In case ROW
  arguments contain a placeholder, used_tables_cache has PARAM_TABLE
  bit set in statement prepare. As a result, when executing a statement,
  the condition push down algorithm (make_cond_for_table) would think
  that the WHERE clause belongs to the non-existent PARAM_TABLE and
  wouldn't attach the WHERE clause to any of the real tables, 
  effectively optimizing the clause away.
sql/item_row.h:
  Remove a never used member 'array_holder'. Add declaration for
  Item_row::cleanup.
2006-04-07 22:26:25 +04:00
unknown
a024fd69c0 Manual merge. 2006-04-07 19:42:46 +02:00
unknown
747f81c22c mysql-test/mysql-test-run.sh : Provide info about the options used.
mysql-test/mysql-test-run.sh:
  Provide info about the options used for this run to any evaluation tool.
2006-04-07 19:27:19 +02:00
unknown
7bb1882822 mysql-test/mysql-test-run.pl : Add option "with-ndbcluster-only" (ignored).
mysql-test/mysql-test-run.pl:
  Add option "with-ndbcluster-only" (ignored) for compatibility with newer "Do-compile".
2006-04-07 13:34:39 +02:00
unknown
8fc0c48d5e Perl test script: Avoid some aborts, which made the whole build/test process terminate.
mysql-test/lib/mtr_process.pl:
  Change from "mtr_error()" to "mtr_warning()" on some problems,
  because "error" makes the whole suite abort which then makes "Do-compile" terminate,
  so none of the following steps (including other etst suites) will be done.
2006-04-07 13:02:15 +02:00
unknown
6206e7c228 mysql-test/mysql-test-run.sh : Add option "--with-ndbcluster-only" (backport from 5.1)
mysql-test/mysql-test-run.sh:
  Manual merge from 4.0 (which was a 5.1 backport):
  "--with-ndbcluster" is already present,
  "--with-ndbcluster-only" is really usable here.
2006-04-07 12:22:55 +02:00
unknown
ff85ba77be Backport of 5.1 test options "--with-ndbcluster" and "--with-ndbcluster-only" as dummies (ignored).
mysql-test/mysql-test-run.sh:
  Make "mysql-test-run.sh" accept (and ignore) the options "--with-ndbcluster" 
  and "--with-ndbcluster-only".
  This is necessary because newer build tools will issue them, and the test 
  script should tolerate that.
  Backport from 5.1 (Tomas Ulin, 2006-01-17)
2006-04-06 18:42:07 +02:00
unknown
5475703bad This problem has already been fixed by one of the previous changes.
Adding test case to cover queries which worked incorrectly earlier:
Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci


mysql-test/r/ctype_latin1.result:
  Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
mysql-test/t/ctype_latin1.test:
  Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
2006-04-06 10:51:23 +05:00
unknown
2574445ef1 Makefile.am:
Distribute mysql-test-run.pl


mysql-test/Makefile.am:
  Distribute mysql-test-run.pl
2006-04-03 03:47:28 +02:00
unknown
6de1d9d378 Makefile.am:
Install Perl mysql-test-run into test directory


mysql-test/Makefile.am:
  Install Perl mysql-test-run into test directory
2006-04-02 02:10:41 +02:00
unknown
2a4e2e8da2 Makefile.am:
Let "make install" install mysql-test-run.pl
mysql.spec.sh:
  Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS (bug#16662)


support-files/mysql.spec.sh:
  Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS (bug#16662)
mysql-test/Makefile.am:
  Let "make install" install mysql-test-run.pl
2006-04-01 05:44:10 +02:00
unknown
ff4de90501 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into sunlight.local:/local_work/15560-bug-4.1-mysql


sql/sql_table.cc:
  Auto merged
2006-03-30 10:22:03 +04:00
unknown
a48af9eb2c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2006-03-30 03:32:58 +03:00
unknown
2d6a51b4c8 Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
Bug #17705 "FT Index corruption occurs with UTF8 data..."
(Actually, the bug had nothing to do with FT index but with general key compression)



myisam/mi_search.c:
  Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
mysql-test/r/ctype_utf8.result:
  Test of fix for key compression bug
mysql-test/t/ctype_utf8.test:
  Test of fix for key compression bug
2006-03-30 01:50:52 +03:00
unknown
3479ec3780 mysql-test-run.pl:
Check that port range is valid, bug#16807


mysql-test/mysql-test-run.pl:
  Check that port range is valid, bug#16807
2006-03-30 00:48:46 +02:00
unknown
b25315469e Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
The GROUP_CONCAT uses its own temporary table. When ROLLUP is present
it creates the second copy of Item_func_group_concat. This copy receives the
same list of arguments that original group_concat does. When the copy is
set up the result_fields of functions from the argument list are reset to the
temporary table of this copy.
As a result of this action data from functions flow directly to the ROLLUP copy
and the original group_concat functions shows wrong result.
Since queries with COUNT(DISTINCT ...) use temporary tables to store
the results the COUNT function they are also affected by this bug.

The idea of the fix is to copy content of the result_field for the function
under GROUP_CONCAT/COUNT from  the first temporary table to the second one,
rather than setting result_field to point to the second temporary table.
To achieve this goal force_copy_fields flag is added to Item_func_group_concat
and Item_sum_count_distinct classes. This flag is initialized to 0 and set to 1
into the make_unique() member function of both classes.
To the TMP_TABLE_PARAM structure is modified to include the similar flag as
well.
The create_tmp_table() function passes that flag to create_tmp_field().
When the flag is set the create_tmp_field() function will set result_field
as a source field and will not reset that result field to newly created 
field for Item_func_result_field and its descendants. Due to this there
will be created copy func to copy data from old result_field to newly 
created field.


mysql-test/t/func_gconcat.test:
  Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
mysql-test/r/func_gconcat.result:
  Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
sql/sql_table.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added 0 as a last parameter to create_tmp_field()  to force old behaviour.
sql/sql_select.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  
  Added the flag 'make_copy_field' to create_tmp_field(), so that for Item_result_field descendants create_tmp_field() sets the item's result field as a source field and deny resetting that result field to a new value.
sql/sql_class.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the flag 'force_copy_fields' to the structure TMP_TABLE_PARAM in order to make create_tmp_field() force the creation of 'copy_field' objects.
sql/mysql_priv.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the bool parameter 'make_copy_field' to create_tmp_field().
sql/item_sum.cc:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added initialization of the force_copy_fields flag and passing it to create_tmp_table() through TMP_TBLE_PARAM in the Item_func_group_concat and Item_sum_count_distinct member functions.
sql/item_sum.h:
  Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
  Added the flag 'force_copy_fields' to the Item_func_group_concat and Item_sum_count_distinct classes.
2006-03-29 23:30:34 +04:00
unknown
4af4e1e704 Fix for bug#15316 SET value having comma not correctly handled
disallow the use of comma in SET members


mysql-test/r/create.result:
  Fix for bug#15316 SET value having comma not correctly handled
   test case
mysql-test/t/create.test:
  Fix for bug#15316 SET value having comma not correctly handled
   test case
2006-03-29 19:52:26 +05:00
unknown
a8c9bbd4be Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15098


sql/field.cc:
  Auto merged
2006-03-28 18:32:58 +05:00
unknown
278b83a84d Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15376


include/m_ctype.h:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2006-03-23 14:29:43 +04:00
unknown
49d2b4f061 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17374
2006-03-23 11:51:46 +04:00
unknown
83bc8c4e38 Bug#17374: select ... like 'A%' operator fails to find value on columuns with key
Fixed that LIKE worked case insensitively for latin2_czech_cs,
which was wrong for a case sensitive collation.


include/m_ctype.h:
  Making my_wildcmp_bin public instead of static
strings/ctype-bin.c:
  Making my_wildcmp_bin public instead of static
strings/ctype-czech.c:
  Use my_wildcmp_bin instead of case insensitive my_wildcmp_8bit
mysql-test/include/have_latin2_ch.inc:
  New BitKeeper file ``mysql-test/include/have_latin2_ch.inc''
mysql-test/r/ctype_latin2_ch.result:
  New BitKeeper file ``mysql-test/r/ctype_latin2_ch.result''
mysql-test/r/have_latin2_ch.require:
  New BitKeeper file ``mysql-test/r/have_latin2_ch.require''
mysql-test/t/ctype_latin2_ch.test:
  New BitKeeper file ``mysql-test/t/ctype_latin2_ch.test''
2006-03-20 16:28:25 +04:00
unknown
7913527eb8 Bug#18004 Connecting crashes server when default charset is UCS2
table.cc:
  Fixing to use system_charset_info instead of default_charset_info.
  Crash happened because the "ctype" array is empty in UCS2,
  and thus cannot be used with my_isspace().
  The reason why UCS2 appeared in this context was because of
  of default_charset_info variable incorrectly substituted to my_isspace().
  As functions check_db_name(), check_table_name() and check_column_name()
  always get values in utf8, system_charset_info must be used instead.
ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result:
  new file


sql/table.cc:
  Bug#18004 Connecting crashes server when default charset is UCS2
  Use of default_charset_info was wrong.
  Functions check_db_name, check_table_name and check_column_name
  get values of system_charset_info character set (utf8).
2006-03-20 14:43:02 +04:00
unknown
fd6d45f0b0 Fix bug in mysql-test-run.pl in ^C signal handler.
mysql-test/lib/mtr_timer.pl:
  Fix bug where ^C would trigger cleanup handler in both parent and
  timeout child processes, causing duplicated messages and potential
  conflicts.
2006-03-16 11:21:18 +01:00
unknown
0085230782 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug14980
2006-03-10 22:32:37 +01:00
unknown
fbe17c2a36 Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
For "count(*) while index_column = value" an index read
is done. It consists of an index scan and retrieval of
each key.

For efficiency reasons the index scan stores the key in
the special buffer 'lastkey2' once only. At the first 
iteration it notes this fact with the flag 
HA_STATE_RNEXT_SAME in 'info->update'.

For efficiency reasons, the key retrieval for blobs
does not allocate a new buffer, but uses 'lastkey2'...

Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
buffer has been polluted. In this case, the index scan
copies the key value again (and sets the flag again).


include/my_base.h:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Changed the comment for HA_STATE_RNEXT_SAME as a warning
  for future uses.
myisam/mi_delete.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_key.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_rnext_same.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removed trailing space and fixed a comment.
myisam/mi_unique.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_update.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
myisam/mi_write.c:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Removing the flag HA_STATE_RNEXT_SAME from info->update
  if info->lastkey2 was reused for another purpose than
  index scanning.
mysql-test/r/myisam.result:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Added test result.
mysql-test/t/myisam.test:
  Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
  Added test.
2006-03-10 15:03:04 +01:00
unknown
a3208c0f1f mysql-test-run.pl, mtr_cases.pl
- Back porting of some changes in later releases
  - Corrected valgrind support
  - Removed work around for TZ needed in VisualStudio 6
  - Don't restart master to add special settings from "<testcase>-master.opt",
    if same settngs as running master, feature request in bug#12433
  - With --reorder, keep tests with same *-master.opt content together,
    to save even more master restarts


mysql-test/lib/mtr_misc.pl:
  Added functions to compare lists of options
mysql-test/lib/mtr_cases.pl:
  Removed special code for Windows as in VC6 we unset
  TZ to avoid library bug
mysql-test/mysql-test-run.pl:
  Handle pseudo option --timezone=<spec> that sets TZ
2006-03-08 19:15:56 +01:00
unknown
3c83b827be Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
2006-03-08 11:20:12 +01:00
unknown
f491db2119 Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave
- Decrease "slave_open_temp_tables" during reopen of truncated table.
 - Add test "rpl_trunc_temp" 


sql/sql_delete.cc:
  Decrease "slave_open_temp_tables" after temporary table has been closed, it will be
  increased again when the temp table is reopened after it's been truncated.
mysql-test/r/rpl_trunc_temp.result:
  New BitKeeper file ``mysql-test/r/rpl_trunc_temp.result''
mysql-test/t/rpl_trunc_temp.test:
  New BitKeeper file ``mysql-test/t/rpl_trunc_temp.test''
2006-03-08 10:15:48 +01:00
unknown
cf11f78a66 mysql-test-run.pl:
Allow space in base directory path, bug#15736


mysql-test/mysql-test-run.pl:
  Allow space in base directory path, bug#15736
2006-03-08 03:51:59 +01:00
unknown
19a1f488a8 merged 2006-03-06 18:34:38 +01:00
unknown
a127344a6c kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
unknown
f372641876 Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
sql/item_cmpfunc.cc:
  Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
  - NULL items should not affect the result type.
2006-03-06 16:38:35 +04:00
unknown
d86a66d483 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15949
2006-03-06 14:50:34 +04:00
unknown
3ecf9f040a Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command


mysql-test/r/grant.result:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
mysql-test/t/grant.test:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
2006-03-06 14:03:40 +04:00
unknown
2fe8095662 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root


mysql-test/r/heap.result:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
2006-03-04 22:33:19 +03:00
unknown
ffa7f9439a Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478


mysql-test/README:
  SCCS merged
2006-03-01 18:51:33 -06:00
unknown
35bb42d315 Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
2006-03-01 18:44:44 -06:00
unknown
5f95aa48d9 Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478


mysql-test/README:
  Auto merged
2006-03-01 18:38:19 -06:00
unknown
aa9a497d7a README:
revise README.


mysql-test/README:
  revise README.
2006-03-01 18:37:41 -06:00
unknown
5b9669ccda Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478
2006-03-01 17:55:41 -06:00
unknown
79faaddce7 README.gcov:
Revise README.gcov.


mysql-test/README.gcov:
  Revise README.gcov.
2006-03-01 17:55:10 -06:00
unknown
7526342706 README:
Revise mysql-test README.


mysql-test/README:
  Revise mysql-test README.
2006-03-01 17:37:07 -06:00
unknown
eaaaa760e6 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/comment-4.1


mysql-test/mysql-test-run.sh:
  Auto merged
2006-03-01 17:43:16 +01:00
unknown
c64c108eda Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
union.result, union.test:
  Adding test case.
item.cc:
  Allow safe character set conversion in UNION
  - string constant to column's charset
  - to unicode
  Thus, UNION now works the same with CONCAT (and other string functions)
  in respect of aggregating arguments with different character sets.


sql/item.cc:
  Allow character set conversion in UNION
  - string to column's charset
  - to unicode
  Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
mysql-test/t/union.test:
  Adding test case.
mysql-test/r/union.result:
  Adding test case.
2006-03-01 17:58:01 +04:00
unknown
ca3dd7f01a mysql-test/mysql-test-run.pl : Add a "--comment=<string>" option (backport from 5.1).
mysql-test/mysql-test-run.pl:
  Add a "--comment=<string>" option (backport from 5.1).
  Its sole purpose is to get logged, so that test evaluation gets easier.
  See "Do-compile" for how it is called, and "gen-build-status-page" for its effect.
2006-03-01 13:15:37 +01:00
unknown
dfbbcd2767 Merge mysql.com:/M40/comment-4.0 into mysql.com:/M41/comment-4.1
mysql-test/mysql-test-run.sh:
  Auto merged
2006-03-01 13:10:59 +01:00
unknown
6e0d2e41cc mysql-test/mysql-test-run.sh : Add a "--comment=<string>" option, to get it logged when the test is run.
mysql-test/mysql-test-run.sh:
  Add a "--comment=<string>" option, to get it logged when the test is run.
  The purpose is to allow a better analysis when generating the status page 
  ("gen-build-status-page").
  See "Do-compile" for how it is used.
2006-03-01 12:21:44 +01:00
unknown
bf912125a3 mysqltest.test:
Add real_sleep tests.


mysql-test/t/mysqltest.test:
  Add real_sleep tests.
2006-02-28 17:54:11 -06:00
unknown
8d5f0fcddc mysql-test-run.sh:
Fix URLs.
README:
  Fix URL.
mysqltest.result:
  Update test result for real_sleep error message.
mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.


client/mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.
mysql-test/r/mysqltest.result:
  Update test result for real_sleep error message.
mysql-test/README:
  Fix URL.
mysql-test/mysql-test-run.sh:
  Fix URLs.
2006-02-28 15:08:16 -06:00
unknown
ea9ea952be Remove 'delayed' to make the test deterministic (already
fixed in 5.0).
A post-review fix (Bug#13134)


mysql-test/r/heap.result:
  Remove 'delayed' to make the test deterministic.
mysql-test/r/ps.result:
  Remove an unneeded drop table (test case for Bug#13134)
mysql-test/t/heap.test:
  Remove 'delayed' to make the test deterministic.
mysql-test/t/ps.test:
  A post-review fix (Bug#13134)
2006-02-23 23:41:15 +03:00
unknown
9cf3f255bd A fix and a test case for Bug#13134 "Length of VARCHAR() utf8
column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the 
bug).


mysql-test/r/ps.result:
  Test results fixed (Bug#13134)
mysql-test/t/ps.test:
  A test case for Bug#13134 "Length of VARCHAR() utf8 column is 
  increasing when table is recreated with PS/SP"
sql/field.cc:
  Move initialization of create_field::char_length to the constructor
  of create_field.
sql/field.h:
  Rename chars_length to char_length (to be consistent with
  how this term is used throughout the rest of the code).
sql/sql_parse.cc:
  Initialize char_length in add_field_to_list. This function
  effectively works as another create_field constructor.
sql/sql_table.cc:
  Reinit length from char_length for every field in 
  mysql_prepare_table. This is not needed if we're executing
  a statement for the first time, however, at subsequent executions
  length contains the number of bytes, not characters (as it's expected 
  to).
2006-02-21 19:52:20 +03:00
unknown
b23aa5c0be Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.15225


sql/sql_table.cc:
  Auto merged
2006-02-20 18:01:59 +04:00
unknown
32d32b6eca Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/mysql-4.1-bug16217
2006-02-13 19:15:02 +02:00
unknown
39bfc560a1 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/usr/local/mysql/mysql-4.1-fixrace
2006-02-12 00:19:59 +01:00
unknown
18faf00262 mysql-test-run.{pl,sh}:
Give space for second and third slave port


mysql-test/mysql-test-run.pl:
  Give space for second and third slave port
  Define shell variables for all ports, and
  list these at startup
mysql-test/mysql-test-run.sh:
  Give space for second and third slave port
2006-02-11 23:35:23 +01:00
unknown
503193867e Fix a race on some platforms in mysql-test-run.pl, where it would sometimes
errorneously abort reporting failure to kill child processes, where in
reality the problem was merely that the child had become a zombie because
of missing waitpid() call.


mysql-test/lib/mtr_process.pl:
  Fix race (on some platforms) when killing processes.
2006-02-11 22:50:59 +01:00
unknown
34d8502a51 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2006-02-10 19:18:45 +01:00
unknown
9a68ba18c7 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2006-02-10 17:53:13 +01:00
unknown
26287714d5 Bug #17249 ndb, delete statement with join where clause fails when table do not have pk
Bug #17257 ndb, update fails for inner joins if tables do not have Primary Key

change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead


mysql-test/r/ndb_basic.result:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
mysql-test/t/ndb_basic.test:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
sql/ha_ndbcluster.cc:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
  
  change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead
sql/ha_ndbcluster.h:
  Bug #17249 delete statement with join where clause fails when table do not have pk
  Bug #17257 update fails for inner joins if tables do not have Primary Key
  
  change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead
2006-02-10 17:40:22 +01:00
unknown
a68f171585 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.


client/mysql.cc:
  BUG#16217 forced to introduce a separate mysql client command.
  Feature is backported from 5.0, precisely 
  ChangeSet 1.2034 06/02/09 16:23:09 aelkin@mysql.com
  (under second review at the moment)
mysql-test/r/mysqlbinlog.result:
  changed in 5.0
mysql-test/t/mysqlbinlog.test:
  backported from 5.0. The last part of the test to mimic bug#16217
sql/log_event.cc:
  Inserting exclaiming comment command for mysql client made differently than in 5.0.
  Parsing still is cheap enough not to think to modify server code instead.
2006-02-10 15:12:27 +02:00
unknown
1a27a433fc Removed 'delayed' to make the test deterministic (as the bug itself has nothing to do with 'delayed'). 2006-02-08 16:00:39 +04:00
unknown
2408644096 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2006-02-07 14:23:16 +02:00
unknown
26f7afaf35 kill.test fixed for kill on Mac OS X (which do not send OK)
mysql-test/r/kill.result:
  This result chenged because of the correspondent test change.
mysql-test/t/kill.test:
  This test fixed for kill on Mac OS X (which do not send OK)
2006-02-07 13:45:16 +02:00
unknown
0b9270009c Merge april.(none):/home/svoj/devel/mysql/BUG14496/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/merge/mysql-4.1
2006-02-07 13:49:03 +04:00
unknown
8deb6616bc Bug #17154 load data infile of char values into a table of char(PK) hangs
Bug #17158  	load data infile of char values into table of char with no (PK) fails to load
Bug #17081  	Doing "LOAD DATA INFILE" directly after delete can cause missing data


mysql-test/r/ndb_load.result:
  New BitKeeper file ``mysql-test/r/ndb_load.result''
mysql-test/t/ndb_load.test:
  New BitKeeper file ``mysql-test/t/ndb_load.test''
2006-02-07 00:03:39 +01:00
unknown
b301e65883 ndb - replace+tinyblob back-patch from 5.0 [ discard on 4.1->5.0 merge ]
mysql-test/r/ndb_blob.result:
  replace+tinyblob back-patch from 5.0
mysql-test/t/ndb_blob.test:
  replace+tinyblob back-patch from 5.0
ndb/src/ndbapi/NdbBlob.cpp:
  replace+tinyblob back-patch from 5.0
2006-02-03 15:23:58 +01:00
unknown
e3c3086304 BUG#14496: Crash or strange results with prepared statement,
MATCH and FULLTEXT
Fixed that fulltext query using PS results in unexpected behaviour
when executed 2 or more times.


mysql-test/r/fulltext.result:
  Testcase for BUG#14496.
mysql-test/t/fulltext.test:
  Testcase for BUG#14496.
sql/item_func.h:
  In Item_func_match::cleanup() always reset ft_handler to 0.
2006-02-01 20:40:12 +04:00
unknown
43f122c410 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/innodb/mysql-4.1-merged
2006-01-30 15:31:35 +03:00
unknown
cc47eb7791 Fixed BUG#16387.
Applied innodb-4.1-ss17 snapshot.
  Do not mistake TABLENAME_ibfk_0 for auto-generated id.


innobase/dict/dict0dict.c:
  Applied innodb-4.1-ss17 snapshot.
    dict_table_get_highest_foreign_id(): Ignore foreign
    constraint identifiers starting with the pattern
    TABLENAME_ibfk_0 (BUG#16387).
mysql-test/r/innodb.result:
  Applied innodb-4.1-ss17 snapshot.
    Fixed results for added test case.
mysql-test/t/innodb.test:
  Applied innodb-4.1-ss17 snapshot.
    Added test case.
2006-01-30 15:17:33 +03:00
unknown
13896eaa84 mysql-test-run.pl:
Aligned the MTR_BUILD_THREAD policy to shell version


mysql-test/mysql-test-run.pl:
  Aligned the MTR_BUILD_THREAD policy to shell version
2006-01-28 13:04:01 +01:00
unknown
55ca11fec2 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0
into mysql.com:/Users/kent/mysql/bk/mysql-4.1


mysql-test/mysql-test-run.sh:
  Auto merged
2006-01-28 12:39:25 +01:00
unknown
a73b7dc243 mysql-test-run.sh:
Bug#16780: Extend port range to make space for 5.1 NDBCLUSTER_PORT_SLAVE


mysql-test/mysql-test-run.sh:
  Bug#16780: Extend port range to make space for 5.1 NDBCLUSTER_PORT_SLAVE
2006-01-28 12:35:46 +01:00
unknown
ae653f1be0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-01-27 19:11:59 +01:00
unknown
79f575a8f7 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into  c-5c0be253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug12796
2006-01-27 09:29:59 -05:00
unknown
7cdbff9711 Enable kill test
mysql-test/t/disabled.def:
  Enable the kill test
2006-01-27 13:23:10 +01:00
unknown
e7f4df036b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1
2006-01-26 19:01:54 +02:00
unknown
f9ab554985 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1


sql/sql_select.cc:
  Auto merged
2006-01-26 16:00:49 +02:00
unknown
e0412c55b3 BUG#16487 importing the test case from 5.0 (the fix is done in BUG#15699)
mysql-test/t/rpl_ignore_table-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_ignore_table-slave.opt''
mysql-test/t/rpl_ignore_table.test:
  New BitKeeper file ``mysql-test/t/rpl_ignore_table.test''
2006-01-26 12:51:34 +02:00
unknown
956a5b6dfa BUG#15699 importing the fix from 5.0
sql/sql_parse.cc:
  BUG#15699,16487 merge of the fix made in 5.0
mysql-test/r/rpl_multi_update4.result:
  New BitKeeper file ``mysql-test/r/rpl_multi_update4.result''
mysql-test/t/rpl_multi_update4-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_multi_update4-slave.opt''
mysql-test/t/rpl_multi_update4.test:
  New BitKeeper file ``mysql-test/t/rpl_multi_update4.test''
mysql-test/r/rpl_ignore_table.result:
  New BitKeeper file ``mysql-test/r/rpl_ignore_table.result''
2006-01-26 12:49:55 +02:00
unknown
6025cd4672 Merge 2006-01-26 00:06:20 +03:00
unknown
d33ac37ba6 BUG#15935: In mysql_update, don't use full index scan when we could have used quick select scan.
mysql-test/r/update.result:
  Testcase for BUG#15935
mysql-test/t/update.test:
  Testcase for BUG#15935
sql/sql_update.cc:
  BUG#15935: 
  - Do account for the fact that used_index!=MAX_KEY is also true for cases
    when quick select is used, and use quick select then (and not full index scan).
  - Also removed the redundant "used_index= MAX_KEY" statement
2006-01-25 23:25:23 +03:00
unknown
4a525b3f92 Manually merged
sql/sql_base.cc:
  Auto merged
2006-01-24 22:10:39 +03:00
unknown
52ff597a8a Merge mysql.com:/M41/bug16730-4.1 into mysql.com:/M41/merge-4.1 2006-01-24 17:52:53 +01:00
unknown
6cc16c5019 Test "ctype_ucs": Disable warnings if "InnoDB" is not configured ("classic" build) (bug#16730).
mysql-test/t/ctype_ucs.test:
  Disable warnings if "InnoDB" is not configured ("classic" build) (bug#16730).
2006-01-24 13:54:34 +01:00
unknown
e14c9c5d9c Fixed bug #16510: Updating field named like '*name' caused server crash.
When setup_fields() function finds field named '*' it expands it to the list
of all table fields. It does so by checking that the first char of
field_name is '*', but it doesn't checks that the '* is the only char.
Due to this, when updating table with a field named like '*name', such field
is wrongly treated as '*' and expanded. This leads to making list of fields
to update being longer than list of the new values. Later, the fill_record() 
function crashes by dereferencing null when there is left fields to update,
but no more values.

Added check in the setup_fields() function which ensures that the field
expanding will be done only when '*' is the only char in the field name.


mysql-test/t/update.test:
  Added test case for bug#16510: Updating field named like '*name' caused server crash
mysql-test/r/update.result:
  Added test case for bug#16510: Updating field named like '*name' caused server crash
sql/sql_base.cc:
  Fixed bug #16510: Updating field named like '*name' caused server crash.
  Added check in the setup_fields() function which ensures that the field
  expanding will be done only when '*' is the only char in the field name.
2006-01-23 21:51:32 +03:00
unknown
cfbb86034d Merge mysql.com:/home/mydev/mysql-4.0-bug5390
into  mysql.com:/home/mydev/mysql-4.1-bug5390


sql/table.h:
  Auto merged
mysql-test/r/lock.result:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
mysql-test/t/lock.test:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
sql/lock.cc:
  BUG#5390 - problems with merge tables
  Manual merge from 4.0.
2006-01-23 19:19:29 +01:00