Fix replication for multi-update
new test - rpl_multi_update2
sql/mysql_priv.h:
Bug#7011
New function mysql_multi_update_lock()
sql/sql_parse.cc:
Bug#7011
New function check_multi_update_lock()
For multi-update on slave, perform an early open&lock
sql/sql_update.cc:
Bug#7011
Split out multi-update locking into its own function,
mysql_multi_update_lock()
sql/examples/ha_archive.cc:
More comments, fixed issue with lost file descriptors.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
into mysql.com:/home/dlenev/src/mysql-4.1-tzbug
sql/item_timefunc.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/tztime.cc:
Auto merged
mysql-test/r/ndb_index_ordered.result:
make YEAR and TIMESTAMP into ndb types
mysql-test/t/ndb_index_ordered.test:
make YEAR and TIMESTAMP into ndb types
ndb/include/kernel/signaldata/DictTabInfo.hpp:
make YEAR and TIMESTAMP into ndb types
ndb/include/ndbapi/NdbDictionary.hpp:
make YEAR and TIMESTAMP into ndb types
ndb/include/util/NdbSqlUtil.hpp:
make YEAR and TIMESTAMP into ndb types
ndb/src/common/util/NdbSqlUtil.cpp:
make YEAR and TIMESTAMP into ndb types
ndb/src/ndbapi/NdbDictionary.cpp:
make YEAR and TIMESTAMP into ndb types
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
make YEAR and TIMESTAMP into ndb types
ndb/src/ndbapi/NdbRecAttr.cpp:
make YEAR and TIMESTAMP into ndb types
ndb/test/include/NdbSchemaOp.hpp:
make YEAR and TIMESTAMP into ndb types
sql/ha_ndbcluster.cc:
make YEAR and TIMESTAMP into ndb types
does not work well together". Now using simplier and more correct
implementation of st_lex::unlink_first_table()/link_first_table_back()
(It also nicely handles case when global table list is created because
of implictly used time zone tables). (2nd attempt)
Fix for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
column". Implemented new approach for caching objects for constant
time zone arguments. Now instead of determining whenever these arguments
are constants and performing time zone lookup at fix_fields() stage, we
do it on first get_date() invocation.
Cleanup of global @@time_zone variable handling.
mysql-test/r/timezone2.result:
Added test for bugs #7705 "CONVERT_TZ() crashes with subquery/WHERE on
index column" and #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ()
function does not work well together".
mysql-test/t/timezone2.test:
Added test for bugs #7705 "CONVERT_TZ() crashes with subquery/WHERE on
index column" and #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ()
function does not work well together".
sql/item_timefunc.cc:
Item_func_convert_tz():
New approach for caching objects for constant time zone arguments.
Now instead of determining whenever these arguments are constants
and performing time zone lookup at fix_fields() stage, we do it
on first get_date() invocation. This works better in cases when
const_item() for these arguments returns true only on get_date()
stage but not on fix_fields() stage (e.g. this happens in quries
with joins or derived tables).
sql/item_timefunc.h:
Item_func_convert_tz():
Added from_tz_cached/to_tz_cached members indicating whenever we
already have Time_zone object representing one of constant time zone
arguments.
sql/set_var.cc:
Cleaned up global @@time_zone variable handling. Now we use proper
locking when we are setting or reading its value.
sql/set_var.h:
Removed declaration of sys_var_thd_time_zone::get_tz_ptr() method, which
no longer used.
sql/sql_lex.cc:
st_lex::unlink_first_table(), st_lex::link_first_table_back():
Simplify implementation according to Monty's suggestion.
Instead doing something special if global and local table lists
are the same, we simply save/restore pointers to first elements
of both global and local lists (which works even when this lists
are the same!). This handles nicely the case when we have separate
global table list becuase time zone tables are implicitly used.
sql/tztime.cc:
Backport of Monty's fixes from 5.0, which give us nicer error messages
if we haven't found time zone with such name or its description.
Moved initialization code into a new init function.
Added a new cleanup function.
Added a call to close the meta file.
mysql-test/t/archive.test:
Test Bug: Memory leaks in the archive handler.
Fixed a typo.
sql/examples/ha_archive.h:
Test Bug: Memory leaks in the archive handler.
Added declarations for the new init/cleanup functions.
sql/handler.cc:
Test Bug: Memory leaks in the archive handler.
Added calls of the new init/cleanup functions.
mysql-test/r/subselect.result:
cleaning up of results of subselects test
mysql-test/t/subselect.test:
cleaning up of results of subselects test
sql/item_subselect.cc:
call result object cleupup on engine cleunup
sql/sql_class.cc:
added cleanup of select_max_min_finder_subselect
sql/sql_class.h:
added cleanup of select_max_min_finder_subselect
Added a test case for bug #7672.
sql_yacc.yy:
Fixed bug #7672.
Made queries of the form (SELECT ...) ORDER BY ... to
be equivalent to SELECT ... ORDER BY ...
sql/sql_yacc.yy:
Fixed bug #7672.
Made queries of the form (SELECT ...) ORDER BY ... to
be equivalent to SELECT ... ORDER BY ...
mysql-test/t/order_by.test:
Added a test case for bug #7672.
mysql-test/r/order_by.result:
Added a test case for bug #7672.
always initialized. (Bug #5569)
vio/viosocket.c:
Remove comment that is no longer correct
sql/sql_parse.cc:
Always call vio_in_addr() on successful connection,
so that thd->remote always gets set
vio/viossl.c:
Remove comment that is no longer correct
BitKeeper/etc/ignore:
added libmysqld/examples/mysqltest_embedded
client/mysqlbinlog.cc:
Call mysql_close() before die()
innobase/include/eval0eval.ic:
Remove assert that fails on 64 bit machines
(Tested with BUILD/compile-pentium64-valgrind-max on 64 bit Intel CPU)
sql/mysqld.cc:
Force lower_case_table_names to 0 if set to 2 on case insensitive file name
sql/sql_select.cc:
Remove #if 0
lower_case_tables_names=2 is sensible. Related to Bug #7887.
sql/mysqld.cc:
Set lower_case_file_system when it is being tested to check
if lower_case_tables_names=2 is sensible.
mysql-test/r/subselect.result:
Forward reference detection
mysql-test/t/subselect.test:
Forward reference detection
sql/item.cc:
now forward reference is detected via ref_pointer_array, because some literal constants are 'fixed' just after creation
sql/sql_base.cc:
fill ref_pointer_array with zerows for forward reference detection.
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
mysys/mf_keycache.c:
Auto merged
sql/item.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/subselect.result:
Comparison subquery and row with nested rows
mysql-test/t/subselect.test:
Comparison subquery and row with nested rows
sql/item_subselect.cc:
check that row elements have the same dimention that SELECT list elements
fixed cols() method call (it have to be called only after fix_fields())
mysql-test/r/subselect.result:
Comparison subquery with * and row
mysql-test/t/subselect.test:
Comparison subquery with * and row
sql/item_cmpfunc.h:
initialization allowed_arg_cols for autodetection
sql/item_func.cc:
support of allowed_arg_cols autodetection by first argument
sql/item_func.h:
commant
sql/item_subselect.cc:
correct column number fetching for subqueries
sql/sql_lex.h:
method to check that UNION is prepared
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
mysql-test/r/select_found.result:
Auto merged
mysql-test/t/select_found.test:
Auto merged
sql/sql_select.cc:
Auto merged
Added a test case for bug #7945.
sql_select.cc:
Fixed bug #7945. If DISTINCT is used only with constants
in a query with GROUP BY, we can apply an optimization
that set LIMIT to 1 only in the case when there is
no SQL_CALC_FOUND_ROWS.
sql/sql_select.cc:
Fixed bug #7945. If DISTINCT is used only with constants
in a query with GROUP BY, we can apply an optimization
that set LIMIT to 1 only in the case when there is
no SQL_CALC_FOUND_ROWS.
mysql-test/t/select_found.test:
Added a test case for bug #7945.
mysql-test/r/select_found.result:
Added a test case for bug #7945.
mysql-test/r/derived.result:
DISTINCT over grouped select on subquery in the FROM clause
mysql-test/t/derived.test:
DISTINCT over grouped select on subquery in the FROM clause
sql/sql_select.cc:
used current join copy for test
Bug#7834 Illegal mix of collations in IN operator
IN was the first function supporting
character set convertion.
agg_arg_charsets() was written afterwards,
which is more flexible.
Now IN just reuses this function.
sql/item_cmpfunc.cc:
Bug#7834 Illegal mix of collations in IN operator
IN was the first function supporting
character set convertion.
agg_arg_charsets() was written afterwards,
which is more flexible.
Now IN just reuses this function.
on a case-sensitive filesystem. (Bug #7887)
sql/mysqld.cc:
Add warning when running with lower_case_table_names=2 and datadir is
on a case-sensitive filesystem.
Version for 4.1. Committed for merge.
If the result table is one of the select tables in INSERT SELECT,
we must not disable the result tables indexes before selecting.
mysql_execute_command() detects the match for other reasons and
adds the flag OPTION_BUFFER_RESULT to the 'select_options'.
In this case the result is put into a temporary table first.
Hence, we can defer the preparation of the insert
table until the result is to be used.
mysql-test/r/insert_select.result:
BUG#6034 - Error code 124: Wrong medium type.
The test results.
mysql-test/t/insert_select.test:
BUG#6034 - Error code 124: Wrong medium type.
The test case.
sql/sql_select.cc:
BUG#6034 - Error code 124: Wrong medium type.
With OPTION_BUFFER_RESULT in the 'select_options',
defer the preparation of the insert table until the
result is to be used.
Version for 4.0. Committed for merge.
If the result table is one of the select tables in INSERT SELECT,
we must not disable the result tables indexes before selecting.
mysql_execute_command() detects the match for other reasons and
adds the flag OPTION_BUFFER_RESULT to the 'select_options'.
In this case the result is put into a temporary table first.
Hence, we can defer the preparation of the insert
table until the result is to be used.
mysql-test/r/insert_select.result:
BUG#6034 - Error code 124: Wrong medium type.
The test results.
mysql-test/t/insert_select.test:
BUG#6034 - Error code 124: Wrong medium type.
The test case.
sql/sql_select.cc:
BUG#6034 - Error code 124: Wrong medium type.
With OPTION_BUFFER_RESULT in the 'select_options',
defer the preparation of the insert table until the
result is to be used. Unfortunately, this happens
at several places.
This patch collects all previous patches into one.
The main problem was due to that there is are two variables -
dflt_key_cache and sql_key_cache with have more or less duplicate
function. The reson for the bug was that the default value in the key
cache hash was set to dflt_key_cache, then sql_key_cache was set to a
new key cache object, and then dflt_key_cache was set to sql_key_cache
which was different from the dflt_key_cache_var. After sending SIGHUP,
the server was using the original default value for the key cache hash,
which was different from the actual key cache object used for the
default key cache.
include/keycache.h:
Import patch 4285.diff
mysys/mf_keycache.c:
Import patch 4285.diff
sql/mysql_priv.h:
Import patch 4285.diff
sql/mysqld.cc:
Import patch 4285.diff
sql/set_var.cc:
Import patch 4285.diff
sql/sql_parse.cc:
Import patch 4285.diff
sql/sql_show.cc:
Import patch 4285.diff
when using shm transporter, set sigmask on each thread using pthread_sigmask
configure.in:
Add more functions needed for SHM
ndb/src/common/portlib/NdbThread.c:
1) Create thread wrapper function
2) block SIGUSR1 #ifdef NDB_SHM_TRANSPORTER
ndb/src/common/transporter/TransporterRegistry.cpp:
(un)block SIGUSR1 #ifdef NDB_SHM_TRANSPORTER
sql/ha_ndbcluster.cc:
cast pointer to UintPtr before printout
response. (Bug #6511)
sql/mysql_priv.h:
Add bit for storing client protocol info
sql/sql_cache.cc:
Record whether 4.1 or old protocol is used for query
mysql-test/r/union.result:
result for a test case for the wrong examined rows with UNION's
mysql-test/t/union.test:
test case for the wrong examined rows with UNION's
sql/sql_union.cc:
a patch for the wrong examined rows with UNION's
mysql-test/r/subselect.result:
Testcase for BUG#7885
mysql-test/t/subselect.test:
Testcase for BUG#7885
sql/item_subselect.cc:
Fix for BUG#7885: In Item_subselect::fix_fields, return error if engine->prepare fails.
Also removed redundant code line.
macros.
It does not fixes any bugs in 4.0. But it prevents from future error in
any bugfixes that may use these macros. Also after merging into 4.1 tree
this cleanup will fix bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix".
sql/field.h:
Since FIELDFLAG_INTERVAL, FIELDFLAG_BITFIELD, FIELDFLAG_BLOB and
FIELDFLAG_GEOM flags occupy the same space as number of decimals for
FIELDFLAG_NUMBER fields, it is safer to check in "f_is_geom()"-type
macros that we have non-number field, like we already do in f_is_blob()
macro.
not default_charset_into. It fixes the
problem that in some cases numbers where
treated as CHAR(N), not as BINARY(N), e.g.
wrong 'charsetnr' when sent to the client side.
2. IFNULL didn't aggregate argument charsets
and collations, so IFNULL(1,'a') produced
a CHAR(N). Now produces a BINARY(N).
3. SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
4. Tests were fixed accordingly. No new tests were
made, as the old onces cover everything.
mysql-test/r/analyse.result:
SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
mysql-test/r/case.result:
Test fix according to the changes
mysql-test/r/metadata.result:
Test fix according to the changes
mysql-test/r/ps_1general.result:
Test fix according to the changes
mysql-test/r/ps_2myisam.result:
Test fix according to the changes
mysql-test/r/ps_3innodb.result:
Test fix according to the changes
mysql-test/r/ps_4heap.result:
Test fix according to the changes
mysql-test/r/ps_5merge.result:
Test fix according to the changes
mysql-test/r/ps_6bdb.result:
Test fix according to the changes
mysql-test/r/ps_7ndb.result:
Test fix according to the changes
mysql-test/r/union.result:
Test fix according to the changes
sql/item.cc:
Item is now BINARY by default
sql/item_cmpfunc.cc:
IFNULL now collects arguments collations/charsets
like other functions do.
set to a negative value. (Bug #7700)
sql/field_conv.cc:
Don't treat real fields as identical when destination is unsigned and
the source is not.
mysql-test/t/type_float.test:
Add test for setting double unsigned to a negative value from a signed double
mysql-test/r/type_float.result:
Add test results
Working around hang of master < 3.23.50 on SELECT @@unknown_var
(to enable 3.23.49->4.1.10 replication)
sql/slave.cc:
Working around hang of master < 3.23.50 on SELECT @@unknown_var
(to enable 3.23.49->4.1.10 replication)
and the default character set is multi-byte, which will result in character
column size changes. (Bug #6913)
sql/table.cc:
Print a warning when an old table is opened and the
default character set is multi-byte that warns about
character column sizes possibly getting changed
sql_lex.cc:
Set query to not cacheable if we are using multistatements and there are multiple statements in this query
sql/sql_lex.cc:
Set query to not cacheable if we are using multistatements and there are multiple statements in this query
Added a test case for bug #7769.
item_sum.h:
Fixed bug #7769: a crash for queries with group_concat and
having when the query table was empty.
The bug was due an unsafe dereferencing.
sql/item_sum.h:
Fixed bug #7769: a crash for queries with group_concat and
having when the query table was empty.
The bug was due an unsafe dereferencing.
mysql-test/t/func_gconcat.test:
Added a test case for bug #7769.
mysql-test/r/func_gconcat.result:
Added a test case for bug #7769.
include/my_sys.h:
Added function to call if IO_CACHE is moved
mysys/mf_iocache.c:
Added function to call if IO_CACHE is moved
sql/filesort.cc:
Tell that io_cache is moved
The bug was that if you have two TL_WRITE_DELAYED at the same time,
mi_lock_databases() could be done in the wrong order and we could write the wrong header to the MyISAM index file.
sql/mysql_priv.h:
Fix bug in insert delayed with prepared statements
sql/sql_base.cc:
Fix bug in insert delayed with prepared statements
sql/sql_prepare.cc:
Fix bug in insert delayed with prepared statements
The bug was that if you have two TL_WRITE_DELAYED at the same time,
mi_lock_databases() could be done in the wrong order and we could write the wrong header to the MyISAM index file.
Merge from 4.0: Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
sql/ha_innodb.cc:
Merge from 4.0: Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
sql/ha_innodb.cc:
Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multi-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables
of log_10 array.
sql/field.cc:
Avoid pointless calculation for really short fields, and what could be
an attempt to access outside the bounds of the log_10 array.
absolute value of the float is less than 1, and also fix calculation of
length for negative values. (Bug #7774)
sql/field.cc:
Fix handling of negative values and fabs(values> < 1 in Field_str::store
mysql-test/r/type_float.result:
Add results
mysql-test/r/type_float.result.es:
Add results
mysql-test/t/type_float.test:
Add test for conversion of floats to character field
when printing SET @var in mysqlbinlog, backtick the collation (as BINARY is a reserved word)
mysql-test/r/ctype_ucs.result:
backticks added
mysql-test/r/user_var.result:
backticks added
mysql-test/t/user_var.test:
testing a variable with BINARY collation, which needs the backticks
sql/log_event.cc:
when printing SET @var in mysqlbinlog, backtick the collation (as BINARY is a reserved word)
case will be added to client_test in 4.1
sql/sql_parse.cc:
A fix for bug #6761: "mysql_list_fields() does not work": init
thd->query_length, which is used next line. Remove a stale comment.
open interface for setting the "delete-on-close" flag.
innobase/os/os0file.c:
Use system-supplied tmpfile() on Netware
sql/ha_innodb.cc:
Remove innobase_mysql_tmpfile() on Netware.
into hundin.mysql.fi:/home/marko/k/mysql-4.1
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
sql/ha_innodb.cc:
Auto merged
mysql-test/r/func_sapdb.result:
Added test for bug #7586 "TIMEDIFF for sec+microsec not working
properly". Corrected previously wrong results of couple other
statements.
mysql-test/t/func_sapdb.test:
Added test for bug #7586 "TIMEDIFF for sec+microsec not working
properly".
sql/item_timefunc.cc:
Item_func_timediff::val_str():
Use simplier and less error-prone implementation. Now we are counting
difference between time values in microseconds and convert it to time
value (instead of using seconds and taking difference in "second_part"s
into account).
mode".
Changed grammar rule for "type" token. Now we have one branch with
optional length specification for TIMESTAMP type instead of two separate
branches.
mysql-test/r/type_timestamp.result:
Added test case for bug #7418 "TIMESTAMP not always converted to DATETIME
in MAXDB mode".
mysql-test/t/type_timestamp.test:
Added test case for bug #7418 "TIMESTAMP not always converted to DATETIME
in MAXDB mode".
sql/sql_yacc.yy:
Changed rule for "type" token. Now we have one branch with optional
length specification for TIMESTAMP type instead of two separate branches.
This also gives us consistent behavior for TIMETSAMP in MAXDB mode.
mysql_admin_table() attempted to write to a vio which was 0. I could have fixed mysql_admin_table()
but fixing my_net_write() looked more future-proof.
sql/net_serv.cc:
If no VIO, no write.
mysql-test/r/ndb_index_ordered.result:
wl-1442 fix Time. adds new type id 25
mysql-test/t/ndb_index_ordered.test:
wl-1442 fix Time. adds new type id 25
ndb/include/kernel/signaldata/DictTabInfo.hpp:
wl-1442 fix Time. adds new type id 25
ndb/include/ndbapi/NdbDictionary.hpp:
wl-1442 fix Time. adds new type id 25
ndb/include/util/NdbSqlUtil.hpp:
wl-1442 fix Time. adds new type id 25
ndb/src/common/util/NdbSqlUtil.cpp:
wl-1442 fix Time. adds new type id 25
ndb/src/ndbapi/NdbDictionary.cpp:
wl-1442 fix Time. adds new type id 25
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
wl-1442 fix Time. adds new type id 25
ndb/test/include/NdbSchemaOp.hpp:
wl-1442 fix Time. adds new type id 25
ndb/tools/restore/consumer.cpp:
wl-1442 fix Time. adds new type id 25
sql/ha_ndbcluster.cc:
wl-1442 fix Time. adds new type id 25
mysql-test/r/ndb_index_ordered.result:
wl-1442 fix Date. reuses old unused Timespec type id
mysql-test/t/ndb_index_ordered.test:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/include/kernel/signaldata/DictTabInfo.hpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/include/ndbapi/NdbDictionary.hpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/include/util/NdbSqlUtil.hpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/src/common/util/NdbSqlUtil.cpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/src/ndbapi/NdbDictionary.cpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/test/include/NdbSchemaOp.hpp:
wl-1442 fix Date. reuses old unused Timespec type id
ndb/tools/restore/consumer.cpp:
wl-1442 fix Date. reuses old unused Timespec type id
sql/ha_ndbcluster.cc:
wl-1442 fix Date. reuses old unused Timespec type id
tables that support multiple index types. (Bug #7235)
sql/sql_show.cc:
Always output 'TYPE <indextype>' for indexes on tables with multiple index types
mysql-test/r/ctype_utf8.result:
Fix results for test
with a number of decimals specified. (Bug #7361)
mysql-test/t/type_float.test:
Add test for maximum values of float and double columns with number of decimals
mysql-test/r/type_float.result:
Add results for new test
mysql-test/r/type_float.result.es:
Add results for new test
sql/field.cc:
Use ::store(double nr) from ::store(longlong nr) so we get the same range checking
WL#2335 (wait if binlog or binlog index file hits disk full or quota exceeded),
fix for BUG#7236 ("--expire_logs_days does not apply if all statements
happen in transactions"), and a behaviour change: abort if mysqld can't start
binlog at startup (if running with --log-bin of course).
sql/log.cc:
2 small fixes for binlog:
1) We create binlog and binlog index file with flag MY_WAIT_IF_FULL, so that they have the same
behaviour as MyISAM tables when disk is full or quota exceeded (wait, try to finish write
every minute, warn in error log every 10 minutes). That's WL#2335.
2) Honour expire-log-days when we write a transaction to binlog (we honoured it already when writing
an autocommit statement). This fixes BUG#7236.
sql/mysqld.cc:
If we fail to create binlog or binlog index file or write to them at mysqld's startup, mysqld
will exit. The former behaviour was to print error and continue, which led to stupid things like
if you mispell a directory name in --log-bin, you don't immediately notice your mistake and
you corrupt your recovery/replication. New behaviour is consistent with if you mispelt innodb_data_file_path.
The problem was that when a QUICK_SELECT access method is chosen,
test_if_skip_sort_order() discovered that the index being used
by the quick select will not deliver tuples in sorted order.
In this case test_if_skip_sort_order() tried to change the index
used by the quick select, but it didn't properly set the other
members of the quick select, and especially the range flags of
the ranges in QUICK_SELECT::ranges.
The fix re-invokes the function SQL_SELECT::test_quick_select
to correctly create a valid QUICK_SELECT object.
mysql-test/r/order_by.result:
Added test results.
mysql-test/t/order_by.test:
Added test for BUG#7331.
sql/sql_select.cc:
Fix for BUG#7331.
mysql-test/r/grant2.result:
new test case
mysql-test/r/variables.result:
don't fail w/o innodb
mysql-test/t/grant2.test:
new test case
mysql-test/t/multi_update.test:
don't fail w/o innodb
mysql-test/t/variables.test:
don't fail w/o innodb
sql/sql_acl.cc:
cleanup
This allows use to use INSERT IGNORE ... ON DUPLICATE ...
mysql-test/r/drop.result:
safety fix
mysql-test/t/drop.test:
safety fix
mysql-test/t/multi_update.test:
ensure we cover all possible errors
sql/log_event.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/log_event.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/mysql_priv.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_class.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_delete.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_insert.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_load.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_parse.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_select.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_table.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_union.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_update.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_yacc.yy:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
correctly even with zero month and day" and bug #7515 "from_unixtime(0)
now returns NULL instead of the Epoch" into 4.1 tree.
mysql-test/r/ps_2myisam.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_3innodb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_4heap.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_5merge.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_6bdb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_7ndb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
sql-common/my_time.c:
Merged fix for bug #7297 "Two digit year should be interpreted correctly
even with zero month and day" into 4.1
sql/item_timefunc.cc:
Small fix after merging patch solving bug #7515 "from_unixtime(0) now
returns NULL instead of the Epoch" into 4.1.
the Epoch". (With after review fixes).
mysql-test/r/func_time.result:
Added test for bug #7515 "from_unixtime(0) now returns NULL instead of
the Epoch".
mysql-test/t/func_time.test:
Added test for bug #7515 "from_unixtime(0) now returns NULL instead of
the Epoch".
sql/item_timefunc.cc:
Item_func_from_unixtime:
from_unixtime(0) should return Epoch instead of NULL.
sql/item_timefunc.h:
Item_func_from_unixtime:
- Removed unused method definition.
- fix_length_and_dec() should set maybe_null to true since now
from_unixtime() can return NULL even in case when none of its
arguments is NULL.
When we cast datetime value to DATE (TIME) type we should throw away its
time (date) part. This was not done properly if CAST() function was used
in datetime expressions.
mysql-test/r/cast.result:
Added test for bug #6914 "Problems using time()/date() output in
expressions".
mysql-test/t/cast.test:
Added test for bug #6914 "Problems using time()/date() output in
expressions".
sql/item_timefunc.cc:
Item_time_typecast::get_time()/Item_date_typecast::get_date():
When we cast datetime value to DATE we should throw away its time part.
When we cast such value to TIME type we should throw away its date part.
The fix checks if the trim string argument is NULL. If so, the standard
mandates that the function result must be also NULL.
mysql-test/r/func_str.result:
added test result
mysql-test/t/func_str.test:
Added test for NULL arguments.
sql/item_strfunc.cc:
Test if the trim argument is NULL.
mysql-test/r/merge.result:
Added test result for BUG#7377.
mysql-test/t/merge.test:
Added test for BUG#7377.
sql/ha_myisammrg.cc:
Added implementation for handler::index_type.
sql/ha_myisammrg.h:
Added implementation for handler::index_type.
Return a sensible error code from DISCARD TABLESPACE, if it fails because the table is referenced by a FOREIGN KEY
sql/sql_table.cc:
Return a sensible error code from DISCARD TABLESPACE, if it fails because the table is referenced by a FOREIGN KEY
Return a sensible error code from DISCARD TABLESPACE, if it fails because the table is referenced by a FOREIGN KEY
sql/ha_innodb.cc:
Return a sensible error code from DISCARD TABLESPACE, if it fails because the table is referenced by a FOREIGN KEY
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/buf/buf0rea.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/include/dict0load.h:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/include/fil0fil.h:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/include/row0mysql.h:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/include/trx0trx.h:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/dict/dict0load.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/fil/fil0fil.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/row/row0ins.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/row/row0mysql.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/row/row0sel.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/srv/srv0start.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
innobase/trx/trx0trx.c:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
sql/ha_innodb.cc:
Fix InnoDB critical bug #7496; we scan the InnoDB data dictionary also at a normal mysqld startup, and create the spaces, so that we know the mapping space id -> .ibd file name; fix an infinite loop if DISCARD TABLESPACE coincides with INSERT or some other table operation; fix a potential crash if DISCARD TABLESPACE coincides with a cascaded FOREIGN KEY operation in the same table; do not allow DISCARD TABLESPACE of a referenced table if FOREIGN_KEY_CHECKS=1
Added test cases for bug #7351.
item_cmpfunc.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
If in the predicate v IN (SELECT a FROM t WHERE cond)
v is null, then the result of the predicate is either
INKNOWN or FALSE. It is FALSE if the subquery returns
an empty set.
item_subselect.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
The problem was due to not a quite legal transformation
for 'IN' subqueries. A subquery containing a predicate
of the form
v IN (SELECT a FROM t WHERE cond)
was transformed into
EXISTS(SELECT a FROM t WHERE cond AND (a=v OR a IS NULL)).
Yet, this transformation is valid only if v is not null.
If v is null, then, in the case when
(SELECT a FROM t WHERE cond) returns an empty set the value
of the predicate is FALSE, otherwise the result of the
predicate is INKNOWN.
The fix resolves this problem by changing the result
of the transformation to
EXISTS(SELECT a FROM t WHERE cond AND (v IS NULL OR (a=v OR a IS NULL)))
in the case when v is nullable.
The new transformation prevents applying the lookup
optimization for IN subqueries. To make it still
applicable we have to introduce guarded access methods.
sql/item_subselect.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
The problem was due to not a quite legal transformation
for 'IN' subqueries. A subquery containing a predicate
of the form
v IN (SELECT a FROM t WHERE cond)
was transformed into
EXISTS(SELECT a FROM t WHERE cond AND (a=v OR a IS NULL)).
Yet, this transformation is valid only if v is not null.
If v is null, then, in the case when
(SELECT a FROM t WHERE cond) returns an empty set the value
of the predicate is FALSE, otherwise the result of the
predicate is INKNOWN.
The fix resolves this problem by changing the result
of the transformation to
EXISTS(SELECT a FROM t WHERE cond AND (v IS NULL OR (a=v OR a IS NULL)))
in the case when v is nullable.
The new transformation prevents applying the lookup
optimization for IN subqueries. To make it still
applicable we have to introduce guarded access methods.
sql/item_cmpfunc.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
If in the predicate v IN (SELECT a FROM t WHERE cond)
v is null, then the result of the predicate is either
INKNOWN or FALSE. It is FALSE if the subquery returns
an empty set.
mysql-test/t/subselect.test:
Added test cases for bug #7351.
mysql-test/r/subselect.result:
Added test cases for bug #7351.
sql/item_strfunc.cc:
Auto merged
mysql-test/r/func_str.result:
merged test results for QUOTE() buf fix
mysql-test/t/func_str.test:
merged test for QUOTE() buf fix
sql/mysqld.cc:
A fix (bug #5652: [patch] tcpwrapper support is broken on systems using an unmodified tcpwrapper).
Wrapper for fromhost, hosts_access, eval_client has been removed.
mysql-test/r/func_str.result:
result for test case for a bug in QUOTE() (Bug #7495)
mysql-test/t/func_str.test:
test case for a bug in QUOTE() (Bug #7495)
sql/item_strfunc.cc:
a better fix for a QUOTE() bug (Bug #7495)
to behave well on 5.0 tables (well now you can't use tables from 4.1
and 5.0 with 4.0 because former use utf8, but still it is nice to have
similar code in acl_init() and replace_user_table()).
This also will make such GRANTs working in 5.0 (they are broken now).
mysql-test/r/grant.result:
Added test for GRANT which manipulates user limits.
mysql-test/t/grant.test:
Added test for GRANT which manipulates user limits.
add space after comma
add space after equal
add comments in vio_close_shared_memory()
include/violite.h:
fix indentation
sql-common/client.c:
fix identation
sql/mysqld.cc:
add space after comma
vio/vio.c:
add space after equal
fix identation
vio/viosocket.c:
add space after comma
add comments in vio_close_shared_memory()
don't checkin for Administrator or mysqldev
sql/log.cc@1.157
restored a bugfix that was lost in a merge
sql/log.cc:
restored a bugfix that was lost in a merge
BitKeeper/triggers/pre-delta:
don't commit for Administrator or mysqldev
mysql-test/r/func_str.result:
A result for test case for the bug #7495 involving either LTRIM()
or TRIM() within QUOTE() function.
mysql-test/t/func_str.test:
A test case for the bug #7495 involving either LTRIM() or TRIM()
within QUOTE() function.
sql/item_strfunc.cc:
Changes for LTRIM() and TRIM() functions that aleviate the bug
entirely.
STR_TO_DATE() function if there is another format specifier after %f
in format string". Also small cleanup of STR_TO_DATE() implementation.
(After review version.)
mysql-test/r/date_formats.result:
Added test for small bug in STR_TO_DATE() implementation which caused
microseconds to be gobbled from string result of this function, if
there was another specifier after %f in format string.
mysql-test/t/date_formats.test:
Added test for small bug in STR_TO_DATE() implementation which caused
microseconds to be gobbled from string result of this function, if
there was another specifier after %f in format string.
sql/item_timefunc.cc:
Small cleanup of str_to_date() implementation.
Renamed check_result_type() to less ambigous get_date_time_result_type()
and made it static. Also added handling of %X,%x,%V,%v to this function.
Fixed small bug in it which caused microseconds to be gobbled if there
was some other specifiers after %f.
Cleaned up comments a bit.
ndb/include/ndbapi/ndb_cluster_connection.hpp:
changed return type of no_ndb_nodes
ndb/include/transporter/TransporterRegistry.hpp:
added connect_server method to TransporterRegistry
ndb/include/util/ndb_opts.h:
set shared memory usage as _no_ default in 4.1
ndb/src/common/transporter/Makefile.am:
added -I flags for EventLogger.hpp
ndb/src/common/transporter/SCI_Transporter.cpp:
setting transporter type
ndb/src/common/transporter/SHM_Transporter.cpp:
setting transporter type
ndb/src/common/transporter/TCP_Transporter.cpp:
setting transporter type
ndb/src/common/transporter/Transporter.cpp:
added event logger
added type handling in transporter
added verification of transporter type compatability
ndb/src/common/transporter/Transporter.hpp:
setting transporter type
ndb/src/common/transporter/TransporterRegistry.cpp:
moved server-client transporter negotiation to own method connect_server()
added verification of transporter compatability
ndb/src/kernel/main.cpp:
changed which events are logged
ndb/src/ndbapi/ndb_cluster_connection.cpp:
added g_eventLogger
sql/mysqld.cc:
set shared memory usage as _no_ default in 4.1
Add a comment that no InnoDB table lock is now acquired in LOCK TABLES if AUTOCOMMIT=1. This helps to avoid deadlocks when porting old MyISAM applications to InnoDB.
sql/ha_innodb.cc:
Add a comment that no InnoDB table lock is now acquired in LOCK TABLES if AUTOCOMMIT=1. This helps to avoid deadlocks when porting old MyISAM applications to InnoDB.
If AUTOCOMMIT=1, do not acquire an InnoDB table lock in LOCK TABLES; this makes porting of old MyISAM applications to InnoDB easier, since in that mode InnoDB table locks caused deadlocks very easily
sql/ha_innodb.cc:
If AUTOCOMMIT=1, do not acquire an InnoDB table lock in LOCK TABLES; this makes porting of old MyISAM applications to InnoDB easier, since in that mode InnoDB table locks caused deadlocks very easily
moved NdbWaiter, m_ndb_cluster_connection, to impl class
moved node selection things to cluster connection
moved all private things to impl class
added opts for shared memory and node selection
changed opts handling somewhat; introduced enum for options and common handling of option variables
added checks for transporter support
automatic addition of shared mem transporters
moved wait_until_ready code to cluster connection
added control of usage of new node selection method
ndb/include/mgmapi/mgmapi_config_parameters.h:
added config parameter Group on connection
ndb/include/ndbapi/Ndb.hpp:
moved NdbWaiter, m_ndb_cluster_connection, to impl class
moved node selection things to cluster connection
ndb/include/ndbapi/ndb_cluster_connection.hpp:
moved all private things to impl class
ndb/include/util/ndb_opts.h:
added opts for shared memory and node selection
ndb/src/kernel/vm/Configuration.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/mgmclient/main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/mgmsrv/ConfigInfo.cpp:
added checks for transporter support
automatic addition of shared mem transporters
ndb/src/mgmsrv/MgmtSrvr.cpp:
in alloc node id first choose connection with specified hostname
ndb/src/mgmsrv/main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/src/ndbapi/DictCache.hpp:
added include file
ndb/src/ndbapi/Ndb.cpp:
enabled using new node selection method
moved wait_until_ready code to cluster connection
moved node selection (hint) to cluster connection
removed start transaction dgroup
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
removed and added inclusde files
ndb/src/ndbapi/NdbImpl.hpp:
moved things from Ndb into Impl class
moved waiter things to new file NdbWaiter.hpp
ndb/src/ndbapi/NdbScanOperation.cpp:
ndbwaiter is no in impl class
ndb/src/ndbapi/Ndbif.cpp:
ndbwaiter is no in impl class
ndb/src/ndbapi/Ndbinit.cpp:
moved some Ndb things into impl class
ndb/src/ndbapi/TransporterFacade.hpp:
changed friend declaration
ndb/src/ndbapi/ndb_cluster_connection.cpp:
moved node selection things to cluster connection
moved things from cluster connection to cluster connection impl class
ndb/test/ndbapi/testNdbApi.cpp:
removed start transaction dgroup
ndb/tools/delete_all.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/desc.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/drop_index.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/drop_tab.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/listTables.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/restore/restore_main.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/select_all.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/select_count.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
ndb/tools/waiter.cpp:
changed opts handling somewhat; introduced enum for options and common handling of option variables
sql/ha_ndbcluster.cc:
added control of usage of new node selection method
sql/mysqld.cc:
added control of usage of new node selection method
mysql-test/r/update.result:
Auto merged
mysql-test/t/update.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/mysql-test-run.sh:
Merge from 4.0
(back to behaviour of 4.1.7). Warning was not fatal: mysqldump continued. And the good thing is that it helped spot that starting from 4.1.7,
SHOW CREATE DATABASE failed (if --single-transaction and first db has non-empty InnoDB table and there is a second db) and thus mysqldump
produced CREATE DATABASE statements missing the CHARACTER SET clause. Removing the bug which was in the server, and the warning reporting in
mysqldump (compatibility with old servers).
client/mysqldump.c:
don't report errors as we deal almost gracefully with them (back to code of 4.1.7)
mysql-test/r/flush_block_commit.result:
result update
mysql-test/t/flush_block_commit.test:
let's verify that SHOW CREATE DATABASE succeeds even if connection has open transaction.
sql/sql_parse.cc:
There is no reason to forbid SHOW CREATE DATABASE if connection has an open transaction
that affected the UCS2 character set. (Bug #7350)
innobase/data/data0type.c:
Added dtype_get_charset_coll_noninline()
innobase/include/data0type.h:
Added dtype_get_charset_coll_noninline()
innobase/include/row0mysql.h:
Added charset field to mysql_row_templ_struct.
innobase/include/row0mysql.ic:
row_mysql_store_col_in_innobase_format():
When removing trailing spaces, treat the UCS2 character set properly.
innobase/rem/rem0cmp.c:
cmp_whole_field(): Do not remove trailing 0x20 bytes, as
innobase_mysql_cmp() implicitly pads the strings with trailing
spaces as necessary.
innobase/row/row0sel.c:
row_sel_field_store_in_mysql_format(): Do not pad with 0x20 bytes.
row_sel_store_mysql_rec(): Pad VARCHARs with trailing spaces
(0x20, or 0x0020 in UCS2).
sql/ha_innodb.cc:
build_template(): Initialize templ->charset