Commit graph

32850 commits

Author SHA1 Message Date
unknown
cfe2d1da88 Removed compiler warnings 2007-04-05 07:28:09 +02:00
unknown
4c0f3c50f8 Fixed compilation error on Windows 2007-04-05 06:49:43 +02:00
unknown
2efc0f51cf Bug #26242 UPDATE with subquery and triggers failing with cluster tables
In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced
subject table didn't see the results of operation which caused invocation
of those triggers. In other words AFTER trigger invoked as result of update
(or deletion) of particular row saw version of this row before update (or
deletion).

The problem occured because NDB handler in those cases postponed actual
update/delete operations to be able to perform them later as one batch.

This fix solves the problem by disabling this optimization for particular
operation if subject table has AFTER trigger for this operation defined.
To achieve this we introduce two new flags for handler::extra() method:
HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH.
These are called if there exists AFTER DELETE/UPDATE triggers during a
statement that potentially can generate calls to delete_row()/update_row().
This includes multi_delete/multi_update statements as well as insert statements
that do delete/update as part of an ON DUPLICATE statement.


include/my_base.h:
  Added HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible.
mysql-test/r/ndb_trigger.result:
  Bug #26242  UPDATE with subquery and triggers failing with cluster tables
  ---
  Added new test cases
mysql-test/t/ndb_trigger.test:
  Bug #26242  UPDATE with subquery and triggers failing with cluster tables
  ---
  Added new test cases
sql/ha_ndbcluster.cc:
  Bug #26242  UPDATE with subquery and triggers failing with cluster tables: Use HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible
sql/ha_ndbcluster.h:
  Bug #26242  UPDATE with subquery and triggers failing with cluster tables: Added member variables for handling of HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible
sql/mysql_priv.h:
  Added new method prepare_triggers_for_insert_stmt to check if batching of delete/update must be disallowed.
sql/sql_delete.cc:
  Use HA_EXTRA_DELETE_CANNOT_BATCH to inform handler when batching of delete is not possible
sql/sql_insert.cc:
  Added method prepare_triggers_for_insert_stmt to check if batching of delete/update must be dissallowed.
  Use HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler
   when batching of delete/update is not possible
sql/sql_load.cc:
  Call prepare_triggers_for_insert_stmt to check if batching of delete/update must be dissallowed and
  mark fields used by triggers for the insert statement.
sql/sql_trigger.h:
  Added has_triggers to support what particular triggers exist on a table.
sql/sql_update.cc:
  Use HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of update is not possible
2007-04-04 12:50:39 +02:00
unknown
ef60c96f8b bug #26225 Engine condition pushdown doesn't work with prepare statements (ps_7ndb): ensure that query plan for prepared statement is analyzed correctly 2007-02-09 16:31:12 +01:00
unknown
c8f470eaa6 NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc:
bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
ha_ndbcluster.h:
  Removed stray mthod declaration


sql/ha_ndbcluster.h:
  Removed stray mthod declaration
ndb/include/ndbapi/NdbScanOperation.hpp:
  bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
ndb/src/ndbapi/NdbScanOperation.cpp:
  bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
sql/ha_ndbcluster.cc:
  bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
2007-02-07 11:36:34 +01:00
unknown
f3463a8c82 bug#25821 Excessive partition pruning for multi-range index scan in NDB API: post-review fix, added default value 2007-02-07 09:19:33 +01:00
unknown
ba8a684dcb Fix for bug#25821 Excessive partition pruning for multi-range index scan in NDB API: don't set distribution key if multi_range 2007-02-06 23:06:58 +01:00
unknown
c9950f2694 Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: moved back assignment 2007-02-01 09:48:45 +01:00
unknown
c7a69d255d Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: in start_stmt, only change query_state if starting a new transactions, in read_multi_range_next, change query state when end is reached 2007-01-31 22:38:06 +01:00
unknown
817ed4029e bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index: Changed test since error mesage wasn't predictable 2007-01-08 13:53:37 +01:00
unknown
672998ea5f bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index: Added error checking 2007-01-08 10:38:53 +01:00
unknown
6385ab6851 ndb_use_transactions is set from value for command line flag 2007-01-03 14:56:26 +01:00
unknown
905b64160b Added --ndb-use-transactions 2007-01-02 15:47:58 +01:00
unknown
386b381788 bug#19956 Problems with VARCHAR primary key and BLOB fields:added test case 2006-12-15 09:03:21 +01:00
unknown
14f7ff0025 Removed check for impossible error return 2006-12-14 16:27:14 +01:00
unknown
d8ff6cdfc8 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/t/ndb_index_unique.test:
  Auto merged
2006-12-07 15:51:16 +01:00
unknown
6e47c11c7a Bug#24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld: Added test case 2006-12-07 15:49:59 +01:00
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
15155fff77 bug#24303 Wrong result for UPDATE IGNORE for NDB table: Added test case 2006-11-29 11:53:43 +01:00
unknown
01e550d05b Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-11-13 12:58:26 +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
f62a53f2f8 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-11-06 14:54:03 +01:00
unknown
1ef8fe5a16 ndb - bug#24011
ndb/src/common/util/socket_io.cpp:
  Fix problem with cut sockmessages
2006-11-06 14:50:45 +01:00
unknown
0c9fc6ba40 ndb - revert bug to wait for "proper" bug fix
bug#21052


ndb/src/mgmsrv/Services.cpp:
  revert bug to wait for "proper" bug fix
2006-11-01 16:14:49 +01:00
unknown
f9ee7d047f Merge perch.ndb.mysql.com:/home/jonas/src/50-multi
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-10-31 16:15:15 +01:00
unknown
2ba485da08 ndb - ndb_multi spurious failure
remove timeing dependant part of test


mysql-test/r/ndb_multi.result:
  remove timeing dependant part of test
mysql-test/t/ndb_multi.test:
  remove timeing dependant part of test
2006-10-31 16:09:31 +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
16d6c0b236 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
2006-10-27 16:41:06 +02:00
unknown
ba583978ea Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work


ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
2006-10-27 16:34:22 +02:00
unknown
11ac490779 ndb - valgrind
Still leakage, make sure all unlinked operations are put back so they will be release
  (on failing blob operations, when AO_IgnoreError)


ndb/src/ndbapi/NdbConnection.cpp:
  Still leakage, make sure all unlinked operations are put back so they will be release
2006-10-27 16:32:59 +02:00
unknown
01ddbfa657 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  orca.ndb.mysql.com:/export/home/space/pekka/ndb/version/my50-ndb
2006-10-25 21:03:01 +02:00
unknown
1104ff49c9 ndb - dbtux: remove redundant code line (no functional change)
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  remove redundant unpackBound call, missed in previous patch
2006-10-25 17:30:30 +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
7f4b0c6a50 Merge ymer.(none):/usr/local/mysql/mysql-4.1-ndb.tmp
into  ymer.(none):/usr/local/mysql/mysql-5.0-ndb


ndb/src/common/util/SimpleProperties.cpp:
  Auto merged
2006-10-25 10:45:11 +02:00
unknown
c6ca641a6b Fix two small problems in the source, potentially causing user-visible
bugs.


ndb/include/util/UtilBuffer.hpp:
  Fix accessing memory after free(), if called with source and destination
  pointer the same (which should not really happen...).
  Fixes a problem in ndb_restore.
ndb/src/common/util/SimpleProperties.cpp:
  Fix typo in check of maxValue.
2006-10-25 10:37:53 +02:00
unknown
e2ea6f70b3 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
2006-10-25 08:31:30 +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
4075cd8991 Merge orca.ndb.mysql.com:/export/home/space/pekka/ndb/version/my50-ndb
into  orca.ndb.mysql.com:/export/home/space/pekka/ndb/version/my50-tux
2006-10-24 20:52:09 +02:00
unknown
5a20c5fd48 fix result file for ndb_multi
mysql-test/r/ndb_multi.result:
  update result file for new behaviour of correcting the 241 error on ha_open
mysql-test/t/ndb_multi.test:
  no longer errors on ha_open with 241
2006-10-25 00:41:55 +10: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
69c7200219 Bump version number to 5.0.29, as 28 will be based directly on 27. 2006-10-24 10:57:17 +02: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