Commit graph

20840 commits

Author SHA1 Message Date
unknown
85c064f6b1 Merge moonbone.local:/work/tmp_merge-4.1-mysql
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-26 23:11:34 +04:00
unknown
f895a16c72 BUG#16255: Post-review fixes: adjust the testcase.
mysql-test/r/subselect.result:
  BUG#16255: A proper testcase
mysql-test/t/subselect.test:
  BUG#16255: A proper testcase
2006-08-24 19:16:27 +04:00
unknown
c74c819533 Bug #16255: Subquery in WHERE (the cset by Georgi Kodinov)
Must not use Item_direct_ref in HAVING because it points to
 the new value (witch is not yet calculated for the first row).


mysql-test/r/subselect.result:
  Bug #16255: Subquery in where
   - test case
mysql-test/t/subselect.test:
  Bug #16255: Subquery in where
   - test case
sql/item_subselect.cc:
  Bug #16255: Subquery in where
   Must not use Item_direct_ref in HAVING because it points to
   the new value (witch is not yet calculated for the first row).
2006-08-24 19:14:36 +04:00
unknown
9907e970ae BUG#21077: Possible crash caused by invalid sequence of handler::* calls:
The crash was caused by invalid sequence of handler::** calls:                                                           
  ha_smth->index_init();                                                                                                 
  ha_smth->index_next_same(); (2)                                                                                        
(2) is an invalid call as it was not preceeded by any 'scan setup' call
like index_first() or index_read(). The cause was that QUICK_SELECT::reset()
didn't "fully reset" the quick select- current QUICK_RANGE wasn't forgotten,
and quick select might attempt to continue reading the range, which would
result in the above mentioned invalid sequence of handler calls.

5.x versions are not affected by the bug - they already have the missing
"range=NULL" clause.                                                    
                                                       


mysql-test/r/innodb_mysql.result:
  Testcase for BUG#21077
mysql-test/t/innodb_mysql.test:
  Testcase for BUG#21077
sql/opt_range.h:
  BUG#21077: Possible crash caused by invalid sequence of handler::* calls:                                              
   - Make QUICK_SELECT::reset() really reset the quick select
2006-08-15 20:33:14 +04:00
unknown
bfdbb780c2 Fix for bug #20709: Collation not used in group by on 4.1.
myisam/mi_uniue.c:mi_check_unique() should skip trailing spaces comparing 
TEXT and VARTTEXT key segments.


myisam/mi_unique.c:
  Fix for bug #20709: Collation not used in group by on 4.1.    
  
  myisam/mi_uniue.c:mi_check_unique() should skip trailing spaces comparing 
  TEXT and VARTTEXT key segments.
    
  Example: assume, we have a 'char(200) collate utf8_unicode_ci' field,
  there are two records with _utf8"0x65" and _utf8"0xC3A9" characters;
  these values are equal according
  to the utf8_unicode_ci collation, but two 600 byte length corresponding keys:  
  "0x65<0x20 repeats 599 times>" and "0xC3A9<0x20 repeats 598 times>" are not    
  equal if we count trailing spaces and it may cause inconsequent behavior.
  
  So, let's pass 1 as the skip_end_space parameter value to the mi_compare_text()
  function for proper TEXT and VARTTEXT key segments comparison.
mysql-test/r/ctype_utf8.result:
  Fix for bug #20709: Collation not used in group by on 4.1.    
    - test results.
mysql-test/t/ctype_utf8.test:
  Fix for bug #20709: Collation not used in group by on 4.1.    
    - test case.
2006-08-10 15:06:22 +05:00
unknown
70269a091e Removed iggy's accidentally checked-in test files.
BitKeeper/deleted/.del-bug20328.test:
  Delete: mysql-test/t/bug20328.test
BitKeeper/deleted/.del-bug20328.result:
  Delete: mysql-test/r/bug20328.result
2006-08-09 13:41:08 -04:00
unknown
8f88400d33 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-4.1
2006-08-09 14:35: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
ef6019010d Merge mysql.com:/usr/home/bar/mysql-4.1.b19741v0
into  mysql.com:/usr/home/bar/mysql-4.1.b19741
2006-08-07 13:15:23 +05: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
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
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
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
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
98daac1865 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20721
2006-08-02 11:13:55 -04:00
unknown
d31ae636dd Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-02 18:16:05 +04:00
unknown
328e8c7430 Merge moonbone.local:/work/tmp_merge-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-02 16:40:32 +04:00
unknown
84ece59cef Merge moonbone.local:/work/tmp_merge-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql


sql/item_strfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-08-02 16:10:52 +04:00
unknown
504e375656 Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.20317
2006-08-02 16:57:46 +05:00
unknown
87fc6265ce Merge bk-internal:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-08-01 15:36:37 +02:00
unknown
340053df4e Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-08-01 06:08:09 +02:00
unknown
0f581cd3c5 Merge anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/mysql-4.1-maint
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/pending/bug-4.1-19364


client/mysql.cc:
  Auto merged
2006-07-31 12:53:47 -07:00
unknown
76f65b3fb3 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-07-31 21:30:24 +02:00
unknown
15daae5aef Merge bk-internal:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-07-31 16:07:28 +02:00
unknown
f49ad00d69 Merge 192.168.0.20:mysql/bug21217/my41-bug21217
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-07-31 14:41:29 +02:00
unknown
6cf16daa4b Merge neptunus.(none):/home/msvensson/mysql/my41-bug21125
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-07-31 14:40:21 +02:00
unknown
83c87624fa BUG#21217 "mysqltest" client is inconsistent when to log a line number
- Init start_lineno to 0


client/mysqltest.c:
  Init start_lineno to 0 and set it back to zero before comparing result file.
2006-07-30 19:30:20 +02:00
unknown
66716f0984 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0
into  mysql.com:/Users/kent/mysql/bk/mysql-4.1


configure.in:
  Auto merged
2006-07-29 17:26:06 +02:00
unknown
189a687971 configure.in:
Corrected typo


configure.in:
  Corrected typo
2006-07-29 17:24:48 +02:00
unknown
04d60b3897 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0
into  mysql.com:/Users/kent/mysql/bk/mysql-4.1


configure.in:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
support-files/mysql.spec.sh:
  SCCS merged
2006-07-28 23:40:05 +02:00
unknown
d1fde0f7f5 Makefile.am, configure.in:
Man page for mysqld command move to section 8 (bug#21220)


configure.in:
  Man page for mysqld command move to section 8 (bug#21220)
man/Makefile.am:
  Man page for mysqld command move to section 8 (bug#21220)
2006-07-28 23:12:40 +02:00
unknown
6f65bffebd make_binary_distribution.sh:
Man page for "mysqld" command move to section 8 (bug#21220)


scripts/make_binary_distribution.sh:
  Man page for "mysqld" command move to section 8 (bug#21220)
2006-07-28 23:06:49 +02:00
unknown
a811cc0a88 mysql.spec.sh:
Man page for "mysqld" command move to section 8 (bug#21220)


support-files/mysql.spec.sh:
  Man page for "mysqld" command move to section 8 (bug#21220)
2006-07-28 22:57:57 +02:00
unknown
9c7a329eba Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt


sql/sql_select.cc:
  Auto merged
2006-07-27 10:06:37 +03:00
unknown
bb81f6ac2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt


sql/sql_select.cc:
  Auto merged
2006-07-26 19:55:33 +03:00
unknown
6b75e24b73 * Bug #20792: Incorrect results from aggregate subquery
When processing aggregate functions all tables values are reset
to NULLs at the end of each group. 
When doing that if there are no rows found for a group
the const tables must not be reset as they are not recalculated 
by do_select()/sub_select() for each group.


mysql-test/r/subselect2.result:
  * Bug #20792: Incorrect results from aggregate subquery
   - test suite for the bug. This is dependent on InnoDB despite
     the fact that the bug and the fix are not InnoDB specific.
     This is because of the table flag HA_NOT_EXACT_COUNT.
     When this flag is off (as in MyISAM) both t2 and t3 become of
     join type 'system' as they are estimated to have 1 record and
     and this statistics can be trusted (according to the absence of
     HA_NOT_EXACT_COUNT).
mysql-test/t/subselect2.test:
  * Bug #20792: Incorrect results from aggregate subquery
   - test suite for the bug
sql/sql_select.cc:
  * Bug #20792: Incorrect results from aggregate subquery
   - when clearing results if there are not rows found for group
     the const tables must not be reset as they are not recalculated
     for each group.
2006-07-26 19:19:30 +03:00
unknown
70d27b3503 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21019-4.1-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
mysql-test/t/select.test:
  SCCS merged
2006-07-26 18:49:26 +03:00
unknown
35945019ea BUG#21206: memory corruption when too many cursors are opened at once
Too many cursors (more than 1024) could lead to memory corruption.
This affects both, stored routines and C API cursors, and the
threshold is per-server, not per-connection.  Similarly, the
corruption could happen when the server was under heavy load
(executing more than 1024 simultaneous complex queries), and this is
the reason why this bug is fixed in 4.1, which doesn't support
cursors.

The corruption was caused by a bug in the temporary tables code, when
an attempt to create a table could lead to a write beyond allocated
space.  Note, that only internal tables were affected (the tables
created internally by the server to resolve the query), not tables
created with CREATE TEMPORARY TABLE.  Another pre-condition for the
bug is TRUE value of --temp-pool startup option, which, however, is a
default.

The cause of a bug was that random memory was overwritten in
bitmap_set_next() due to out-of-bound memory access.


mysys/my_bitmap.c:
  Local 'bitmap_size' is measured in bytes, no need to multiply it by 8.
sql/sql_select.cc:
  Clear the temp_pool_slot bit only if we have set it previously.
2006-07-26 16:23:07 +04:00
unknown
5ca1ee5eea Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
 united into a single condition on the key and checked together the server must 
 check which value is the NULL value in a correct way : not only using ->is_null 
 but also check if the expression doesn't depend on any tables referenced in the 
 current statement. 
 This additional check must be performed because that optimization takes place 
 before the actual execution of the statement, so if the field was initialized 
 to NULL from a previous statement the optimization would be applied incorrectly.


mysql-test/r/select.result:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case
mysql-test/t/select.test:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case. 
     Note that ALTER TABLE is important here : it happens to
     leave the Field instance for t1.b set to NULL, witch is vital for
     demonstrating the problem fixed by this changeset.
sql/sql_select.cc:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - check whether a value is null taking into account its table dependency.
2006-07-26 13:32:28 +03:00
unknown
ef0cc9ebd0 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Modify test case to workaround the test tool problem
 - (Null merge into 5.0)


mysql-test/t/mysqlbinlog.test:
  Send the ouput from "mysqlbinlog" to a file and then read execute it with "mysql"
  This is a workaround for a windows bug in the test tools in mysql-4.1, which makes
  it impossible to use "|" to send the output from one program directly to the other.
  This has been fixed in mysql-5.0.
2006-07-26 11:08:15 +02:00
unknown
03637f493e Applied innodb-4.1-ss32 snapshot.
innobase/ibuf/ibuf0ibuf.c:
  Applied innodb-4.1-ss32 snapshot.
   ibuf_fixed_addr_page(): Add parameter space. As the insert
   buffer B-tree is only located in the system tablespace
   (space 0), IBUF_TREE_ROOT_PAGE_NO is only special in space 0.
2006-07-26 07:47:29 +04:00
unknown
03fc0a8fb1 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  lamia.home:/home/tkatchaounov/autopush/4.1-bug-20954


mysql-test/r/subselect.result:
  Auto merged
2006-07-26 01:21:35 +03:00
unknown
585b5bbc92 Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
The problem was in that opt_sum_query() replaced MIN/MAX functions
with the corresponding constant found in a key, but due to imprecise
representation of float numbers, when evaluating the where clause,
this comparison failed.

When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.

As a side-effect this fix also corrects an unnoticed problem in
bug 12882.


mysql-test/r/func_group.result:
  BUG#20954 - test result adjustment.
  Adjusted the test result of bug 12882 which was not preperly fixed.
  The current patch corrects the problem that was fully corrected by the
  patch for 12882.
  
  The problem was that opt_sum_query() indicated that the optimizer may
  remove all tables because all MIN/MAX/COUNT functions are constants,
  but this lead to an empty result instead of NULL because the WHERE
  clause was still evaluated.
  
  The current fix removes all conjuncts in the where clause that
  reference the removed tables, and thus corrects the problem.
mysql-test/r/select.result:
  BUG#20954 - added test
mysql-test/r/subselect.result:
  BUG#20954 - test result adjustment.
  
  The fix removes those conditions in a where clause that refer to
  tables optimized away by MIN/MAX optimization (opt_sum_query()).
mysql-test/t/select.test:
  BUG#20954 - added test
sql/sql_select.cc:
  Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
  
  When MIN/MAX optimization detects that all tables can be removed,
  also remove all conjuncts in a where clause that refer to these
  tables. As a result of this fix, these conditions are not evaluated
  twice, and in the case of float number comparisons we do not discard
  result rows due to imprecise float representation.
  
  As a side-effect this fix also corrects an unnoticed problem in
  bug 12882.
2006-07-26 01:11:19 +03:00
unknown
2347325117 Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
LIKE craashed with a pattern having letters in the range 128..255
(e.g. A WITH ACUTE or C WITH CARON) because of wrong cast from
signed char to unsigned int.


mysql-test/r/ctype_cp1250_ch.result:
  Adding test case
mysql-test/t/ctype_cp1250_ch.test:
  Adding test case
strings/ctype-win1250ch.c:
  Fixing wrong cast from "signed char" -> "uint" to
  "signed char" -> "unsigned char" -> uint, to properly
  handle bytes 128..255.
2006-07-25 17:27:53 +05:00
unknown
c939a8d7e5 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into  trift2.:/M41/push-4.1
2006-07-24 19:27:01 +02:00
unknown
75220954bf Merge trift2.:/M41/clone-4.1
into  trift2.:/M41/push-4.1


sql/field.cc:
  Auto merged
sql/sql_locale.cc:
  Changes were already present (and even better) == Null-merge == "ul".
2006-07-24 19:18:30 +02:00
unknown
def55c5219 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Send confusing output to /dev/null


mysql-test/t/mysqlbinlog.test:
  Send confusing error messages to /dev/null so they don't appear in erro log if test case fails
2006-07-24 18:12:57 +02:00
unknown
568b49fb7d Bug#21125 mysqldump: Problem with non-standard table names
- The mysql-test/std_data/bug15328.cnf file was not copied to install or dist dir.


mysql-test/Makefile.am:
  Add std_data/*.cnf files to dist_hook and install-data-local
scripts/make_win_src_distribution.sh:
  Copy *.cnf files as well.
2006-07-24 14:31:37 +02:00