- detect the need for row-based binlogging not at execution stage but earlier at parsing stage; needed for example for CREATE TABLE SELECT UUID().
- more tests of this mixed mode.
mysql-test/r/rpl_switch_stm_row_mixed.result:
result update
mysql-test/t/rpl_switch_stm_row_mixed.test:
testing more scenarios for the mixed replication mode.
Added support for manual testing of UDFs vs the mixed mode (behind a variable in the test).
Changing old file names to better ones.
sql/item_create.cc:
at parse time, when we see a UUID(), put up a flag in LEX to say this binlogs properly only with row-based binlogging.
sql/item_func.cc:
it's not perfect to put up the flag at this execution stage, better do it at parse stage.
sql/item_strfunc.cc:
it's not perfect to put up the flag at this execution stage, better do it at parse stage
sql/set_var.cc:
this assertion is wrong, this piece of code can happen in RBR mode too.
sql/sql_lex.cc:
when we reinitialize the LEX members before every query, we have to reinitialize the new flag
sql/sql_lex.h:
A new flag, set at parsing stage, which tells if some items seen during parsing stage require row-based replication to binlog/replicate correctly
when this statement is later executed.
It has to be in LEX and not directly in THD, for this to work in prepared statements.
sql/sql_parse.cc:
Parsing stage happened at some time in the past and set up the flag in LEX, now that we execute the statement we actually turn on row-based binlogging
if the thread's binlog format is "mixed". We then turn it off when leaving mysql_execute_command().
Some cleanup code was not executed if leaving mysql_execute_command() at the "error" label, fixing this. A better fix than the "goto end" would be
to modify each "goto error" to "res=1; goto end" but it required changing many lines which I don't want to do now ("make smallest possible patch").
sql/sql_yacc.yy:
When at parsing stage we see a UDF we put up a flag to say that row-based binlogging is preferred.
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave), or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
mysql-test/r/rpl_row_4_bytes.result:
update
mysql-test/t/rpl_row_4_bytes.test:
don't influence next tests
sql/ha_archive.cc:
please pay attention to this structure when you change it...
sql/ha_berkeley.cc:
please pay attention to this structure when you change it...
sql/ha_blackhole.cc:
please pay attention to this structure when you change it...
sql/ha_federated.cc:
please pay attention to this structure when you change it...
sql/ha_heap.cc:
please pay attention to this structure when you change it...
sql/ha_innodb.cc:
please pay attention to this structure when you change it...
sql/ha_myisam.cc:
please pay attention to this structure when you change it...
sql/ha_myisammrg.cc:
please pay attention to this structure when you change it...
sql/ha_ndbcluster_binlog.cc:
no more global 'binlog_row_based'
sql/ha_partition.cc:
please pay attention to this structure when you change it...
sql/handler.cc:
please pay attention to this structure when you change it...
sql/handler.h:
it's good to initialize statically (to get no compiler warning) even if to a null value.
sql/item_func.cc:
UDFs require row-based if this is the "mixed" binlog format.
sql/item_strfunc.cc:
UUID() requires row-based binlogging if this is the "mixed" binlog format
sql/log.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/log.h:
the enum enum_binlog_format moves to log.h from mysqld.cc as we need it in several places.
sql/log_event.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/log_event.h:
this global variable not used anymore
sql/mysql_priv.h:
these global variables not used anymore
sql/mysqld.cc:
simplification in the handling of --binlog-format (but with no user-visible change), thanks to
the new global system variable.
RBR does not anymore turn on --log-bin-trust-function-creators and --innodb-locks-unsafe-for-binlog
as these are global options and RBR is now settable per session.
sql/partition_info.cc:
compiler warnings
sql/set_var.cc:
new class of thread's variable, to handle the binlog_format (like sys_var_thd_enum except
that is_readonly() is overriden for more checks before update).
compiler warnings (ok'd by Serg)
sql/set_var.h:
new class for the thread's binlog_format (see set_var.cc)
sql/share/errmsg.txt:
some messages for when one can't toggle from one binlog format to another
sql/sp_head.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_base.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_class.cc:
When a THD is initialized, we set its current_stmt_binlog_row_based
sql/sql_class.h:
new THD::variables.binlog_format (the value of the session variable set by SET
or inherited from the global value), and THD::current_stmt_binlog_row_based which tells if the
current statement does row-based or statement-based binlogging. Both members are needed
as the 2nd one cannot be derived only from the first one (the statement's type plays a role too),
and the 1st one is needed to reset the 2nd one.
sql/sql_delete.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_insert.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
sql/sql_load.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based.
sql/sql_parse.cc:
when we are done with a statement, we reset the current_stmt_binlog_row_based to the value
derived from THD::variables.binlog_format.
sql/sql_partition.cc:
compiler warning
sql/sql_show.cc:
compiler warning
sql/sql_table.cc:
binlog_row_based -> thd->current_stmt_binlog_row_based
tests/mysql_client_test.c:
compiler warning
mysql-test/r/ndb_binlog_basic2.result:
new result
mysql-test/r/rpl_switch_stm_row_mixed.result:
new result
mysql-test/t/ndb_binlog_basic2.test:
new test to verify that if cluster is enabled, can't change binlog format on the fly.
mysql-test/t/rpl_switch_stm_row_mixed.test:
test to see if one can switch between SBR, RBR, and "mixed" mode, and when one cannot,
and test to see if the switching, and the mixed mode, work properly (using UUID() to test,
as using UDFs is not possible in the testsuite for portability reasons).
rename sha1_* to mysql_sha1_*
include/sha1.h:
rename sha1_* to mysql_sha1_*
mysys/sha1.c:
rename sha1_* to mysql_sha1_*
sql/item_strfunc.cc:
rename sha1_* to mysql_sha1_*
sql/password.c:
rename sha1_* to mysql_sha1_*
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into mysql.com:/usr/home/bar/mysql-5.0
mysql-test/r/ctype_recoding.result:
Auto merged
sql/item.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
mysql-test/r/func_str.result:
Add new results
mysql-test/t/func_str.test:
Add new test
sql/item_strfunc.cc:
Mark tmp_value in Item_func_substr_index as const so that we don't
overwrite the contents of another String when getting the delimiter.
Fix typo in variable names (delimeter -> delimiter).
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
item_strfunc.h, item_strfunc.cc, item.cc:
Try to convert a const item into destination
character set. If conversion happens without
data loss, then cache the converted value
and return it during val_str().
Otherwise, if conversion loses data, return
Illeral mix of collations error, as it happened
previously.
ctype_recoding.result, ctype_recoding.test:
Fixing tests accordingly.
sql/item.cc:
Bug#10446 Illegal mix of collations
Try to convert a const item into destination
character set. If conversion happens without
data loss, then cache the converted value
and return it during val_str().
Otherwise, if conversion loses data, return
Illeral mix of collations error, as it happened
previously.
sql/item_strfunc.cc:
Return cached value when it's possible.
mysql-test/t/ctype_recoding.test:
Fixing tests accordingly.
mysql-test/r/ctype_recoding.result:
Fixing tests accordingly.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
sql/field.cc:
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
Bad examples of usage of a string with its length fixed.
sql/handler.cc:
Inefficient usage of String::append() fixed.
sql/item.cc:
Bad examples of usage of a string with its length fixed.
sql/item.h:
A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
Inefficient using of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
Bad examples of usage of a string with its length fixed.
sql/key.cc:
Bad examples of usage of a string with its length fixed.
sql/log.cc:
Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
The dummy parser hook allocated.
sql/opt_range.cc:
Inefficient usage of String::append() fixed.
sql/parse_file.cc:
Bad examples of usage of a string with its length fixed.
A hook for unknown keys added to the parser.
sql/parse_file.h:
A hook for unknown keys added to the parser.
sql/protocol.cc:
A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
A warning for old format config file.
sql/slave.cc:
Bad examples of usage of a string with its length fixed.
sql/sp.cc:
Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
The macro definition moved to sql_string.h to
be accessible in all parts of server.
sql/sql_table.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
A dummy hook used for parsing views.
sql/structs.h:
The macro definition moved to sql_string.h to be
accessible in all parts of server.
sql/table.cc:
A bad example of usage of a string with its length fixed.
sql/tztime.cc:
A bad example of usage of a string with its length fixed.
ctype_utf8.result, ctype_utf8.test:
Adding test case.
item_strfunc.cc:
item_strfunc.h:
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx. Reusing the new
method in Item_func_char and Item_func_charset_conv.
sql/item_strfunc.h:
Bug#14146 CHAR(...USING ...) and CONVERT(CHAR(...) USING...) produce different results
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx.
sql/item_strfunc.cc:
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx.
mysql-test/t/ctype_utf8.test:
Adding test case.
mysql-test/r/ctype_utf8.result:
Adding test case.
allowed set functions aggregated in outer subqueries, allowed nested set functions.
mysql-test/r/func_gconcat.result:
Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
Changed Item_field::fix_fields to calculate attributes used when checking context conditions
for set functions.
Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_cmpfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_func.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_row.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_strfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_subselect.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/item_sum.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_class.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_lex.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
sql/sql_prepare.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_update.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
(Some old systems returns ETIME and it's safer to test for both values
than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
client/mysqldump.c:
Simple optimizations of new code
Indentation fixes
client/mysqltest.c:
Removed not needed variable
include/mysql_com.h:
Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
CHAR() now returns binary string as default
mysql-test/r/func_str.result:
CHAR() now returns binary string as default
mysql-test/r/range.result:
Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
CHAR() now returns binary string as default
mysql-test/r/view.result:
More tests of view rename
mysql-test/t/ctype_utf8.test:
CHAR() now returns binary string as default
mysql-test/t/func_str.test:
CHAR() now returns binary string as default
mysql-test/t/range.test:
Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
More tests of view rename
mysys/mf_keycache.c:
Indentation changes
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
Fix to MySQL coding style
Optimized functions
mysys/thr_lock.c:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
Use octet2hex()
sql/ha_ndbcluster.cc:
Removed not used variable
sql/handler.cc:
Simplify code
Use *NONE* instead of 'none' for not existing storage engine
Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
Remove not needed test for *ref. (If ref is set, it should never point at 0)
sql/item_func.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
Simplify code
More comments
Require that last argument to find_and_check_access() is given
(Made code shorter and faster)
sql/item_strfunc.cc:
Changed CHAR() to return result in binary collation
CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
Bar will shortly add the following syntax:
CHAR(.... USING character_set)
and ensure that
CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
Use ocet2hex()
sql/item_strfunc.h:
CHAR() now returns a binary string
sql/log_event.cc:
Use octet2hex()
Simplify code
sql/parse_file.cc:
Indentation fixes
Use for() instead of while()
sql/password.c:
Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
Indentation fixes
sql/sql_insert.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
Fixed wrong merge
sql/sql_select.cc:
Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
Removed not used variable
sql/sql_table.cc:
Indentation fixed
Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
Simplify code
sql/unireg.cc:
Use octet2hex()
mysql-test/r/func_crypt.result:
Add new results
mysql-test/t/func_crypt.test:
Add new regression test
sql/item_strfunc.cc:
Handle NULL result from call to crypt().
problems which were introduced during work on WL#2787 "Add view definer/owner
to the view definition (.frm) to check privileges on used tables and stored
routines when using a VIEW."
In some cases it is better to use value from Security_context::host_or_ip
instead of value from Security_context::host since the latter can be NULL
in certain situations (When we can't resolve hostname or we have not done
this yet).
mysql-test/r/skip_name_resolve.result:
Added test for bug #13407 "Remote connecting crashes server".
mysql-test/t/skip_name_resolve.test:
Added test for bug #13407 "Remote connecting crashes server".
sql/item_strfunc.cc:
Item_func_user::val_str():
It is better to use value from Security_context::host_or_ip instead of
value from Security_context::host in the result of USER() function since
the latter can be NULL in certain situations (When we can't resolve hostname
or we have not done this yet. Reverted back to old code).
sql/mysqld.cc:
handle_connections_shared_memory():
THD::host member has moved to the Security_context class.
New THD::security_ctx member points to active security context.
sql/sql_show.cc:
mysqld_list_processes():
It is better to use value from Security_context::host_or_ip instead of
value from Security_context::host in the processlist since the latter
can be NULL in certain situations (When we can't resolve hostname or we
have not done this yet. Reverted back to old code).
mysql-test/r/func_str.result:
Add new results
mysql-test/t/func_str.test:
Add new regression test
sql/item_strfunc.cc:
Handle NULL decimal fields in FORMAT().
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner5-5.0
sql/ha_innodb.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/item_func.cc:
merge
Part 2 postreview fixes.
sql/ha_innodb.cc:
Renamed structure st_security_context to class Security_context
sql/item_func.cc:
Renamed structure st_security_context to class Security_context
sql/item_strfunc.cc:
fixed USER() function
sql/log.cc:
variable used to optimize access to security context
sql/mysql_priv.h:
Renamed structure st_security_context to class Security_context
sql/mysqld.cc:
main security context used direcly
sql/sp_head.cc:
Renamed structure st_security_context to class Security_context
removed unneed variable
sql/sp_head.h:
Comment inmroved
Renamed structure st_security_context to class Security_context
sql/sql_acl.cc:
Renamed structure st_security_context to class Security_context
fixed function comment and return value
variable used to optimize access to security context
Renamed method of Security_ontext
sql/sql_acl.h:
fixed return value type
sql/sql_class.cc:
Renamed structure st_security_context to class Security_context
sql/sql_class.h:
Renamed structure st_security_context to class Security_context
Method renamed
sql/sql_db.cc:
Renamed structure st_security_context to class Security_context
fixed layout
sql/sql_parse.cc:
registration of wanted access for underlying tables
sql/sql_show.cc:
Renamed structure st_security_context to class Security_context
fixed layout
sql/sql_yacc.yy:
Renamed structure st_security_context to class Security_context
Character set does not support traditional mode
ctype_utf8.result, ctype_utf8.test:
adding test case.
password.c, mysql_com.h
Changeing octet2hex availability from static to public.
item_strfunc.cc:
Result string is now checked to be well-formed.
Warning/error is generated, depending on sql_mode.
include/mysql_com.h:
Bug#10504
Character set does not support traditional mode
Changeing octet2hex from static to public.
sql/item_strfunc.cc:
Result string is now checked to be well-formed.
Warning/error is generated, depending on sql_mode.
sql/password.c:
Changeing octet2hex from static to public.
mysql-test/t/ctype_utf8.test:
adding test case.
mysql-test/r/ctype_utf8.result:
adding test case.
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
ndb/src/kernel/blocks/backup/BackupInit.cpp:
Auto merged
ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
Auto merged
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
Auto merged
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
Auto merged
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
Auto merged
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
Auto merged
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
ndb/src/kernel/vm/SimulatedBlock.cpp:
Auto merged
ndb/src/kernel/vm/SimulatedBlock.hpp:
Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
ndb/src/ndbapi/ndberror.c:
Resolve conflicts
sql/ha_innodb.cc:
Resolve conflicts
sql/item_strfunc.cc:
Resolve conflicts
BUG #11104
Took out the offset-=delimiter_length-1 out of the for loop. It was causing
basically this:
select substring_index('the king of the the hill', 'the', -2) to not work.
The first iteration, offset would be initialised to 24, then strstr would
point at 'the king of the the* hill' ('*'means right before the
character following), returning a offset of 16. The for loop would then
decrement offset by two (3 - 1), to 14, now pointing at
"the king of th*e the hill", _skipping_ past the 'e' in the second to last
'the', and therefore strstr would never have a chance of matching the
second to last 'the', then moving on to the 'the' at the begginning of the
string!
In a nutshell, offset was being decremented by too great a value, preventing
the second to last 'the' from being ever found, hence the result of
'king of the the hill' from the query that is reported in the bug report
func_str.test:
BUG #11104
Added tests to make sure fix addresses issues in original bug report
func_str.result:
BUG #11104
New results for new tests
mysql-test/r/func_str.result:
BUG #11104
New results for new tests
mysql-test/t/func_str.test:
BUG #11104
Added tests to make sure fix addresses issues in original bug report
sql/item_strfunc.cc:
BUG #11104
Took out the offset-=delimiter_length-1 out of the for loop. It was causing
basically this:
select substring_index('the king of the the hill', 'the', -2) to not work.
The first iteration, offset would be initialised to 24, then strstr would
point at 'the king of the the* hill' ('*'means right before the
character following), returning a offset of 16. The for loop would then
decrement offset by two (3 - 1), to 14, now pointing at
"the king of th*e the hill", _skipping_ past the 'e' in the second to last
'the', and therefore strstr would never have a chance of matching the
second to last 'the', then moving on to the 'the' at the begginning of the
string!
In a nutshell, offset was being decremented by too great a value, preventing
the second to last 'the' from being ever found, hence the result of
'king of the the hill' from the query that is reported in the bug report
adding test case
item_strfunc.cc:
Bug#12351
CONCAT with USER()/DATEBASE() and
a column gets strange results.
Mark created Item_str as constant, so CONCAT
cannot reuse it for optimization purposes.
sql/item_strfunc.cc:
Bug#12351
CONCAT with USER()/DATEBASE() and
a column gets strange results
mysql-test/t/func_system.test:
adding test case
mysql-test/r/func_system.result:
adding test case
needed to be fixed in earlier versions)
Fixed the iteration of how substrings are handled with negative indexes in
SUBSTRING_INDEX
mysql-test/r/func_str.result:
New results for the fix to substring_index
mysql-test/t/func_str.test:
Added tests for fix to substring_index, various lenth search patterns. Also included
are the queuries the user who reported the bug listed in the bug report
sql/item_strfunc.cc:
Fix to BUG 11104
Took out the offset-=delimiter_length-1 out of the for loop. It was causing
basically this:
select substring_index('the king of the the hill', 'the', -2) to not work.
The first iteration, offset would be initialised to 24, then strstr would
point at 'the king of the the* hill' ('*'means right before the
character following), returning a offset of 16. The for loop would then
decrement offset by two (3 - 1), to 14, now pointing at
"the king of th*e the hill", _skipping_ past the 'e' in the second to last
'the', and therefore strstr would never have a chance of matching the
second to last 'the', then moving on to the 'the' at the begginning of the
string!
In a nutshell, offset was being decremented by too great a value, preventing
the second to last 'the' from being ever found, hence the result of
'king of the the hill' from the query that is reported in the bug report
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/t/create.test:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/table.cc:
Resolve conflict
sql/unireg.cc:
Resolve conflict
client via mysql_fetch_fields(). (Bug #11311)
mysql-test/r/func_str.result:
Add new results
mysql-test/t/func_str.test:
Add new regression test
sql/item_strfunc.cc:
Fix length reported for LPAD() and RPAD() -- they always truncate to the
length that is given.
into mysql.com:/home/jimw/my/mysql-5.0-clean
extra/perror.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/select.result:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
ndb/src/mgmsrv/main.cpp:
Auto merged
sql/des_key_file.cc:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/select.test:
Resolve conflicts
scripts/mysqld_safe.sh:
Resolve conflict
sql/item.cc:
Resolve conflict, don't return FIELD_TYPE_BLOB since VARCHAR
can be longer in 5.0 than 4.1.
sql/log_event.cc:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Remove incorrect fix (merge from 4.1)
sql/sql_show.cc:
Resolve conflict
include/my_global.h:
Added floatget() to read unaligned flaot
mysql-test/r/select.result:
Added test for found_rows()
mysql-test/t/select.test:
Added test for found_rows()
sql/des_key_file.cc:
Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition
sql/field_conv.cc:
Added optimizzed varsion of do_cut_string (for simple character sets)
sql/item_func.cc:
Simplify code (and ensure DBUG_ENTER is excuted before main code)
sql/item_strfunc.cc:
Safe calculation of max_length
This was needed as max_length can now be 1<<32-1 (after konstantins recent patch to fix BLOB_LENGTH)
Remove init_des_key_file() as this is not initialized in mysqld.cc
sql/item_timefunc.cc:
Safe calculation of max_length
This was needed as max_length can now be 1<<32-1 (after konstantins recent patch to fix BLOB_LENGTH)
sql/log_event.cc:
Simplify code
sql/mysql_priv.h:
Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition
sql/mysqld.cc:
Moved initalization of LOCK_des_key_file to mysqld to make simpler code and avoid theoretical race condition
Revert wrong patch of calling close_connection() in first close_connections() loop. (Bug #7403)
Instead we now print a warning for closed connections only if mysqld is sarted with --warnings
Added comments to make the close_connections() logic clearer
sql/sql_prepare.cc:
Use floatget() and doubleget() to protect against unaligned data
sql/sql_select.cc:
Fixed some cases unlikely cases where found_rows() would return wrong for queries that would return 0 or 1 rows
into mishka.local:/home/my/mysql-5.0
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
mysys/Makefile.am:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/sql_select.cc:
Auto merged
mysys/default.c:
SCCS merged
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (
BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f:
Delete: mysys/my_tempnam.c
VC++Files/client/mysqlclient.dsp:
Remove not used file my_tempnam.c
VC++Files/client/mysqlclient_ia64.dsp:
Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql.dsp:
Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql_ia64.dsp:
Remove not used file my_tempnam.c
VC++Files/mysys/mysys.dsp:
Remove not used file my_tempnam.c
VC++Files/mysys/mysys_ia64.dsp:
Remove not used file my_tempnam.c
client/mysql.cc:
Change to use get_defaults_options()
Remove compiler warnings
client/mysqldump.c:
Indentation fixes
Use quoted table name for 'primary_key_fields'
extra/my_print_defaults.c:
Add support for --defaults-group-suffix
change to use get_default_options()
extra/replace.c:
Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c
include/config-win.h:
Added DEFAULT_GROUP_SUFFIX_ENV
include/my_sys.h:
Change defaults_instance -> defaults_group_suffix
Change get_defaults_files -> get_defaults_options
libmysql/Makefile.shared:
Added DEFAULT_GROUP_SUFFIX_ENV
mysys/Makefile.am:
Added DEFAULT_GROUP_SUFFIX_ENV
Remove my_tempnam.c
mysys/default.c:
Changed --instance to --defaults-group-suffix
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am
(mysys shouldn't by MySQL independent)
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
mysys/default_modify.c:
Optimized code to use allocated space more efficently
Reduce code size
Ensure that realloc() works independent of argument size
mysys/my_bitmap.c:
Added missing return
sql/ha_innodb.cc:
Change if( -> if (
sql/ha_ndbcluster.cc:
Change while( -> while (
sql/item_cmpfunc.cc:
Break loop early (simple optimization)
sql/item_strfunc.cc:
Change if( -> if (
sql/log.cc:
Fixed comment
sql/mysqld.cc:
Change if( -> if (
sql/opt_range.cc:
while( -> while (
if( -> if (
sql/parse_file.cc:
Change if( -> if (
sql/sql_cache.cc:
while( -> while (
sql/sql_parse.cc:
Change if( -> if (
sql/sql_prepare.cc:
Added comment
sql/sql_select.cc:
while( -> while (
Removed index variable by incrementing pointer
sql/sql_show.cc:
Change if( -> if (
sql/sql_yacc.yy:
Change if( -> if (
tests/mysql_client_test.c:
Added cast to first argument to bzero()
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
BitKeeper/etc/config:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp-security.result:
merge
mysql-test/r/view.result:
merge
mysql-test/t/sp-security.test:
merge
mysql-test/t/view.test:
merge
sql/item_cmpfunc.cc:
merge
sql/sql_class.h:
merge
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)
BitKeeper/etc/config:
switch off open logging
mysql-test/r/sp-security.result:
correct value from current_user() in function run from "security definer"
mysql-test/r/view.result:
evaluation constant functions in WHERE (BUG#4663)
mysql-test/t/sp-security.test:
correct value from current_user() in function run from "security definer"
mysql-test/t/view.test:
evaluation constant functions in WHERE (BUG#4663)
sql/item.cc:
Item_static_string_func creation if it is need
sql/item.h:
support of Item_static_string_func creation
sql/item_cmpfunc.cc:
do not evaluate items during view creation
sql/item_create.cc:
create Item_func_user
sql/item_strfunc.cc:
Item_func_sysconst in case of converting value still have to correctly print itself
=> use Item_static_string_func instead of Item_string
Item_func_user return USER() or CURRENT_USER()
sql/item_strfunc.h:
support of correct charset conversion procedure in Item_func_sysconst
sql/sql_class.h:
new method
sql/sql_yacc.yy:
Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
into mysql.com:/home/gluh/MySQL/Merge/5.0
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged