Commit graph

15436 commits

Author SHA1 Message Date
unknown
ece3c40b31 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: only check pk if it is updated 2006-11-30 22:52:23 +01:00
unknown
1cc765b311 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: handle INSERT ... ON DUPLICATE KEY UPDATE 2006-11-30 17:22:04 +01:00
unknown
eb36371ac3 #18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: call peek_index_rows 2006-11-30 15:02:33 +01:00
unknown
807d6c0950 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values 2006-11-07 16:38:37 +01:00
unknown
5d10a44537 Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-10-27 23:59:04 +02:00
unknown
f0d4e0bf5a Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-10-25 12:41:42 +02:00
unknown
a48d710100 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


sql/handler.cc:
  Auto merged
2006-10-25 12:21:45 +02:00
unknown
08ce5b3dbd Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings 2006-10-25 11:44:40 +02:00
unknown
c04e47276a Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2006-10-25 08:28:30 +02:00
unknown
043d6d107b fix ndb_cache_multi2
util thread wasn't behaving correctly after 241 error due to get_table_statistics
not properly returning an error code


sql/ha_ndbcluster.cc:
  correctly call ndb_get_table_statistics in get_commitcount (don't report error)
  
  but also return an error code from get_table_statistics so that util thread
  gets error code
2006-10-24 23:26:58 +10:00
unknown
2ebf26775f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2006-10-24 08:29:37 +02:00
unknown
c56a907b32 post merge fix 2006-10-24 00:18:57 +10:00
unknown
399cd9f716 Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2-merge2
into  willster.(none):/home/stewart/Documents/MySQL/5.0/ndb


sql/sql_select.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  merge
sql/ha_ndbcluster.h:
  merge
2006-10-23 23:57:28 +10:00
unknown
8335ed7316 Bug #19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
fixes for ndb_* tests broken by previous fix

be more careful in ndb about setting errors on failure of info call (especially
in open) 


sql/ha_ndbcluster.cc:
  fix some ndb* tests failing due to fix for 19914
  
  be more careful about setting errors on failure of info call
sql/ha_ndbcluster.h:
  fix some ndb* tests failing due to fix for 19914
  
  be more careful about setting errors on failure of info call
2006-10-23 23:46:35 +10:00
unknown
50fe8e0c2b Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
into  willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2-merge2


sql/sql_select.cc:
  Auto merged
2006-10-23 23:43:48 +10:00
unknown
8cc480915f Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/myisam.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-10-20 11:02:56 +02:00
unknown
7753c52a92 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-10-19 15:08:10 +02:00
unknown
5e1fe0f800 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/olap.result:
  SCCS merged
2006-10-19 15:04:12 +02:00
unknown
822049b9e1 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


sql/handler.cc:
  Auto merged
2006-10-19 15:00:46 +02:00
unknown
59c4b5ba20 Bug #21072 Duplicate key error in NDB references wrong key: use MAX_KEY to signal unknown key: Added string initialization 2006-10-19 14:57:04 +02:00
unknown
d30186772f Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-10-19 14:37:49 +02:00
unknown
9bfaab57fa Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt


sql/sql_select.cc:
  Auto merged
2006-10-19 14:34:56 +02:00
unknown
862d8bab98 Bug#21476 - Lost Database Connection During Query
Backport from 5.1.
Raised STACK_MIN_SIZE for Debian GNU/Linux Sid,
Linux kernel 2.6.16,
gcc version 3.3.6 (Debian 1:3.3.6-13),
libc6-dbg 2.3.6.ds1-4,
Pentium4 (x86),
BUILD/compile-pentium-debug-max
Raised about 100 Bytes above the required minimum.
2006-10-19 13:42:26 +02:00
unknown
554aaed352 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-merge


sql/sql_select.cc:
  Auto merged
2006-10-19 09:59:01 +02:00
unknown
6134c07258 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-10-19 09:38:37 +02:00
unknown
d262020f44 ndb - bug#23200
this changes lock taken during peek, to decrease likelyhood of transaction abort
  


sql/ha_ndbcluster.cc:
  use exclusive lock in peek, as peek is used just before insert/update
2006-10-19 09:27:58 +02:00
unknown
e11b8e929a Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2006-10-18 16:41:17 +02:00
unknown
55ae6636bd Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2006-10-18 14:28:18 +02:00
unknown
b18b419b5a Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sunlight.local:/local_work/14959-bug-5.0-opt-mysql
2006-10-18 00:15:14 +04:00
unknown
3dccef3c30 sql_rename.cc:
Cleanup of fix for bug#14959.


sql/sql_rename.cc:
  Cleanup of fix for bug#14959.
2006-10-18 00:14:14 +04:00
unknown
e2698fa753 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-10-17 12:25:53 -07:00
unknown
711021a464 Merge rurik.mysql.com:/home/igor/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug19579


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
2006-10-17 10:07:29 -07:00
unknown
71b67e4a53 rename of the new members introduced in the fix for bug 21798 2006-10-17 19:22:13 +03:00
unknown
c208f46b66 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21798-5.0-opt-merge


sql/mysql_priv.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge fixes for bug 21798
mysql-test/t/subselect.test:
  merge fixes for bug 21798
2006-10-17 16:36:44 +03:00
unknown
841ea461ce Bug#21798: memory leak during query execution with subquery in column
list using a function
When executing dependent subqueries they are re-inited and re-exec() for 
each row of the outer context.
The cause for the bug is that during subquery reinitialization/re-execution,
the optimizer reallocates JOIN::join_tab, JOIN::table in make_simple_join()
and the local variable in 'sortorder' in create_sort_index(), which is
allocated by make_unireg_sortorder().
Care must be taken not to allocate anything into the thread's memory pool
while re-initializing query plan structures between subquery re-executions.
All such items mush be cached and reused because the thread's memory pool
is freed at the end of the whole query.
Note that they must be cached and reused even for queries that are not 
otherwise cacheable because otherwise it will grow the thread's memory 
pool every time a cacheable query is re-executed. 
We provide additional members to the JOIN structure to store references 
to the items that need to be cached.


mysql-test/r/subselect.result:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - test case
mysql-test/t/subselect.test:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - test case
sql/mysql_priv.h:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the entities allocated in the threads memory pool by
     JOIN::exec ().
sql/sql_delete.cc:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's 
     memory pool by JOIN::exec ().
sql/sql_select.cc:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's 
     memory pool by JOIN::exec ().
sql/sql_select.h:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's 
     memory pool by JOIN::exec ().
sql/sql_table.cc:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's 
     memory pool by JOIN::exec ().
sql/sql_update.cc:
  Bug#21798: memory leak during query execution with subquery in column
              list using a function
   - cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's 
     memory pool by JOIN::exec ().
2006-10-17 16:20:26 +03:00
unknown
6101fd25d0 Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.



mysql-test/r/select.result:
  Added a test case for bug #19579.
mysql-test/t/select.test:
  Added a test case for bug #19579.
sql/item_cmpfunc.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_base.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.h:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_select.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Now info of such potentially saragable predicates is saved in
  an array and after reading const tables we check whether this
  predicates has become saragable.
2006-10-16 14:25:28 -07:00
unknown
6caacb9bbd Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B22342-5.0-opt


sql/opt_range.cc:
  Auto merged
2006-10-16 19:46:02 +03:00
unknown
decf9082fb Bug #22342: No results returned for query using max and group by
When using index for group by and range access the server isolates    
 a set of ranges based on the conditions over the key parts of the
 index used. Then it uses only the ranges over the GROUP BY fields to
 jump from one group to another. Since the GROUP BY fields may form a
 prefix over the index, we may use only a prefix of the ranges produced
 by the range optimizer.
 Each range contains a notion on whether it includes its border values.
 The problem is that when using a range prefix, the last range is open
 because it assumes that there is a range on the next keypart. Thus when
 we use a prefix range as it is, it excludes all border values.
 The solution is when ignoring the suffix of the range conditions 
 (to jump over the GROUP BY prefix only) the server must change the 
 remaining intervals so they always contain their borders, e.g. 
 if the whole range was :
 (1,-inf) <= (<group_by_col>,<min_max_arg_col>) < (1, 3) we must make
 (1) <= (<group_by_col>) <= (1) because (a,b) < (c1,c2) means :
 a < c1 OR (a = c1 AND b < c2).


mysql-test/r/group_min_max.result:
  Bug #22342: No results returned for query using max and group by
   - test case
mysql-test/t/group_min_max.test:
  Bug #22342: No results returned for query using max and group by
   - test case
sql/opt_range.cc:
  Bug #22342: No results returned for query using max and group by
   - open the intervals for prefix select when there are more conditions
     than used for the prefix search.
sql/opt_range.h:
  Bug #22342: No results returned for query using max and group by
   - open the intervals for prefix select when there are more conditions
     than used for the prefix search.
2006-10-16 19:30:19 +03:00
unknown
7fdcb25574 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-bug12240


sql/sql_select.cc:
  Auto merged
2006-10-16 17:12:57 +02:00
unknown
40197cd33f Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B14019-5.0-opt
2006-10-16 16:28:13 +03:00
unknown
53924bdc77 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B14019-4.1-opt
2006-10-16 14:42:51 +03:00
unknown
2e9103b844 Merge chilla.local:/home/mydev/mysql-4.1-bug12240
into  chilla.local:/home/mydev/mysql-5.0-bug12240


sql/sql_select.cc:
  Bug#12240 - Rows Examined in Slow Log showing incorrect number?
  Manual merge from 4.1.
2006-10-16 13:15:15 +02:00
unknown
fe4a68fb3c Merge macbook.gmz:/Users/kgeorge/mysql/work/B14019-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B14019-5.0-opt


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/sql_base.cc:
  Auto merged
mysql-test/r/group_by.result:
  merge 4.1->5.0
mysql-test/t/group_by.test:
  merge 4.1->5.0
2006-10-16 13:24:54 +03:00
unknown
750a2a0b86 BUG#14019 : group by converts literal string to column name
When resolving unqualified name references MySQL was not
   checking what is the item type for the reference. Thus
   e.g a string literal item that has by convention a name
   equal to its string value will also work as a reference to 
   a SELECT list item or a table field.
   Fixed by allowing only Item_ref or Item_field to referenced by
   (unqualified) name.


mysql-test/r/func_gconcat.result:
  Bug #14019: group by converts literal string to column name
   - removed undeterministic testcase : order by a constant 
     means no order.
mysql-test/r/group_by.result:
  Bug #14019: group by converts literal string to column name
   - test case
mysql-test/t/func_gconcat.test:
  Bug #14019: group by converts literal string to column name
   - removed undeterministic testcase : order by a constant 
     means no order.
mysql-test/t/group_by.test:
  Bug #14019: group by converts literal string to column name
   - test case
sql/sql_base.cc:
  Bug #14019: group by converts literal string to column name
   - resolve unqualified by name refs only for real references
2006-10-16 13:10:25 +03:00
unknown
8a88e57c28 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


mysql-test/r/ndb_charset.result:
  Auto merged
mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/r/ndb_update.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Merg
sql/handler.cc:
  Merge
2006-10-16 10:07:19 +02:00
unknown
46152464aa BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
update federated for fix


sql/ha_federated.cc:
  update federated for ::info returning int
sql/ha_federated.h:
  update federated for ::info returning int
2006-10-16 17:41:29 +10:00
unknown
62689e18e7 Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
into  willster.(none):/home/stewart/Documents/MySQL/5.0/bug19914-mk2-merge


sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_archive.h:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_blackhole.h:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_myisammrg.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_example.h:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/examples/ha_tina.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  merge
sql/ha_ndbcluster.h:
  merge
sql/handler.h:
  merge
sql/sql_select.cc:
  merge
2006-10-16 17:39:38 +10:00
unknown
0079ce3b2c Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
2006-10-16 08:33:22 +02:00
unknown
67770b7671 Bug#14959: ALTER TABLE isn't able to rename a view
The mysql_alter_table() was able to rename only a table.

The view/table renaming code is moved from the function rename_tables 
to the new function called do_rename().
The mysql_alter_table() function calls it when it needs to rename a view.


mysql-test/t/rename.test:
  Added a test case for bug#14959: ALTER TABLE isn't able to rename a view
mysql-test/r/rename.result:
  Added a test case for bug#14959: ALTER TABLE isn't able to rename a view
sql/mysql_priv.h:
  Bug#14959: ALTER TABLE isn't able to rename a view
  Added the prototype of the do_rename() function.
sql/sql_rename.cc:
  Bug#14959: ALTER TABLE isn't able to rename a view
  The view/table renaming code is moved from the function rename_tables
  to the new function called do_rename().
sql/sql_table.cc:
  Bug#14959: ALTER TABLE isn't able to rename a view
  Added handling of a view rename to the mysql_alter_table() function.
2006-10-13 21:59:52 +04:00
unknown
bac62fa32e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/mysql-5.0.mrg


include/m_ctype.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/type_enum.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
strings/ctype-mb.c:
  SCCS merged
strings/ctype-utf8.c:
  SCCS merged
2006-10-12 13:50:22 +05:00