Make sure postExecute is not run for blobs if AO_IgnoreError
ndb/src/ndbapi/NdbConnection.cpp:
If AO_IgnoreError, error codes arent always set on individual operations, making postExecute impossible
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
Repair table could crash a server if there is not sufficient
memory (myisam_sort_buffer_size) to operate. Affects not only
repair, but also all statements that use create index by sort:
repair by sort, parallel repair, bulk insert.
Return an error if there is not sufficient memory to store at
least one key per BUFFPEK.
Also fixed memory leak if thr_find_all_keys returns an error.
myisam/sort.c:
maxbuffer is number of BUFFPEK-s for repair. It is calculated
as records / keys. keys is number of keys that can be stored
in memory (myisam_sort_buffer_size). There must be sufficient
memory to store both BUFFPEK-s and keys. It was checked
correctly before this patch. However there is another
requirement that wasn't checked: there must be sufficient
memory for at least one key per BUFFPEK, otherwise repair
by sort/parallel repair cannot operate.
Return an error if there is not sufficient memory to store at
least one key per BUFFPEK.
Also fixed memory leak if thr_find_all_keys returns an error.
mysql-test/r/repair.result:
A test case for BUG#23175.
mysql-test/t/repair.test:
A test case for BUG#23175.
update partition engine for handler::info returning int
sql/ha_partition.cc:
update for handler::info returning int.
sql/ha_partition.h:
update for handler::info returning int.
Problem is that some files moved to storage/*/ still are dependent
on sql/ code (usually use members of THD structure)
that can get different being compiled with another #define-s
Code added to recompile these for the embedded server
config/ac-macros/plugins.m4:
macros added to check if the storage has sql/ - dependent code
libmysqld/Makefile.am:
symlink files from storage/*/ needed to be recompiled
with EMBEDDED_LIBRARY
storage/federated/plug.in:
ha_federated.cc uses THD structure
storage/heap/plug.in:
ha_heap.cc uses THD structure
storage/innobase/plug.in:
ha_innodb.cc uses THD structure
storage/myisam/plug.in:
ha_myisam.cc uses THD structure
storage/myisammrg/plug.in:
ha_myisammrg.cc uses THD structure
into willster.(none):/home/stewart/Documents/MySQL/5.1/bug19914-mk2-merge
BitKeeper/deleted/.del-ha_berkeley.cc:
Auto merged
BitKeeper/deleted/.del-ha_berkeley.h:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/blackhole/ha_blackhole.cc:
Auto merged
storage/blackhole/ha_blackhole.h:
Auto merged
storage/csv/ha_tina.cc:
Auto merged
storage/csv/ha_tina.h:
Auto merged
storage/example/ha_example.cc:
Auto merged
storage/example/ha_example.h:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/federated/ha_federated.h:
Auto merged
storage/heap/ha_heap.cc:
Auto merged
storage/heap/ha_heap.h:
Auto merged
storage/myisam/ha_myisam.h:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
Auto merged
storage/ndb/include/ndb_version.h.in:
Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmclient/main.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
storage/ndb/tools/ndb_condig.cpp:
Auto merged
storage/ndb/tools/restore/restore_main.cpp:
Auto merged
sql/ha_ndbcluster.cc:
merge
sql/ha_ndbcluster.h:
merge
sql/handler.h:
merge
sql/sql_delete.cc:
merge
storage/archive/ha_archive.h:
merge
storage/innobase/handler/ha_innodb.cc:
merge
storage/innobase/handler/ha_innodb.h:
merge
storage/myisam/ha_myisam.cc:
merge
storage/myisammrg/ha_myisammrg.h:
merge
Early abort, failing to allocate buffers, would go down the abort track and
end up trying to sendDropTriggers (as the standard stop backup does).
However, it is possible to not have any tables yet defined in the backup
(due to allocating buffers is before this). Simple check in sendDropTrig
(and continue to next step). Files may be open, so we continue to close them.
Also updated ERROR_Codes (and added one to test this bug).
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
update BACKUP error insert codes to reflect current reality.
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
Allow for early abort when no tables have been included in backup.
Allow for abort when file records have been seized but not yet allocated
to specific uses (is the case when buffer allocation fails)
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
initialize BackupRecord file Ptrs
storage/ndb/test/src/NdbBackup.cpp:
Add extra failure codes for buffer allocation failure in backup
Fix uninit variable, causing problems with auto-increment on rhas3-x86 (only found on this platform, really weird)
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Fix uninit variable, causing problems with auto-increment on rhas3-x86 (only found on this platform, really weird)
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
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
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 ().
Update make_binary_distribution.sh
Make sure all files needed for testing are included
scripts/make_binary_distribution.sh:
Make sure all files needed for testing are included
into macbook.gmz:/Users/kgeorge/mysql/work/B22367-5.0-opt-merge
include/my_base.h:
Auto merged
mysql-test/r/select.result:
merge of 5.0-opt to 22367
mysql-test/t/select.test:
merge of 5.0-opt to 22367
into willster.(none):/home/stewart/Documents/MySQL/5.1/ndb-is_files_refactor
sql/ha_ndbcluster.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_show.cc:
Auto merged
found with gcc 4.0.2 on Itanium2
(ndb_dd_* failures)
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
Fix some potentil alias problems
storage/ndb/src/kernel/vm/Pool.hpp:
Fix potential alias problem
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.
into dator5.(none):/home/pappa/bug18198
mysql-test/r/partition.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/item_func.h:
Auto merged
sql/partition_info.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_partition.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/item_cmpfunc.h:
e
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.
strings
MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference
text or varchar columns with collation different than binary.
This was done to handle correctly the situation where a lookup on such a key
may return more than 1 row because of the presence of many rows that differ
only by the amount of trailing space in the table's string column.
Inserting such values however appears to violate the unique checks on
INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer
from choosing a faster access method.
This fix removes the setting of the HA_END_SPACE_KEYS flag.
include/my_base.h:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- disabled HA_END_SPACE_KEY as it's no longer needed
mysql-test/r/func_str.result:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- fixed explain in an existing case
mysql-test/r/merge.result:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- fixed explain in an existing case
mysql-test/r/select.result:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- test case
mysql-test/r/subselect.result:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- fixed explain in an existing case
mysql-test/t/select.test:
Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
- test case
mysql-test/r/ndb_basic.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/r/ndb_blob.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/r/ndb_charset.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/r/ndb_condition_pushdown.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/r/ndb_dd_sql_features.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/r/ndb_subquery.result:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_basic.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_blob.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_charset.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_condition_pushdown.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_dd_sql_features.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count
mysql-test/t/ndb_subquery.test:
replace explain 'rows' by '#' since it depends usually on non-deterministic index stats or non-exact row count