Commit graph

31624 commits

Author SHA1 Message Date
unknown
9cf4750ec3 BUG#21282: Incorrect query results for "t.key NOT IN (<big const list>)
In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
where N>1000, was incorrectly converted to
  (-inf < X < c_min) OR (c_max < X)
Now this conversion is removed, we dont produce any range lists for such
conditions.


mysql-test/r/range.result:
  BUG#21282: Testcase
mysql-test/t/range.test:
  BUG#21282: Testcase
sql/opt_range.cc:
  BUG#21282: Incorrect query results for "t.key NOT IN (<big const list>) 
  In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
  where N>1000, was incorrectly converted to 
    (-inf < X < c_min) OR (c_max < X)
  Now this conversion is removed, we dont produce any range lists for such
  conditions.
2006-08-15 21:08:22 +04:00
unknown
2f5ae7c536 Bug #21302: Result not properly sorted when using an ORDER BY on a second table in a join
- undeterminstic tests fixed


mysql-test/r/order_by.result:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second table in a join
   - more undeterminstic tests fixed
mysql-test/t/order_by.test:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second table in a join
   - more undeterminstic tests fixed
2006-08-15 15:48:49 +03:00
unknown
57745f96ce Bug #21302: Result not properly sorted when using an ORDER BY
on a second table in a join
- undeterministic output of the test case removed.
2006-08-15 13:01:04 +03:00
unknown
5bf943a95d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21159-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-08-15 12:54:02 +03:00
unknown
fd65e53a8a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21174-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-08-15 10:31:34 +03:00
unknown
a0474a811c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21159-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-08-15 10:25:56 +03:00
unknown
3915c3d94c Bug #21159: Optimizer: wrong result after AND with different data types
Disable const propagation for Item_hex_string.
This must be done because Item_hex_string->val_int() is not
the same as (Item_hex_string->val_str() in BINARY column)->val_int().
We cannot simply disable the replacement in a particular context (
e.g. <bin_col> = <int_col> AND <bin_col> = <hex_string>) since
Items don't know the context they are in and there are functions like 
IF (<hex_string>, 'yes', 'no').
Note that this will disable some valid cases as well 
(e.g. : <bin_col> = <hex_string> AND <bin_col2> = <bin_col>) but 
there's no way to distinguish the valid cases without having the
Item's parent say something like : Item->set_context(Item::STRING_RESULT)
and have all the Items that contain other Items do that consistently.


mysql-test/r/compare.result:
  Bug #21159: Optimizer: wrong result after AND with different data types
   - test case
mysql-test/t/compare.test:
  Bug #21159: Optimizer: wrong result after AND with different data types
   - test case
sql/sql_select.cc:
  Bug #21159: Optimizer: wrong result after AND with different data types
   - disable const propagation for Item_hex_string.
2006-08-15 10:13:17 +03:00
unknown
6675c2c2d3 Bug #21174: Index degrades sort performance and
optimizer does not honor IGNORE INDEX
 - Allow an index to be used for sorting the table 
   instead of filesort only if it is not disabled by
   IGNORE INDEX.


mysql-test/r/group_by.result:
  Bug #21174: Index degrades sort performance and 
               optimizer does not honor IGNORE INDEX
   - test case
mysql-test/t/group_by.test:
  Bug #21174: Index degrades sort performance and 
               optimizer does not honor IGNORE INDEX
   - test case
2006-08-14 18:19:29 +03:00
unknown
3dfd0a22b8 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21302-5.0-opt


mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
2006-08-14 15:58:01 +03:00
unknown
06a302eff2 Bug #21302: Result not properly sorted when using an ORDER BY on a second
table in a join
 The optimizer removes redundant columns in ORDER BY. It is considering 
redundant every reference to const table column, e.g b in :
create table t1 (a int, b int, primary key(a)); 
select 1 from t1 order by b where a = 1

But it must not remove references to const table columns if the 
const table is an outer table because there still can be 2 values :
the const value and NULL. e.g.:
create table t1 (a int, b int, primary key(a));
select t2.b c from t1 left join t1 t2 on (t1.a = t2.a and t2.a = 5) 
  order by c;


mysql-test/r/join_outer.result:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second 
              table in a join
   - don't remove columns of const tables in ORDER BY if the const table 
     is an outer table.
mysql-test/r/order_by.result:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second 
              table in a join
   - test case
mysql-test/t/order_by.test:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second 
              table in a join
   - test case
sql/sql_select.cc:
  Bug #21302: Result not properly sorted when using an ORDER BY on a second 
              table in a join
   - don't remove columns of const tables in ORDER BY if the const table 
     is an outer table.
2006-08-14 15:45:48 +03:00
unknown
22485f4a59 Merge moonbone.local:/work/tmp_merge-5.0-mysql
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-08-11 15:45:53 +04:00
unknown
6071b686b1 Extended a test case for bug#7391. 2006-08-11 14:41:07 +05:00
unknown
145dd58d3c Merge may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-5.0


mysql-test/r/grant.result:
  Manual merge: use local.
mysql-test/t/grant.test:
  Manual merge: use local.
sql/sql_update.cc:
  Manual merge: use local.
2006-08-11 14:24:09 +05:00
unknown
12eb42acf9 Merge updates.
mysql-test/r/grant2.result:
  Merge update:  Change between versions, it appears.
mysql-test/r/heap_btree.result:
  Merge update:  Add deterministic ordering of data, as the order is different 
  between versions.
mysql-test/r/mysql_client.result:
  Merge update: Help options changed between versions.
mysql-test/t/heap_btree.test:
  Merge update:  Add deterministic ordering of data, as the order is different 
  between versions.
BitKeeper/deleted/.del-bug20328.test~c76d766fe3e1eb5:
  Delete: mysql-test/t/bug20328.test
BitKeeper/deleted/.del-bug20328.result~4fee68989442c2a3:
  Delete: mysql-test/r/bug20328.result
2006-08-10 12:39:18 -04:00
unknown
4a8c861c05 Fix for check_cpu to work correctly on MacOSX/Intel. 2006-08-10 17:35:21 +03:00
unknown
78c9885fe0 Removed Iggy's accidentally-added files. 2006-08-10 01:02:31 -04:00
unknown
d278381ec8 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0


client/mysql.cc:
  Auto merged
heap/hp_delete.c:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
scripts/fill_func_tables.sh:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/r/grant2.result:
  Manual merge
mysql-test/r/heap_btree.result:
  Manual merge
mysql-test/r/mysql_client.result:
  Manual merge
mysql-test/t/grant2.test:
  Manual merge
mysql-test/t/heap_btree.test:
  Manual merge
mysql-test/t/mysql_client.test:
  Manual merge
2006-08-09 22:23:41 -04:00
unknown
51bb3b2a7f Merge may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-5.0


myisam/mi_update.c:
  Auto merged
2006-08-09 14:33:45 +05:00
unknown
a2a5f2b536 BUG#20060 - mysqld option "--flush " doesn't work for update statement
Problem described in this bug report affects MyISAM tables only.

Running mysqld --flush instructs mysqld to sync all changes to disk
after each SQL statement. It worked well for INSERT and DELETE
statements, but it did sync for UPDATE only in case if there was
index change (change of colum that has an index). If no updated column
has an index, data wasn't synced to disk.

This fix makes UPDATE statement to sync data to disk even if there is
no index change (that is only data change) and mysqld is run with
--flush option.


myisam/mi_update.c:
  Every myisam function that updates myisam table must end with
  call to _mi_writeinfo(). If operation (second param of
  _mi_writeinfo()) is not 0 it sets share->changed to 1, that is
  flags that data has changed. If operation is 0, this function
  equals to no-op in this case.
  
  mi_update() must always pass !0 value as operation, since even if
  there is no index change there could be data change.
2006-08-09 14:28:39 +05:00
unknown
4abe4b1717 sql_view.cc:
After merge fix


sql/sql_view.cc:
  After merge fix
2006-08-09 06:46:06 +04:00
unknown
a5ccdea772 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  sunlight.local:/local_work/leak_fix


sql/sql_view.cc:
  Auto merged
2006-08-09 01:45:42 +04:00
unknown
962d5b4d4e Merge sunlight.local:/home/evgen/bk-trees/mysql-5.0
into  sunlight.local:/local_work/leak_fix


sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/table.cc:
  Auto merged
sql/sql_view.cc:
  Manually merged
2006-08-09 01:43:11 +04:00
unknown
1e9ebd010a sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc:
Correct memory leak fix


sql/unireg.h:
  Correct memory leak fix
sql/table.cc:
  Correct memory leak fix
sql/sql_view.h:
  Correct memory leak fix
sql/sql_view.cc:
  Correct memory leak fix
sql/sql_lex.h:
  Correct memory leak fix
sql/sql_base.cc:
  Correct memory leak fix
2006-08-09 00:05:42 +04:00
unknown
55bd10965a sql_view.cc:
Memory leak fix


sql/sql_view.cc:
  Memory leak fix
2006-08-07 07:41:49 +04:00
unknown
c57b6620c5 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  sunlight.local:/local_work/leak_fix


sql/sql_view.cc:
  Auto merged
2006-08-07 02:29:59 +04:00
unknown
ca23eef305 Merge sunlight.local:/home/evgen/bk-trees/mysql-5.0
into  sunlight.local:/local_work/leak_fix


sql/sql_view.cc:
  Auto merged
2006-08-07 00:06:54 +04:00
unknown
c34baab996 sql_view.cc:
Memory leak fix


sql/sql_view.cc:
  Memory leak fix
2006-08-07 00:06:03 +04:00
unknown
cc10958f49 Add my_memmem.c to mysys.dsp (needed by mysql_client_test) 2006-08-04 01:41:21 +04:00
unknown
fc19d19d4a Fix a bug in the .dsp file. Ignore a symlink.
BitKeeper/etc/ignore:
  Added ndb/src/common/util/testBitmask.cpp to the ignore list
VC++Files/sql/mysqld.dsp:
  Fix a bug in the .dsp file.
2006-08-04 00:00:48 +04:00
unknown
65866b7bba Make test case for bug#21215repeateble by calling "reset master" 2006-08-03 16:47:24 +02:00
unknown
98157e78b1 Update result after merge, since the function Item::tmp_table_field_from_field_type()
now takes mbmaxlen into account when calculating max_length of new field.
2006-08-03 15:48:28 +02:00
unknown
dba52b539a Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-4.1
2006-08-03 15:49:41 +05:00
unknown
842ec23341 Bug#21419 test case lowercase_fs_off fails on Windows
- Backport patch from 5.0


sql/mysqld.cc:
  Add else case to set "lower_case_file_system" also when lower_case_table_names are 1
2006-08-03 12:16:24 +02:00
unknown
4b57917194 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-08-03 12:11:07 +02:00
unknown
234bb881c3 Remove double error printout in mysqldump
client/mysqldump.c:
  Remove double error printout, mysql_query_with_error_report will do that. And set the exit code for us.
mysql-test/r/mysqldump.result:
  Update test result after merge
2006-08-03 12:09:22 +02:00
unknown
9744e7f811 Merge neptunus.(none):/home/msvensson/mysql/my41-bug21218
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/t/mysqlbinlog.test:
  Null merge
2006-08-03 11:59:57 +02:00
unknown
135ffa6360 Merge neptunus.(none):/home/msvensson/mysql/my41-bug21218
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1


mysql-test/t/mysqlbinlog.test:
  Auto merged
2006-08-03 11:57:52 +02:00
unknown
607b8e5e6e Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug21215
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysql.cc:
  Auto merged
configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
client/mysqldump.c:
  Manual merge
mysql-test/r/mysqldump.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Manual merge
2006-08-03 11:48:08 +02:00
unknown
485510a2c8 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-4.1
2006-08-03 14:08:43 +05:00
unknown
74465080c6 BUG#7391 - Cross-database multi-table UPDATE uses active database
privileges

This problem is 4.1 specific. It doesn't affect 4.0 and was fixed
in 5.x before.

Having any mysql user who is allowed to issue multi table update
statement and any column/table grants, allows this user to update
any table on a server (mysql grant tables are not exception).

check_grant() accepts number of tables (in table list) to be checked
in 5-th param. While checking grants for multi table update, number
of tables must be 1. It must never be 0 (actually we have
DBUG_ASSERT(number > 0) in 5.x in grant_check() function).


mysql-test/r/grant.result:
  Addition to test case for bug#7391:
  - Added grant statement to trigger this problem in 4.1.
  - Fixed error messages.
mysql-test/t/grant.test:
  Addition to test case for bug#7391:
  - Added grant statement to trigger this problem in 4.1.
  - Fixed error messages.
sql/sql_update.cc:
  check_grant() accepts number of tables (in table list) to be checked
  in 5-th param. For this particular check number of tables must be 1.
  It must never be 0 (actually we have DBUG_ASSERT(number > 0) in 5.x
  in grant_check() function).
2006-08-03 14:03:08 +05:00
unknown
45275fbc2b Removing disabling of lowercase_fs_off 2006-08-03 09:48:42 +02:00
unknown
ed44a2ee51 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_group.result:
  Merge manually
mysql-test/t/func_group.test:
  Merge manually
2006-08-03 09:32:58 +02:00
unknown
695c534d76 Merge rama.(none):/home/jimw/my/mysql-5.0-19147
into  rama.(none):/home/jimw/my/mysql-5.0-16502
2006-08-02 19:52:11 -07:00
unknown
827e6a850a Merge rama.(none):/home/jimw/my/mysql-5.0-16881
into  rama.(none):/home/jimw/my/mysql-5.0-16502


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-08-02 19:51:34 -07:00
unknown
7f69aee4ea Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-16502
2006-08-02 19:48:12 -07:00
unknown
595b5fdbe8 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/m41-maint--07OBQ


sql/set_var.cc:
  Auto merged
2006-08-02 14:57:12 -04:00
unknown
3c8150b79b Disable a failing test case (filed a p1 bug) 2006-08-02 22:21:12 +04:00
unknown
e44e344cac Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/r/udf.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
mysql-test/t/udf.test:
  Manual merge.
2006-08-02 21:54:10 +04:00
unknown
f4fb48bab0 Bug#9719: DELETE with WHERE on HEAP table just deletes first row of matched
set.

(Ramil's patch, recreated.)


heap/hp_delete.c:
  Reset info->lastkey_len for further heap_rnext/heap_rprev calls.
mysql-test/r/heap_btree.result:
  Test for bug #9719: DELETE with WHERE on HEAP table just deletes first 
  row of matched set.
mysql-test/t/heap_btree.test:
  Test for bug #9719: DELETE with WHERE on HEAP table just deletes first 
  row of matched set.
2006-08-02 13:06:59 -04:00
unknown
a0efaba363 A post-merge fix. 2006-08-02 19:39:47 +04:00