INC_HOST_ERRORS() IS CALLED.
Issue : Sequence of calling inc_host_errors()
and reset_host_errors() required some
changes in order to maintain correct
connection error count.
Solution : Call to reset_host_errors() is shifted
to a location after which no calls to
inc_host_errors() are made.
Analysis:
-------------
If server is started with limit of MAX_CONNECTIONS and
MAX_USER_CONNECTIONS then only MAX_USER_CONNECTIONS of any particular
users can be connected to server and total MAX_CONNECTIONS of client can
be connected to server.
Server maintains a counter for total CONNECTIONS and total CONNECTIONS
from particular user.
Here, MAX_CONNECTIONS of connections are created to server. Out of this
MAX_CONNECTIONS, connections from particular user (say USER1) are
also created. The connections from USER1 is lesser than
MAX_USER_CONNECTIONS. After that there was one more connection request from
USER1. Since USER1 can still create connections as he havent reached
MAX_USER_CONNECTIONS, server increments counter of CONNECTIONS per user.
As server already has MAX_CONNECTIONS of connections, next check to total
CONNECTION count fails. In this case control is returned WITHOUT
decrementing the CONNECTIONS per user. So the counter per user CONNECTIONS goes
on incrementing for each attempt until current connections are closed.
And because of this counter per CONNECTIONS reached MAX_USER_CONNECTIONS.
So, next connections form USER1 user always returns with MAX_USER_CONNECTION
limit error, even when total connection to sever are less than MAX_CONNECTIONS.
Fix:
-------------
This issue is occurred because of not handling counters properly in the
server. Changed the code to handle per user connection counters properly.
mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
Protocol documentation (http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol)
says that initial packet sent by client if client wants SSL, consists of client capability flags only
(4 bytes or 2 bytes edependent on protocol versionl).
Some clients happen to send more in the initial SSL packet (C client, Python connector), while others (Java, .NET) follow the docs and send only client capability flags.
A change that broke Java client was a newly introduced check that frst client packet
has 32 or more bytes. This is generally wrong, if client capability flags contains CLIENT_SSL.
Also, fixed the code such that read max client packet size and charset in the first packet prior to SSL handshake. With SSL, clients do not have to send this info, they can only send client flags.
This is now fixed such that max packet size and charset are not read prior to SSL handshake, in case of SSL they are read from the "complete" client authentication packet after SSL initialization.
If init_command was incorrect, we couldn't let users execute
queries, but we couldn't report the issue to the client either
as it does not expect error messages before even sending a
command. Thus, we simply disconnected them without throwing
a clear error.
We now go through the proper sequence once (without executing
any user statements) so we can report back what the problem
is. Only then do we disconnect the user.
As always, root remains unaffected by this as init_command is
(still) not executed for them.
mysql-test/r/init_connect.result:
We now report a proper error if init_command fails.
Expect as much.
mysql-test/t/init_connect.test:
We now report a proper error if init_command fails.
Expect as much.
sql/sql_connect.cc:
If init_command fails, throw an error explaining this to
the user.
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
One can set @@global.max_user_connections to -1 to block anyone, except SUPER user, to login.
If max_user_connection is 0, one can't change it without a restart (needed to get user connections counting to work correctly)
mysql-test/r/system_mysql_db.result:
Changed max_user_connections to handle negative numbers.
mysql-test/r/user_limits-2.result:
New test case that one can't change max_user_connection if it was 0
mysql-test/r/user_limits.result:
Fixed wrong error messages.
mysql-test/r/variables.result:
Store / restore max_user_connections (needed as there is now a --master.opt file that changes it)
mysql-test/t/subselect_mat_cost-master.opt:
Enable slow query log (as this test found some errors in slow query logging)
mysql-test/t/user_limits-2.test:
New test case that one can't change max_user_connection if it was 0
mysql-test/t/user_limits-master.opt:
Set max_user_connections (as one can't change it if it was 0)
mysql-test/t/user_limits.test:
Test max_user_connections -1
mysql-test/t/variables-master.opt:
Set max_user_connections (as one can't change it if it was 0)
mysql-test/t/variables.test:
Set/restore max_user_connections
scripts/Makefile.am:
Add a text message to mysql_fix_privilege_tables.sql that it's automaticly generated
scripts/mysql_system_tables.sql:
Change max_user_connections to signed
scripts/mysql_system_tables_fix.sql:
Change max_user_connections to signed
sql/item_func.cc:
Change SHOW_INT to be signed.
(Needed for max_user_connections and it's probably a bug that it was not originally signed)
sql/log.cc:
Remove some code that was not needed (All these variables are reset at start of query)
sql/mysql_priv.h:
Made max_user_connections signed.
Added max_user_connections_checking
sql/mysqld.cc:
Added max_user_connections_checking so that we know if max_user_connections was 0 at startup
(Which means that we will not do connection counting for accounts that don't have user resource limits)
Set thd->start_utime at same time as thr_create_utime. (Before start_utime could be < thr_create_utime which lead to wrong query counting)
sql/set_var.cc:
Don't allow one to change 'max_user_connections' if it was 0 at startup.
sql/sql_acl.cc:
Change user_connection counting to be negative.
sql/sql_connect.cc:
If max_user_connections is < 0 then only SUPER user can login.
Fixed wrong variable names for error messages.
Fixed wrong initial value for questions.
Set thd->start_utime and thd->thr_create_utime at startup. Needed to get time_out_user_resource_limits() to work.
sql/sql_show.cc:
SHOW_INT is now negative
sql/sql_yacc.yy:
Support negative values for MAX_USER_CONNECTIONS
sql/structs.h:
Make user connect counting work with signed numbers.
- If USER is given, all threads for that user is signaled
- If SOFT is used then the KILL will not be sent to the handler. This can be used to not interrupt critical things in the handler like 'REPAIR'.
Internally added more kill signals. This gives us more information of why a query/connection was killed.
- KILL_SERVER is used when server is going down. In this case the users gets ER_SHUTDOWN as the reason connection was killed.
- Changed signals to number in correct order, which makes it easier to test how the signal should affect the code.
- New error message ER_CONNECTION_KILLED if connection was killed by 'KILL CONNECTION'. Before we got error ER_SHUTDOWN.
Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
include/mysql.h.pp:
Updated file
include/mysql_com.h:
Changed names of not used parameters KILL_QUERY & KILL_CONNCTION to mysql_kill() to not conflict with defines in the server
mysql-test/r/kill.result:
Added test of KILL USER
mysql-test/suite/rpl/r/rpl_stm_000001.result:
Updated error code
mysql-test/suite/rpl/t/rpl_stm_000001.test:
Updated error codes
mysql-test/t/flush_read_lock_kill.test:
Updated error codes
mysql-test/t/kill.test:
Added test of KILL USER
plugin/handler_socket/handlersocket/database.cpp:
Removed THD:: from KILL
sql/debug_sync.cc:
Removed THD:: from KILL
sql/event_scheduler.cc:
Removed THD:: from KILL
sql/filesort.cc:
Removed THD:: from KILL
sql/ha_ndbcluster_binlog.cc:
Removed THD:: from KILL
sql/handler.cc:
Removed THD:: from KILL
Simplify code.
sql/lex.h:
Added new keywords HARD | SOFT
sql/log.cc:
Removed THD:: from KILL
Added testing of new error ER_CONNECTION_KILLED
sql/log_event.cc:
Removed THD:: from KILL
Added testing of new error ER_CONNECTION_KILLED
sql/mysql_priv.h:
Added new prototypes
sql/mysqld.cc:
Removed THD:: from KILL
Use KILL_SERVER_HARD signal on shutdown.
sql/scheduler.cc:
Removed THD:: from KILL
Simplify test if connection should be killed
sql/share/errmsg.txt:
New error message ER_CONNECTION_KILLED
sql/slave.cc:
Removed THD:: from KILL
sql/sp_head.cc:
Removed THD:: from KILL
sql/sql_base.cc:
Removed THD:: from KILL
sql/sql_cache.cc:
Removed THD:: from KILL
sql/sql_class.cc:
Removed THD:: from KILL
Added killed_errno()
Only signal kill to storage engine if HARD bit is set.
sql/sql_class.h:
Move KILL options out from THD to make them easier to use in sql_yacc.yy
sql/sql_connect.cc:
Removed THD:: from KILL
sql/sql_delete.cc:
Removed THD:: from KILL
sql/sql_error.cc:
Removed THD:: from KILL
sql/sql_insert.cc:
Removed THD:: from KILL
Simplifed testing if thread is killed.
sql/sql_lex.h:
Added kill options to st_lex
sql/sql_load.cc:
Removed THD:: from KILL
sql/sql_parse.cc:
Added kill options to st_lex
Simplifed and optimzed testing of thd->killed at end of query
Added support for KILL USER
Extended sql_kill() to allow use of more kill signals.
sql/sql_repl.cc:
Removed THD:: from KILL
sql/sql_show.cc:
Removed THD:: from KILL
Simplied testing if query/connection was killed
sql/sql_table.cc:
Removed THD:: from KILL
sql/sql_update.cc:
Removed THD:: from KILL
sql/sql_yacc.yy:
Added support for new KILL syntax: KILL [HARD|SOFT] [CONNECTION|QUERY] [ID | USER user_name]
storage/archive/ha_archive.cc:
Simplify compilation
storage/maria/ha_maria.cc:
Removed THD:: from KILL
Give more information when finding an error in a MyISAM table.
When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair)
Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown.
Add more warnings about killed connections when warning level > 3
include/myisamchk.h:
Added counting of printed info/notes
mysys/mf_iocache.c:
Remove duplicate assignment
sql/handler.cc:
Added test of KILL_SERVER
sql/log.cc:
Ignore new 'kill' error ER_NEW_ABORTING_CONNECTION when requesting query error code.
sql/mysqld.cc:
Add more warnings for killed connections when warning level > 3
sql/scheduler.cc:
Added checks for new kill signals
sql/slave.cc:
Ignore new kill signal ER_NEW_ABORTING_CONNECTION
sql/sp_head.cc:
Fixed assignment to bool
Added testing of new kill signals
sql/sql_base.cc:
Use KILL_SYSTEM_THREAD to auto-kill system threads
sql/sql_class.cc:
Add more warnings for killed connections when warning level > 3
thd_killed() now ignores KILL_BAD_DATA and THD::KILL_SYSTEM_THREAD as these should not abort sensitive operations.
sql/sql_class.h:
Added KILL_SYSTEM_THREAD and KILL_SERVER
sql/sql_connect.cc:
Added handling of KILL_SERVER
sql/sql_insert.cc:
Use KILL_SYSTEM_THREAD to auto-kill system threads
Added handling of KILL_SERVER
sql/sql_parse.cc:
Add more warnings for killed connections when warning level > 3
Added checking that thd->abort_on_warning is reset at end of query.
sql/sql_show.cc:
Update condition for when a query is 'killed'
storage/myisam/ha_myisam.cc:
Added counting of info/notes printed
storage/myisam/mi_check.c:
Always print an an error if we find data errors when checking/repairing a MyISAM table.
When a repair was killed, don't retry repair.
Added assert if sort_get_next_record() returned an error without an error message.
Removed nonsence check "if (sort_param->read_cache.error < 0)" in repair.
storage/myisam/myisamchk.c:
Added counting of notes printed
storage/pbxt/src/thread_xt.cc:
Better error message.
thd->user_connect is now handled in thd->clenup() which will ensure that it works in all context (including slaves).
I added also some DBUG_ASSERT() to ensure that things are working correctly.
sql/sql_acl.cc:
Reset thd->user_connect on failed check_for_max_user_connections() to ensure we don't decrement value twice.
Removed not needed call to decrease_user_connections() as thd->cleanup() will now do it.
sql/sql_class.cc:
Call decrease_user_connections() in thd->cleanup()
sql/sql_connect.cc:
Ensure we don't allocate thd->user_connect twice.
Simplify check_for_max_user_connections().
sql/sql_parse.cc:
Ensure that thd->user_connect is handled properly in for 'change_user' command.
Split status variable Rows_read to Rows_read and Rows_tmp_read so that one can see how much real data is read.
Same was done with with Handler_update and Handler_write.
Fixed bug in MEMORY tables where some variables was counted twice.
Added new internal handler call 'ha_close()' to have one place to gather statistics.
Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table()
mysql-test/r/status.result:
Updated test results and added new tests
mysql-test/r/status_user.result:
Udated test results
mysql-test/t/status.test:
Added new test for temporary table status variables
sql/ha_partition.cc:
Changed to call ha_close() instead of close()
sql/handler.cc:
Added internal_tmp_table variable for easy checking of temporary tables.
Added new internal handler call 'ha_close()' to have one place to gather statistics.
Gather statistics for internal temporary tables.
sql/handler.h:
Added handler variables internal_tmp_table, rows_tmp_read.
Split function update_index_statistics() to two.
Added ha_update_tmp_row() for faster tmp table handling with more statistics.
sql/item_sum.cc:
ha_write_row() -> ha_write_tmp_row()
sql/multi_range_read.cc:
close() -> ha_close()
sql/mysqld.cc:
New status variables: Rows_tmp_read, Handler_tmp_update and Handler_tmp_write
sql/opt_range.cc:
close() -> ha_close()
sql/sql_base.cc:
close() -> ha_close()
sql/sql_class.cc:
Added handling of rows_tmp_read
sql/sql_class.h:
Added new satistics variables.
rows_read++ -> update_rows_read() to be able to correctly count reads to internal temp tables.
Added handler::ha_update_tmp_row()
sql/sql_connect.cc:
Added comment
sql/sql_expression_cache.cc:
ha_write_row() -> ha_write_tmp_row()
sql/sql_select.cc:
close() -> ha_close()
ha_update_row() -> ha_update_tmp_row()
sql/sql_show.cc:
ha_write_row() -> ha_write_tmp_row()
sql/sql_table.cc:
Fixed bug where thd->open_options was set to wrong value when doing admin_recreate_table()
sql/sql_union.cc:
ha_write_row() -> ha_write_tmp_row()
sql/sql_update.cc:
ha_write_row() -> ha_write_tmp_row()
sql/table.cc:
close() -> ha_close()
storage/heap/ha_heap.cc:
Removed double counting of statistic variables.
close -> ha_close() to get tmp table statistics.
storage/maria/ha_maria.cc:
close -> ha_close() to get tmp table statistics.
The problem is that clients implementing the 4.0 version of the
protocol (that is, mysql-4.0) do not null terminate a string
at the end of the authentication packet. These clients denote
the end of the string with the end of the packet.
Although this goes against the documented (see MySQL Internals
ClientServer Protocol wiki) description of the protocol, these
old clients still need to be supported.
The solution is to support the documented and actual behavior
of the clients. If a client is using the pre-4.1 version of
the protocol, the end of a string in the authentication packet
can either be denoted with a null character or by the end of
the packet. This restores backwards compatibility with old
clients implementing either the documented or actual behavior.
sql/password.c:
The scrambled message, as provided by the user, might not be
properly null terminated. If this is the case, uninitialized
memory past the end of the buffer could theoretically be
accessed. To ensure that this is never the case, copy the
scrambled message over to a null terminated auxiliar buffer.
sql/sql_connect.cc:
Use different execution paths to read strings depending on the
protocol being used. If version 4.0 of the protocol is used,
end of string can be denoted with a NUL character or by the
end of the packet.
If there are not enough bytes left after the current position
of the buffer to satisfy the current string, the string is
considered to be empty. This is required because old clients
do not send the password string field if the password is empty.
A lot of small fixes and new test cases.
client/mysqlbinlog.cc:
Cast removed
client/mysqltest.cc:
Added missing DBUG_RETURN
include/my_pthread.h:
set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
Changed to use my_hrtime()
sql/field.h:
Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
Added test to get optimal copying of identical temporal values.
sql/item.cc:
Return that item_int is equal if it's positive, even if unsigned flag is different.
Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
Don't call convert_constant_item() if there is nothing that is worth converting.
Simplified test when years should be converted
sql/item_sum.cc:
Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
Added Lazy_string_decimal()
sql/mysqld.cc:
Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
my_getsystime() -> my_interval_timer()
* my_getsystime() is only an interval timer. Its value can beused for calculating
time intervals.
* renamed my_getsystime() to my_interval_timer(), to make the semantics
clearer and let the compiler catch wrong usages of my_getsystime()
(also future ones, that may come in merges).
* increased its granularity from 100ns to 1ns, old value was for UUID,
but as UUID can no longer use it directly there is no need to downgrade
the OS provided value
* fixed the UUID code to anchor the my_interval_timer() on the epoch, as
required by the UUID standard. That is, this was only needed by UUID,
and now I've moved it to UUID code from my_getsystime().
* fixed other wrong usages of my_getsystime() - e.g. in calculating
times for pthread_cond_timedwait. It was buggy and could've caused
long waits if OS clock would be changed.
In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
So 'ha_rows' was used as 'long'.
On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
So the printf-like code was reading only the first 4 bytes.
Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
so the first four bytes yield 0. So the warning message had "row 0" instead of
"row 1" in test outfile_loaddata.test:
-Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0
All error-messaging functions which internally invoke some printf-life function
are potential candidate for such mistakes.
One apparently easy way to catch such mistakes is to use
ATTRIBUTE_FORMAT (from my_attribute.h).
But this works only when call site has both:
a) the format as a string literal
b) the types of arguments.
So:
func(ER(ER_BLAH), 10);
will silently not be checked, because ER(ER_BLAH) is not known at
compile time (it is known at run-time, and depends on the chosen
language).
And
func("%s", a va_list argument);
has the same problem, as the *real* type of arguments is not
known at this site at compile time (it's known in some caller).
Moreover,
func(ER(ER_BLAH));
though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
compile (gcc says "error: format not a string literal and no format
arguments").
Consequences:
1) ATTRIBUTE_FORMAT is here added only to functions which in practice
take "string literal" formats: "my_error_reporter" and "print_admin_msg".
2) it cannot be added to the other functions: my_error(),
push_warning_printf(), Table_check_intact::report_error(),
general_log_print().
To do a one-time check of functions listed in (2), the following
"static code analysis" has been done:
1) replace
my_error(ER_xxx, arguments for substitution in format)
with the equivalent
my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
format),
so that we have ER(ER_xxx) and the arguments *in the same call site*
2) add ATTRIBUTE_FORMAT to push_warning_printf(),
Table_check_intact::report_error(), general_log_print()
3) replace ER(xxx) with the hard-coded English text found in
errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
"Unknown error"), so that a call site has the format as string literal
4) this way, ATTRIBUTE_FORMAT can effectively do its job
5) compile, fix errors detected by ATTRIBUTE_FORMAT
6) revert steps 1-2-3.
The present patch has no compiler error when submitted again to the
static code analysis above.
It cannot catch all problems though: see Field::set_warning(), in
which a call to push_warning_printf() has a variable error
(thus, not replacable by a string literal); I checked set_warning() calls
by hand though.
See also WL 5883 for one proposal to avoid such bugs from appearing
again in the future.
The issues fixed in the patch are:
a) mismatch in types (like 'int' passed to '%ld')
b) more arguments passed than specified in the format.
This patch resolves mismatches by changing the type/number of arguments,
not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
per the following old rule: errmsg.txt must be as stable as possible; no insertions
or deletions of messages, no changes of type or number of printf-like format specifiers,
are allowed, as long as the change impacts a message already released in a GA version.
If this rule is not followed:
- Connectors, which use error message numbers, will be confused (by insertions/deletions
of messages)
- using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
could produce wrong messages or crash; such usage can easily happen if
installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
When fixing b), I have verified that the superfluous arguments were not used in the format
in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
Had they been used, then passing them today, even if the message doesn't use them
anymore, would have been necessary, as explained above.
include/my_getopt.h:
this function pointer is used only with "string literal" formats, so we can add
ATTRIBUTE_FORMAT.
mysql-test/collections/default.experimental:
test should pass now
sql/derror.cc:
by having a format as string literal, ATTRIBUTE_FORMAT check becomes effective.
sql/events.cc:
Change justified by the following excerpt from sql/share/errmsg.txt:
ER_EVENT_SAME_NAME
eng "Same old and new event name"
ER_EVENT_SET_VAR_ERROR
eng "Error during starting/stopping of the scheduler. Error code %u"
sql/field.cc:
ER_TOO_BIG_SCALE 42000 S1009
eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_PRECISION 42000 S1009
eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_DISPLAYWIDTH 42000 S1009
eng "Display width out of range for column '%-.192s' (max = %lu)"
sql/ha_ndbcluster.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
(sizeof() returns size_t)
sql/ha_ndbcluster_binlog.cc:
Too many arguments for:
ER_GET_ERRMSG
eng "Got error %d '%-.100s' from %s"
Patch by Jonas Oreland.
sql/ha_partition.cc:
print_admin_msg() is used only with a literal as format, so ATTRIBUTE_FORMAT
works.
sql/handler.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
(sizeof() returns size_t)
sql/item_create.cc:
ER_TOO_BIG_SCALE 42000 S1009
eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu."
ER_TOO_BIG_PRECISION 42000 S1009
eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu."
'c_len' and 'c_dec' are char*, passed as %d !! We don't know their value
(as strtoul() failed), but they are likely big, so we use INT_MAX.
'len' is ulong.
sql/item_func.cc:
ER_WARN_DATA_OUT_OF_RANGE 22003
eng "Out of range value for column '%s' at row %ld"
ER_CANT_FIND_UDF
eng "Can't load function '%-.192s'"
sql/item_strfunc.cc:
ER_TOO_BIG_FOR_UNCOMPRESS
eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)"
max_allowed_packet is ulong.
sql/mysql_priv.h:
sql_print_message_func is a function _pointer_.
sql/sp_head.cc:
ER_SP_RECURSION_LIMIT
eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s"
max_sp_recursion_depth is ulong
sql/sql_acl.cc:
ER_PASSWORD_NO_MATCH 42000
eng "Can't find any matching row in the user table"
ER_CANT_CREATE_USER_WITH_GRANT 42000
eng "You are not allowed to create a user with GRANT"
sql/sql_base.cc:
ER_NOT_KEYFILE
eng "Incorrect key file for table '%-.200s'; try to repair it"
ER_TOO_MANY_TABLES
eng "Too many tables; MySQL can only use %d tables in a join"
MAX_TABLES is size_t.
sql/sql_binlog.cc:
ER_UNKNOWN_ERROR
eng "Unknown error"
sql/sql_class.cc:
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
WARN_DATA_TRUNCATED 01000
eng "Data truncated for column '%s' at row %ld"
sql/sql_connect.cc:
ER_HANDSHAKE_ERROR 08S01
eng "Bad handshake"
ER_BAD_HOST_ERROR 08S01
eng "Can't get hostname for your address"
sql/sql_insert.cc:
ER_WRONG_VALUE_COUNT_ON_ROW 21S01
eng "Column count doesn't match value count at row %ld"
sql/sql_parse.cc:
ER_WARN_HOSTNAME_WONT_WORK
eng "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work"
ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT
eng "Too high level of nesting for select"
ER_UNKNOWN_ERROR
eng "Unknown error"
sql/sql_partition.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_plugin.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_prepare.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
ER_UNKNOWN_STMT_HANDLER
eng "Unknown prepared statement handler (%.*s) given to %s"
length value (for '%.*s') must be 'int', per the doc of printf()
and the code of my_vsnprintf().
sql/sql_show.cc:
ER_OUTOFMEMORY HY001 S1001
eng "Out of memory; restart server and try again (needed %d bytes)"
sql/sql_table.cc:
ER_TOO_BIG_FIELDLENGTH 42000 S1009
eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead"
sql/table.cc:
ER_NOT_FORM_FILE
eng "Incorrect information in file: '%-.200s'"
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error."
table->s->mysql_version is ulong.
sql/unireg.cc:
ER_TOO_LONG_TABLE_COMMENT
eng "Comment for table '%-.64s' is too long (max = %lu)"
ER_TOO_LONG_FIELD_COMMENT
eng "Comment for field '%-.64s' is too long (max = %lu)"
ER_TOO_BIG_ROWSIZE 42000
eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs"
Certain fields in the protcol required a strict formatting. If
off bound values were sent to the server this could under some
circumstances lead to a crash on the Windows platform.
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria
Now need to merge with latest xtradb before pushing
sql/ha_partition.cc:
Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
Changed to use opt_stack_trace instead of opt_pstack.
Removed references to pstack
sql/partition_element.h:
Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
Fixed wrong assert
A separate fix for 5.1 (as 5.1 and 5.5 have seriously
differged in the related pieces of the code).
A patch for 5.5 was approved earlier.
Problem: ucs2 was correctly disallowed in "SET NAMES" only,
while mysql_real_connect() and mysql_change_user() still allowed
to use ucs2, which made server crash.
Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().
@ sql/sql_priv.h
- changing return type for thd_init_client_charset() to bool,
to return errors to the caller
@ sql/sql_var.cc
- using new function
@ sql/sql_connect.cc
- thd_client_charset_init:
in case of unsupported client character set send error and return true;
in case of success return false
- check_connection:
Return error if character set initialization failed
@ sql/sql_parse.cc
- check charset in the very beginnig of the CMD_CHANGE_USER handling code
@ tests/mysql_client_test.c
- adding tests
Problem: ucs2 was correctly disallowed in "SET NAMES" only,
while mysql_real_connect() and mysql_change_user() still allowed
to use ucs2, which made server crash.
Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().
@ sql/set_var.cc
Using new function.
@ sql/sql_acl.cc
- Return error if character set initialization failed
- Getting rid of pointer aliasing:
Initialize user_name to NULL, to avoid double free().
@ sql/sql_connect.cc
- in case of unsupported client character set send error and return true
- in case of success return false
@ sql/sql_connect.h
- changing return type for thd_init_client_charset() to bool,
to return errors to the caller
@ sql/sql_parse.h
- introducing a new function, to reuse in all places where we need
to check client character set.
@ tests/mysql_client_test.c
Adding test
The problem is a race between a session closing its vio
(i.e. after a COM_QUIT) at the same time it is being killed by
another thread. This could trigger a assertion in vio_close()
as the two threads could end up closing the same vio, at the
same time. This could happen due to the implementation of
SIGNAL_WITH_VIO_CLOSE, which closes the vio of the thread
being killed.
The solution is to serialize the close of the Vio under
LOCK_thd_data, which protects THD data.
No regression test is added as this is essentially a debug
issue and the test case would be quite convoluted as we would
need to synchronize a session that is being killed -- which
is a bit difficult since debug sync points code does not
synchronize killed sessions.
sql/mysqld.cc:
Drop lock parameter from close_connection, its not necessary
any more. The newly introduced THD::disconnect method will take
care of locking.
sql/mysqld.h:
Change prototype, add a default parameter for the error code.
sql/sql_class.cc:
In case SIGNAL_WITH_VIO_CLOSE is defined, the active vio is
closed and cleared. Subsequent calls will only close the vio
owned by the session.
Fixed the references to security_ctx->priv_user
to be real char * pointers instead of a C array name reference.
This is somehow important for some 3d party
dtrace replacements
include/mysql/plugin_audit.h:
Connection auditing class.
include/mysql/plugin_audit.h.pp:
Connection auditing class.
sql/mysqld.cc:
Notify disconnect to auditing.
sql/sql_audit.cc:
Connection class event dispatcher.
sql/sql_audit.h:
mysql_audit_notify() is not available in embedded.
sql/sql_connect.cc:
Notify connect to auditing.
sql/sql_parse.cc:
Notify user change to auditing.
MySQL 5.1 server
Server used to clip overly long user-names. This was presumably lost
when code was made UTF8-clean.
Now we emulate the behaviour for backward compatibility, but UTF8-ly
correct.
mysql-test/r/connect.result:
Show that user-names that are too long get clipped now.
mysql-test/t/connect.test:
Show that user-names that are too long get clipped now.
sql/sql_connect.cc:
Clip user-name to 16 characters (not bytes).
strings/CHARSET_INFO.txt:
Clarify in docs.
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
Nicer output from mysql_upgrade and mysql_check
Updated all arrays that used NAME_LEN to use SAFE_NAME_LEN to ensure that we don't break things accidently as names can now have a #mysql50# prefix.
client/mysql_upgrade.c:
If we are using verbose, also run mysqlcheck in verbose mode.
client/mysqlcheck.c:
Add more information if running in verbose mode
Print 'Needs upgrade' instead of complex error if table needs to be upgraded
Don't write connect information if verbose is not 2 or above
mysql-test/r/drop.result:
Updated test and results as we now support full table names
mysql-test/r/grant.result:
Now you get a correct error message if using #mysql with paths
mysql-test/r/show_check.result:
Update results as table names can temporarly be bigger than NAME_LEN (during upgrade)
mysql-test/r/upgrade.result:
Test upgrade for long table names.
mysql-test/suite/funcs_1/r/is_tables_is.result:
Updated old test result (had note been updated in a while)
mysql-test/t/drop.test:
Updated test and results as we now support full table names
mysql-test/t/grant.test:
Now you get a correct error message if using #mysql with paths
mysql-test/t/upgrade.test:
Test upgrade for long table names.
sql/ha_partition.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/item.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/log_event.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/mysql_priv.h:
Added SAFE_NAME_LEN
sql/rpl_filter.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sp_head.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_acl.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_base.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_connect.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_parse.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_prepare.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_select.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_show.cc:
NAME_LEN -> SAFE_NAME_LEN
Enlarge table names for SHOW TABLES to also include optional #mysql50#
sql/sql_table.cc:
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
sql/sql_trigger.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_udf.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/sql_view.cc:
NAME_LEN -> SAFE_NAME_LEN
sql/table.cc:
Fixed check_table_name() to not count #mysql50# as part of name
If #mysql50# is part of the name, don't allow path characters in name.
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
In order to allow thread schedulers to be dynamically loaded,
it is necessary to make the following changes to the server:
- Two new service interfaces
- Modifications to InnoDB to inform the thread scheduler of state changes.
- Changes to the VIO subsystem for checking if data is available on a socket.
- Elimination of remains of the old thread pool implementation.
The two new service interfaces introduces are:
my_thread_scheduler
A service interface to register a thread
scheduler.
thd_wait
A service interface to inform thread scheduler
that the thread is about to start waiting.
In addition, the patch adds code that:
- Add a call to thd_wait for table locks in mysys
thd_lock.c by introducing a set function that
can be used to set a callback to be used when
waiting on a lock and resuming from waiting.
- Calling the mysys set function from the server
to set the callbacks correctly.
NET::skip_big_packet isn't defined for the embedded server,
hide it in such a case.
sql/sql_connect.cc:
Fix for bug #53912: Fails to build from source
- hide net.skip_big_packet for the embedded server,
as it isn't defined there.
Conflicts:
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/t/explain.test
Text conflict in sql/net_serv.cc
Text conflict in sql/sp_head.cc
Text conflict in sql/sql_priv.h
ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0
Bug#13174: SHA2 function
Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle
Implement SHA2 functions.
Chad added code to make it work with YaSSL. Also, he removed the
(probable) bug of embedded server never using SSL-dependent
functions. (libmysqld/Makefile.am didn't read ANY autoconf defs.)
Function specification:
SHA2( string cleartext, integer hash_length )
-> string hash, or NULL
where hash_length is one of 224, 256, 384, or 512. If either is
NULL or a length is unsupported, then the result is NULL. The
resulting string is always the length of the hash_length parameter
or is NULL.
Include the canonical hash examples from the NIST in the test
results.
---
Polish and address concerns of reviewers.
.bzrignore:
Added libmysqld/sha2.cc to the ignore list.
client/mysql.cc:
Add condition to remove code for embedded server.
client/mysqltest.cc:
Add condition to remove code for embedded server.
include/Makefile.am:
New header file to header list.
include/mysql_embed.h:
Embedded servers can use SSL-library functions too!
include/sha2.h:
Compatibility layer to make YaSSL behave like OpenSSL.
include/sslopt-case.h:
Remove SSL-communication parameters from command lines.
include/sslopt-longopts.h:
Remove SSL-communication parameters from command lines.
include/sslopt-vars.h:
Don't declare variables that are only used in SSL communication, if
we are compiling the embedded server.
include/violite.h:
Don't even compile the SSL-communication function if we're in the
embedded server.
---
Remove CPP condition indentation.
libmysqld/CMakeLists.txt:
Add new file to source list.
libmysqld/Makefile.am:
Include standard DEFS in embedded compilation. It's an undiscovered
but that it's not there.
Add new file to source list.
libmysqld/examples/Makefile.am:
Include autoconf DEFS.
libmysqld/lib_sql.cc:
Initialize SSL-related variables in embedded server.
mysql-test/include/have_ssl_crypto_functs.inc:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/r/func_digest.result:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
mysql-test/r/func_encrypt_nossl.result:
Update results to the new error message text.
mysql-test/r/have_ssl_is_yes_or_disabled_only.require:
Distinguish between communication and crypto.
Use the tristate value of "have_ssl" variable to know whether to
test or not for SSL-provided crypto functions.
mysql-test/suite/rpl/t/rpl_ssl.test:
Distinguish between communication and crypto.
mysql-test/suite/rpl/t/rpl_ssl1.test:
Distinguish between communication and crypto.
mysql-test/t/func_des_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/func_digest.test:
Test against the sample test vectors in the NIST Secure
Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
Also, test that various parameters (legal and illegal)
do what we expect.
---
Distinguish between communication and crypto.
mysql-test/t/func_encrypt.test:
Distinguish between communication and crypto.
mysql-test/t/openssl_1.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl-big.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_8k_key.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_compress.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
mysql-test/t/ssl_connect.test:
Don't test SSL communication if we're in the embedded server.
---
Distinguish between communication and crypto.
sql-common/client.c:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/CMakeLists.txt:
Add new source file to source list so that we have access to SHA2
functions.
sql/Makefile.am:
Add new source file to source list so that we have access to SHA2
functions.
sql/item_create.cc:
Bootstrap the SHA2 function into the server.
sql/item_strfunc.cc:
Add new SHA2 Item class methods.
Clean up two minor problems.
---
Remove extraneous debugging.
---
We must check nullness of a parameter only /after/ computing its
value.
sql/item_strfunc.h:
Declare new SHA2 Item class.
sql/mysqld.cc:
For embedded server, don't refer to SSL-communications variables
or values.
---
Remove CPP condition indentation.
sql/sha2.cc:
Compatibility layer to make YaSSL behave like OpenSSL.
---
Add comment for generated functions.
sql/sql_acl.cc:
For embedded server, don't refer to SSL-communications variables
or values.
sql/sql_connect.cc:
SSL is useful for more functionality than just connecting. Test
for whether we are not embedded server also.
sql/sys_vars.cc:
For embedded server, don't refer to SSL-communications variables
or values.
Adding my_global.h first in all files using
NO_EMBEDDED_ACCESS_CHECKS.
Correcting a merge problem resulting from a changed definition
of check_some_access compared to the original patches.
This patch:
- Moves all definitions from the mysql_priv.h file into
header files for the component where the variable is
defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
Makefile.am:
add new API files to the check_abi rule,
remove duplicates
client/CMakeLists.txt:
now a client can use dlopen too
client/Makefile.am:
be csh-friendly
include/my_global.h:
add dummy plugs for dlopen and co.
for the code that needs them to work in static builds
mysys/Makefile.am:
be csh-friendly
plugin/auth/dialog.c:
typo fixed
Fixed bug in Yassle to get correct error messages in case of errors
Provide better error messages in case of ssl connect failure
Updated out-of-date ssl certificates to fix failing mysql-test-system (certificates now active for 10 years)
Fixed bug in query_cache that could cause asserts and hangs in DEBUG builds.
Fixed bug where one connection did not see changes done by another connection.
configure.in:
Changed version number from RC to stable
extra/yassl/src/yassl_error.cpp:
Fixed bug in Yassle to get correct error messages in case of errors
- 'error' is an enum that hold more error numbers than the enum was defined for
include/violite.h:
Added error output string for sslaccept() and sslconnect() to get reason for connect failure
mysql-test/mysql-test-run.pl:
Write failed test cases if mysql-test-run fails because of too many errors
mysql-test/r/grant.result:
Update results to reflect new certificates
mysql-test/r/openssl_1.result:
Update results to reflect new certificates
mysql-test/std_data/cacert.pem:
Update ssl certificate
mysql-test/std_data/client-cert.pem:
Update ssl certificate
mysql-test/std_data/client-key.pem:
Update ssl certificate
mysql-test/std_data/server-cert.pem:
Update ssl certificate
mysql-test/std_data/server-key.pem:
Update ssl certificate
mysql-test/t/grant.test:
Update test to reflect new certificates
mysql-test/t/openssl_1.test:
Update test to reflect new certificates
mysql-test/t/query_cache_debug.test:
Remove 'big_test' as test is now fast
sql-common/client.c:
Give a better error message if ssl connect fails
sql/net_serv.cc:
Fixed compiler warnings
sql/slave.cc:
Give a better error message in logs if ssl connect fails
sql/sql_cache.cc:
debug_wait_for_kill() now removes the set watch variable after kill signal
This is needed as invalidate_table() may be called twice for one query.
Ensure that net->query_cache_query is reset after query. This fixes assert in
query_cache_end_of_result() if query_cache_query holds results from previous query.
Removed DBUG_ASSERT(0), as this code can be run by query_cache_debug.test
sql/sql_connect.cc:
Give a better error message if ssl connect fails
sql/sql_parse.cc:
Fixed bug where one connection did not see changes done by another connection.
For statements that changes tables, close_thread_tables() MUST be called before
sending OK as a table handler may not make the changes available for other connections
before unlock_tables().
vio/viossl.c:
Give a better error message if ssl connect fails
Conflicts:
Conflict adding files to server-tools. Created directory.
Conflict because server-tools is not versioned, but has versioned children. Versioned directory.
Conflict adding files to server-tools/instance-manager. Created directory.
Conflict because server-tools/instance-manager is not versioned, but has versioned children. Versioned directory.
Contents conflict in server-tools/instance-manager/instance_map.cc
Contents conflict in server-tools/instance-manager/listener.cc
Contents conflict in server-tools/instance-manager/options.cc
Contents conflict in server-tools/instance-manager/user_map.cc
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies
CMakeLists.txt:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
client/mysql.cc:
don't crash with --show-warnings when mysqld dies
config/ac-macros/plugins.m4:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
include/my_getopt.h:
comments
include/my_pthread.h:
fix double #define
mysql-test/mysql-test-run.pl:
run sys_vars suite by default
properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0
escape gdb command line arguments
mysql-test/suite/sys_vars/r/rpl_init_slave_func.result:
init_slave+utf8 bug
mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
init_slave+utf8 bug
mysys/my_getopt.c:
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
mysys/typelib.c:
support for flagset
sql/ha_ndbcluster.cc:
backport from telco tree
sql/item_func.cc:
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
sql/sql_builtin.cc.in:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
sql/sql_plugin.cc:
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#32902 plugin variables don't know their names
Bug#44797 plugins w/o command-line options have no disabling option in --help
sql/sys_vars.cc:
all server variables are defined here
storage/myisam/ft_parser.c:
remove unnecessary updates of param->quot
storage/myisam/ha_myisam.cc:
myisam_* variables belong here
strings/my_vsnprintf.c:
%o and %llx
unittest/mysys/my_vsnprintf-t.c:
%o and %llx tests
vio/viosocket.c:
bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
WL#3771
"Audit Plugin Interface"
Implement new plug-in type - AUDIT
New plug-in: audit_null
simply increments counter for how many times it was called.
include/Makefile.am:
wl3771
add new headers to distribution
include/mysql/plugin.h:
wl3771
define new AUDIT plugin type
Split out fulltext plugin type into its own header
include/mysql/plugin.h.pp:
wl3771
no real API change, just re-arranged some code
include/mysql/plugin_audit.h:
wl3771
pluggable audit interface
include/mysql/plugin_ftparser.h:
wl3771
Split out fulltext plugin type into its own header
libmysqld/CMakeLists.txt:
wl3771
add sql_audit.cc to build
libmysqld/Makefile.am:
wl3771
add sql_audit.cc to build
plugin/audit_null:
wl3771
an example plugin for testing pluggable audit interface
plugin/audit_null/Makefile.am:
wl3771
an example plugin for testing pluggable audit interface
plugin/audit_null/audit_null.c:
wl3771
an example plugin for testing pluggable audit interface
plugin/audit_null/plug.in:
wl3771
an example plugin for testing pluggable audit interface
sql/CMakeLists.txt:
wl3771
add sql_audit.cc to build
sql/Makefile.am:
wl3771
add sql_audit.cc to build
sql/event_queue.cc:
wl3771
release audit resources before waiting
sql/log.cc:
wl3771
add general audit call for log
sql/mysqld.cc:
wl3771
add audit initialize/finalize
add general audit call for error
sql/sql_audit.cc:
wl3771
pluggable audit interface implementation
sql/sql_audit.h:
wl3771
pluggable audit interface implementation
sql/sql_class.cc:
wl3771
add thd audit init/deinit calls
sql/sql_class.h:
wl3771
add required data structures for audit to THD
sql/sql_connect.cc:
wl3771
release audit resources before waiting
sql/sql_insert.cc:
wl3771
release audit plugins before waiting
sql/sql_parse.cc:
wl3771
add general audit call for results
sql/sql_plugin.cc:
wl3771
add declarations for audit plugin type
2630.39.1, 2630.28.29, 2630.34.3, 2630.34.2, 2630.34.1, 2630.29.29,
2630.29.28, 2630.31.1, 2630.28.13, 2630.28.10, 2617.23.14 and
some other minor revisions.
This patch implements:
WL#4264 "Backup: Stabilize Service Interface" -- all the
server prerequisites except si_objects.{h,cc} themselves (they can
be just copied over, when needed).
WL#4435: Support OUT-parameters in prepared statements.
(and all issues in the initial patches for these two
tasks, that were discovered in pushbuild and during testing).
Bug#39519: mysql_stmt_close() should flush all data
associated with the statement.
After execution of a prepared statement, send OUT parameters of the invoked
stored procedure, if any, to the client.
When using the binary protocol, send the parameters in an additional result
set over the wire. When using the text protocol, assign out parameters to
the user variables from the CALL(@var1, @var2, ...) specification.
The following refactoring has been made:
- Protocol::send_fields() was renamed to Protocol::send_result_set_metadata();
- A new Protocol::send_result_set_row() was introduced to incapsulate
common functionality for sending row data.
- Signature of Protocol::prepare_for_send() was changed: this operation
does not need a list of items, the number of items is fully sufficient.
The following backward incompatible changes have been made:
- CLIENT_MULTI_RESULTS is now enabled by default in the client;
- CLIENT_PS_MULTI_RESUTLS is now enabled by default in the client.
include/mysql.h:
Add a new flag to MYSQL_METHODS::flush_use_result
function pointer. This flag determines if all results
should be flushed or only the first one:
- if flush_all_results is TRUE, then cli_flush_use_result()
will read/flush all pending results. I.e. it will read
all packets while server status attribute indicates that
there are more results. This is a new semantic, required
to fix the bug.
- if flush_all_results is FALSE, the old sematic
is preserved -- i.e. cli_flush_use_result() reads data
until first EOF-packet.
include/mysql.h.pp:
Update the ABI with new calls (compatible changes).
include/mysql_com.h:
Add CLIENT_PS_OUT_PARAMS -- a client capability indicating that the client supportsю
libmysql/libmysql.c:
Add mysql_stmt_next_result() -- analogue of mysql_next_result() for binary protocol.
Fix a minor bug in alloc_fields() -- not all members were copied over,
and some only shallow-copied (catalog).
Flush all results in mysql_stmt_close() (Bug#39519).
libmysqld/lib_sql.cc:
Rename send_fields() -> send_result_set_metadata().
Refactoring: change prepare_for_send() so that it accepts only
what it really needs -- a number of elements in the list.
mysql-test/r/ps.result:
Update results: WL#4435.
mysql-test/t/ps.test:
WL#4435: A test case for an SQL-part of the problem.
sql-common/client.c:
Bug#39519.
Implement new functionality in cli_flush_use_result():
if flush_all_delete is TRUE, then it should read/flush
all pending results.
sql/Makefile.am:
Add a new header sql_prepare.h to the list
of build headers.
sql/events.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/handler.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/mysql_priv.h:
Move sql_prepare.cc-specific declarations to a new
header - sql_prepare.h.
sql/procedure.h:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/protocol.cc:
Move the logic responsible for sending of one result
set row to the Protocol class. Define a template
for end-of-statement action.
Refactoring: change prepare_for_send() so that it accepts
only what it really needs -- a number of elements in the list.
Rename send_fields() to send_result_set_metadata().
sql/protocol.h:
Update with new declarations (WL#4435).
Rename send_fields() -> send_result_set_metadata().
prepare_for_send() only needs the number of columns to send,
and doesn't use the item list - update signature to require
only what's needed.
Add a new protocol type -- Protocol_local.
sql/repl_failsafe.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/slave.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_acl.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_base.cc:
Include sql_prepare.h (for Reprepare_observer).
sql/sql_cache.cc:
Extend the query cache flags block to be able
to store a numeric id for the result format,
not just a flag binary/non-binary.
sql/sql_class.cc:
Update to use the rename of Protocol::send_fields()
to Protocol::send_result_set_metadata().
Use Protocol::send_one_result_set_row().
sql/sql_class.h:
Move the declaration of Reprepare_observer to the
new header - sql_prepare.h.
Update to the new signature of class Protocol::send_fields().
sql/sql_connect.cc:
Use a protocol template method instead of
raw NET layer API at the end of a statement.
sql/sql_cursor.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_error.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_handler.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
Use new method Protocol::send_one_result_set_row().
sql/sql_help.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_lex.cc:
Initialize multi_statements variable.
Add a handy constant for empty lex
string.
sql/sql_lex.h:
Add a separate member for a standalone
parsing option - multi-statements support.
sql/sql_list.cc:
sql_list.h is a standalone header now,
no need to include mysql_priv.h.
sql/sql_list.h:
Make sql_list.h a stand-alone header.
sql/sql_parse.cc:
Include sql_prepare.h for prepared
statements- related declarations.
Use a new Protocol template method to end
each statement (send OK, EOF or ERROR to
the client).
sql/sql_prepare.cc:
Implement Execute Direct API (WL#4264),
currently unused. It will be used by the service
interface (Backup).
Use a new header - sql_prepare.h.
Add support for OUT parameters in the
binary and text protocol (prepared statements
only).
sql/sql_prepare.h:
Add a new header to contain (for now)
all prepared statement- external
related declarations.
sql/sql_profile.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_repl.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_select.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_show.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_string.h:
Add a way to convert a String to LEX_STRING.
sql/sql_table.cc:
Rename: Protocol::send_fields() ->
Protocol::send_result_set_metadata().
sql/sql_update.cc:
Remove an extraneous my_error(). The error
is already reported in update_non_unique_table_error().
sql/sql_yacc.yy:
Support for multi-statements is an independent
property of parsing, not derived from
the protocol type.
tests/mysql_client_test.c:
Add tests for WL#4435 (binary protocol).
------------------------------------------------------------
revno: 2476.714.9
committer: markleith@medusa.mysql.com
timestamp: Mon 2007-09-03 23:18:50 +0100
message:
Bug#25822 / WL#3953 - Log Access Denied errors for bad passwords in the error log
Added logging of Access Denied messages on failed new connections to the
error log when log-warnings = 2.
This allows a user to log these messages without having to incur the overhead
of using the general query log on production systems.
------------------------------------------------------------
The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple.
This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture.
Added new status variables:
- Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
- Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read
Added new variable / startup option 'userstat' to control if user statistics should be enabled or not
Added my_getcputime(); Returns cpu time used by this thread.
New FLUSH commands:
- FLUSH SLOW QUERY LOG
- FLUSH TABLE_STATISTICS
- FLUSH INDEX_STATISTICS
- FLUSH USER_STATISTICS
- FLUSH CLIENT_STATISTICS
New SHOW commands:
- SHOW CLIENT_STATISTICS
- SHOW USER_STATISTICS
- SHOW TABLE_STATISTICS
- SHOW INDEX_STATISTICS
New Information schemas:
- CLIENT_STATISTICS
- USER_STATISTICS
- INDEX_STATISTICS
- TABLE_STATISTICS
Added support for all new flush commands to mysqladmin
Added handler::ha_... wrappers for all handler read calls to do statistics counting
- Changed all code to use new ha_... calls
- Count number of read rows, changed rows and rows read trough an index
Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written)
Added counting of access denied errors (status variable Access_denied_erors)
Bugs fixed:
- Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
- CLOCK_GETTIME was not propely working on Linuxm
client/mysqladmin.cc:
Added support for all new flush commmands and some common combinations:
flush-slow-log
flush-table-statistics
flush-index-statistics
flush-user-statistics
flush-client-statistics
flush-all-status
flush-all-statistics
configure.in:
Added checking if clock_gettime needs the librt.
(Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix)
include/my_sys.h:
Added my_getcputime()
include/mysql_com.h:
Added LIST_PROCESS_HOST_LEN & new REFRESH target defines
mysql-test/r/information_schema.result:
New information schema tables added
mysql-test/r/information_schema_all_engines.result:
New information schema tables added
mysql-test/r/information_schema_db.result:
New information schema tables added
mysql-test/r/log_slow.result:
Added testing that flosh slow query logs is accepted
mysql-test/r/status_user.result:
Basic testing of user, client, table and index statistics
mysql-test/t/log_slow.test:
Added testing that flosh slow query logs is accepted
mysql-test/t/status_user-master.opt:
Ensure that we get a fresh restart before running status_user.test
mysql-test/t/status_user.test:
Basic testing of user, client, table and index statistics
mysys/my_getsystime.c:
Added my_getcputime()
Returns cpu time used by this thread.
sql/authors.h:
Updated authors to have core and original MySQL developers first.
sql/event_data_objects.cc:
Updated call to mysql_reset_thd_for_next_command()
sql/event_db_repository.cc:
Changed to use new ha_... calls
sql/filesort.cc:
Changed to use new ha_... calls
sql/ha_partition.cc:
Changed to use new ha_... calls
Fixed comment syntax
sql/handler.cc:
Changed to use new ha_... calls
Reset table statistics
Added code to update global table and index status
Added counting of rows changed
sql/handler.h:
Added table and index statistics variables
Added function reset_statistics()
Added handler::ha_... wrappers for all handler read calls to do statistics counting
Protected all normal read calls to ensure we use the new calls in the server.
Made ha_partition a friend class so that partition code can call the old read functions
sql/item_subselect.cc:
Changed to use new ha_... calls
sql/lex.h:
Added keywords for new information schema tables and flush commands
sql/log.cc:
Added flush_slow_log()
Added counting of number of bytes sent to binary log
Removed not needed test of thd (It's used before, so it's safe to use)
Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting
sql/log.h:
Added new parameter to write_cache()
Added flush_slow_log() functions.
sql/log_event.cc:
Updated call to mysql_reset_thd_for_next_command()
Changed to use new ha_... calls
sql/log_event_old.cc:
Updated call to mysql_reset_thd_for_next_command()
Changed to use new ha_... calls
sql/mysql_priv.h:
Updated call to mysql_reset_thd_for_next_command()
Added new statistics functions and variables needed by these.
sql/mysqld.cc:
Added new statistics variables and structures to handle these
Added new status variables:
- Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
- Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read
Added new option 'userstat' to control if user statistics should be enabled or not
sql/opt_range.cc:
Changed to use new ha_... calls
sql/opt_range.h:
Changed to use new ha_... calls
sql/opt_sum.cc:
Changed to use new ha_... calls
sql/records.cc:
Changed to use new ha_... calls
sql/set_var.cc:
Added variable 'userstat'
sql/sp.cc:
Changed to use new ha_... calls
sql/sql_acl.cc:
Changed to use new ha_... calls
Added counting of access_denied_errors
sql/sql_base.cc:
Added call to statistics functions
sql/sql_class.cc:
Added usage of org_status_var, to store status variables at start of command
Added functions THD::update_stats(), THD::update_all_stats()
Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
sql/sql_class.h:
Added new status variables to status_var
Moved variables that was not ulong in status_var last.
Added variables to THD for storing temporary values during statistics counting
sql/sql_connect.cc:
Variables and functions to calculate user and client statistics
Added counting of access_denied_errors and lost_connections
sql/sql_cursor.cc:
Changed to use new ha_... calls
sql/sql_handler.cc:
Changed to use new ha_... calls
sql/sql_help.cc:
Changed to use new ha_... calls
sql/sql_insert.cc:
Changed to use new ha_... calls
sql/sql_lex.h:
Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS
sql/sql_parse.cc:
Added handling of:
- SHOW CLIENT_STATISTICS
- SHOW USER_STATISTICS
- SHOW TABLE_STATISTICS
- SHOW INDEX_STATISTICS
Added handling of new FLUSH commands:
- FLUSH SLOW QUERY LOGS
- FLUSH TABLE_STATISTICS
- FLUSH INDEX_STATISTICS
- FLUSH USER_STATISTICS
- FLUSH CLIENT_STATISTICS
Added THD parameter to mysql_reset_thd_for_next_command()
Added initialization and calls to user statistics functions
Added increment of statistics variables empty_queries, rows_sent and access_denied_errors.
Added counting of cpu time per query
sql/sql_plugin.cc:
Changed to use new ha_... calls
sql/sql_prepare.cc:
Updated call to mysql_reset_thd_for_next_command()
sql/sql_select.cc:
Changed to use new ha_... calls
Indentation changes
sql/sql_servers.cc:
Changed to use new ha_... calls
sql/sql_show.cc:
Added counting of access denied errors
Added function for new information schema tables:
- CLIENT_STATISTICS
- USER_STATISTICS
- INDEX_STATISTICS
- TABLE_STATISTICS
Changed to use new ha_... calls
sql/sql_table.cc:
Changed to use new ha_... calls
sql/sql_udf.cc:
Changed to use new ha_... calls
sql/sql_update.cc:
Changed to use new ha_... calls
sql/sql_yacc.yy:
Add new show and flush commands
sql/structs.h:
Add name_length to KEY to avoid some strlen
Added cache_name to KEY for fast storage of keyvalue in cache
Added structs USER_STATS, TABLE_STATS, INDEX_STATS
Added function prototypes for statistics functions
sql/table.cc:
Store db+table+index name into keyinfo->cache_name
sql/table.h:
Added new information schema tables
sql/tztime.cc:
Changed to use new ha_... calls
revno: 2630.2.16
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-runtime
timestamp: Fri 2008-06-27 13:26:03 +0400
message:
Fix max_user_connections_func failure on Solaris.
A connection that failed to log in due to a resource limit could
be returned to the thread pool with a dangling link to user_connect
structure of an old user. Later on it could be authenticated
to a user that doesn't have a resource limit, so this dangling
link won't be reset. --pool-of-threads mode made the situation
easy to reproduce, and thus highlighted a bug that has been
around forever.
Make sure there are no dangling links.
sql/sql_connect.cc:
Do not return a connection structure to the thread pool with a dangling link.
http://lists.mysql.com/commits/59686
Cleanup pthread_self(), pthread_create(), pthread_join() implementation on Windows.
Prior implementation is was unnecessarily complicated and even differs in embedded
and non-embedded case.
Improvements in this patch:
* pthread_t is now the unique thread ID, instead of HANDLE returned by beginthread
This simplifies pthread_self() to be just straight GetCurrentThreadId().
prior it was much art involved in passing the beginthread() handle from the caller
to the TLS structure in the child thread ( did not work for the main thread of
course)
* remove MySQL specific my_thread_init()/my_thread_end() from pthread_create.
No automagic is done on Unix on pthread_create(). Having the same on Windows will
improve portability and avoid extra #ifdef's
* remove redefinition of getpid() - it was defined as GetCurrentThreadId()
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
newer testsuite). They are expected to go after mergning with the latest
xtradb.
bzr branch mysql-5.1-performance-version mysql-trunk # Summit
cd mysql-trunk
bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin
bzr rm innobase # remove the builtin
Next step: build, test fixes.
variable. The problem was that THD::connect_utime could be
used without being initialized when the main thread is used
to handle connections (--thread-handling=no-threads).
sql/mysqld.cc:
Set THD::start_utime even in no-threads handling mode.
sql/sql_class.cc:
Initialize variable.
sql/sql_class.h:
Rename connect_utime to prior_thr_create_utime as to
better reflect it's use intention.
sql/sql_connect.cc:
Check only if a thread was actually created.
This is a backport of code from MySQL 6.0 with cleanups and extensions
The following new options are supported
configure options:
--with-libevent ; Enable use of libevent, which is needed for pool of threads
mysqld options:
--thread-handling=pool-of-threads ; Use a pool of threads to handle queries
--thread-pool-size=# ; Define how many threads should be created to handle all queries
--extra-port=# ; Extra tcp port that uses the old one-thread-per-connection method
--extra-max-connections=# ; Number of connections to accept to 'extra-port'
--test-ignore-wrong-options ; Ignore setting an enum value to a wrong option (for mysql-test-run)
BUILD/SETUP.sh:
Added libevents (and thus pool-of-threads) to max builds
CMakeLists.txt:
Added libevent
Makefile.am:
Added libevents
config/ac-macros/libevent.m4:
Libevent code for configure
config/ac-macros/libevent_configure.m4:
Libevent code for configure
configure.in:
Added libevents
dbug/dbug.c:
Added _db_is_pushed(); Needed for pool-of-threads code
extra/Makefile.am:
Added libevents
extra/libevent:
Libevent initial code
extra/libevent/CMakeLists.txt:
Libevent initial code
extra/libevent/Makefile.am:
Libevent initial code
extra/libevent/README:
Libevent initial code
extra/libevent/WIN32-Code:
Libevent initial code
extra/libevent/WIN32-Code/config.h:
Libevent initial code
extra/libevent/WIN32-Code/misc.c:
Libevent initial code
extra/libevent/WIN32-Code/misc.h:
Libevent initial code
extra/libevent/WIN32-Code/tree.h:
Libevent initial code
extra/libevent/WIN32-Code/win32.c:
Libevent initial code
extra/libevent/buffer.c:
Libevent initial code
extra/libevent/compat:
Libevent initial code
extra/libevent/compat/sys:
Libevent initial code
extra/libevent/compat/sys/_time.h:
Libevent initial code
extra/libevent/compat/sys/queue.h:
Libevent initial code
extra/libevent/compat/sys/tree.h:
Libevent initial code
extra/libevent/devpoll.c:
Libevent initial code
extra/libevent/epoll.c:
Libevent initial code
extra/libevent/epoll_sub.c:
Libevent initial code
extra/libevent/evbuffer.c:
Libevent initial code
extra/libevent/evdns.c:
Libevent initial code
extra/libevent/evdns.h:
Libevent initial code
extra/libevent/event-config.h:
Libevent initial code
extra/libevent/event-internal.h:
Libevent initial code
extra/libevent/event.c:
Libevent initial code
extra/libevent/event.h:
Libevent initial code
extra/libevent/event_tagging.c:
Libevent initial code
extra/libevent/evhttp.h:
Libevent initial code
extra/libevent/evport.c:
Libevent initial code
extra/libevent/evrpc-internal.h:
Libevent initial code
extra/libevent/evrpc.c:
Libevent initial code
extra/libevent/evrpc.h:
Libevent initial code
extra/libevent/evsignal.h:
Libevent initial code
extra/libevent/evutil.c:
Libevent initial code
extra/libevent/evutil.h:
Libevent initial code
extra/libevent/http-internal.h:
Libevent initial code
extra/libevent/http.c:
Libevent initial code
extra/libevent/kqueue.c:
Libevent initial code
extra/libevent/log.c:
Libevent initial code
extra/libevent/log.h:
Libevent initial code
extra/libevent/min_heap.h:
Libevent initial code
extra/libevent/poll.c:
Libevent initial code
extra/libevent/select.c:
Libevent initial code
extra/libevent/signal.c:
Libevent initial code
extra/libevent/strlcpy-internal.h:
Libevent initial code
extra/libevent/strlcpy.c:
Libevent initial code
include/config-win.h:
Libevent support
include/my_dbug.h:
ADded _db_is_pushed
include/mysql.h.pp:
Update to handle new prototypes
include/typelib.h:
Split find_type_or_exit() into two functions
include/violite.h:
Added vio_is_pending()
libmysqld/Makefile.am:
Added libevent
mysql-test/include/have_pool_of_threads.inc:
Added test for pool-of-threads
mysql-test/mysql-test-run.pl:
Don't abort based on time and don't retry test cases when run under --gdb or --debug
mysql-test/r/crash_commit_before.result:
USE GLOBAL for debug variable
mysql-test/r/have_pool_of_threads.require:
Added test for pool-of-threads
mysql-test/r/pool_of_threads.result:
Added test for pool-of-threads
mysql-test/r/subselect_debug.result:
USE GLOBAL for debug variable
mysql-test/t/crash_commit_before.test:
USE GLOBAL for debug variable
mysql-test/t/merge-big.test:
USE GLOBAL for debug variable
mysql-test/t/pool_of_threads-master.opt:
Added test for pool-of-threads
mysql-test/t/pool_of_threads.test:
Added test for pool-of-threads
mysys/typelib.c:
Split find_type_or_exit() into find_type_with_warning()
sql/Makefile.am:
Added libevent
sql/handler.cc:
Indentation fix.
Fixed memory loss bug
Fixed crash on exit when handler plugin failed
sql/mysql_priv.h:
Added extra_max_connections and mysqld_extra_port
Added extern functions from sql_connect.cc
sql/mysqld.cc:
Added support for new mysqld options
Added code for 'extra-port' and 'extra-max-connections'
Split some functions into smaller pieces to be able to reuse code
Added code for test-ignore-wrong-options
sql/scheduler.cc:
Updated schduler code from MySQL 6.0
sql/scheduler.h:
Updated schduler code from MySQL 6.0
sql/set_var.cc:
Added support for changing "extra_max_connections"
sql/sql_class.cc:
Iniitalize thread schduler options in THD
sql/sql_class.h:
Added to extra_port and scheduler to 'THD'
sql/sql_connect.cc:
Use thd->schduler to check number of connections and terminate connection
Made some local functions global (for scheduler.cc)
vio/viosocket.c:
Added 'vio_pending', needed for scheduler..c
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
- Added braces around expressions with &&, ||, & and |
- Added empty line before ; for empty while and for loops
- Added () around if with assignments
- Removed const before function returning simple type
Changed BUILD scripts to not build with NDB
BUILD/SETUP.sh:
By default, don't build ndb with --max in Maria tree.
NDB is not kept up to date anyway in 5.1
client/mysql.cc:
Added braces around && to get rid of compiler warnings
sql/event_db_repository.cc:
Added braces around && to get rid of compiler warnings
sql/events.cc:
Added braces around && to get rid of compiler warnings
sql/field.cc:
Added braces around && to get rid of compiler warnings
Fixed for loops
sql/field.h:
Added braces around & to get rid of compiler warnings
sql/field_conv.cc:
Added braces around && to get rid of compiler warnings
Fixed bug when copying between DATETIME fields and strict dates are used
Removed not needeed else
sql/gstream.cc:
Added braces around && to get rid of compiler warnings
sql/ha_ndbcluster.cc:
Added braces around && to get rid of compiler warnings
Added {} to get rid of compiler warnings
sql/handler.cc:
Added braces around && to get rid of compiler warnings
sql/item.cc:
Added braces around && to get rid of compiler warnings
sql/item_cmpfunc.cc:
Added braces around && to get rid of compiler warnings
Removed some not needed space
sql/item_func.cc:
Added braces around && to get rid of compiler warnings
sql/item_strfunc.cc:
Added braces around && to get rid of compiler warnings
sql/item_subselect.cc:
Added braces around && to get rid of compiler warnings
sql/item_sum.cc:
Added braces around && to get rid of compiler warnings
sql/item_timefunc.cc:
Added braces around && to get rid of compiler warnings
sql/item_xmlfunc.cc:
Added empty line before ; for empty while and for loops
sql/log.cc:
Added braces around && to get rid of compiler warnings
sql/log_event.cc:
Added braces around && to get rid of compiler warnings
Removed not needed else
sql/log_event_old.cc:
Added braces around && to get rid of compiler warnings
sql/opt_range.cc:
Added braces around && to get rid of compiler warnings
sql/opt_sum.cc:
Added braces around && to get rid of compiler warnings
sql/set_var.cc:
Added empty line before ; for empty while and for loops
Added () around if with assignments
sql/slave.cc:
Added braces around && to get rid of compiler warnings
Added empty line before ; for empty while and for loops
sql/spatial.h:
Added braces around && to get rid of compiler warnings
sql/sql_acl.cc:
Added braces around && to get rid of compiler warnings
sql/sql_analyse.cc:
Added empty line before ; for empty while and for loops
sql/sql_base.cc:
Added braces around && to get rid of compiler warnings
sql/sql_connect.cc:
Added braces around && to get rid of compiler warnings
sql/sql_db.cc:
Added braces around && to get rid of compiler warnings
sql/sql_delete.cc:
Added braces around && to get rid of compiler warnings
sql/sql_help.cc:
Added empty line before ; for empty while and for loops
sql/sql_insert.cc:
Added braces around && to get rid of compiler warnings
Added () around if with assignments
sql/sql_lex.cc:
Cast char array references to uchar; Fixed wrong array referencing when using characters > ASCII 128 in SQL statments
Added empty line before ; for empty while and for loops
Trivial indent fixes
Added braces around && to get rid of compiler warnings
sql/sql_load.cc:
Added braces around && to get rid of compiler warnings
sql/sql_parse.cc:
Added braces around && to get rid of compiler warnings
sql/sql_partition.cc:
Added braces around && to get rid of compiler warnings
sql/sql_plugin.cc:
Fixed bug in detecing if option variable should be readonly
Added empty line before ; for empty while and for loops
sql/sql_prepare.cc:
Added braces around && to get rid of compiler warnings
sql/sql_select.cc:
Added braces around && to get rid of compiler warnings
Added () around if with assignments
Added empty line before ; for empty while and for loops
sql/sql_show.cc:
Added braces around && to get rid of compiler warnings
sql/sql_table.cc:
Added braces around && to get rid of compiler warnings
sql/sql_trigger.cc:
Added braces around && to get rid of compiler warnings
sql/sql_update.cc:
Added braces around && to get rid of compiler warnings
sql/sql_yacc.yy:
Added braces around && to get rid of compiler warnings
sql/table.cc:
Added braces around && to get rid of compiler warnings
sql/table.h:
Added braces around && to get rid of compiler warnings
sql/time.cc:
Added braces around && to get rid of compiler warnings
sql/tztime.cc:
Added braces around && to get rid of compiler warnings
sql/uniques.cc:
Added braces around && to get rid of compiler warnings
storage/federated/ha_federated.cc:
Fixed bug in testing of variable to ha_info() (Not critical)
storage/heap/ha_heap.cc:
Added braces around && to get rid of compiler warnings
storage/maria/ha_maria.cc:
Fixed bug: Mark that maria_log_dir_path is readonly
Added braces around && to get rid of compiler warnings
storage/ndb/include/ndbapi/NdbEventOperation.hpp:
Removed const before function returning simple type
storage/ndb/include/ndbapi/NdbOperation.hpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/Ndb.cpp:
Added empty line before ; for empty while and for loops
storage/ndb/src/ndbapi/NdbEventOperation.cpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp:
Removed const before function returning simple type
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
Added empty line before ; for empty while and for loops
storage/ndb/src/ndbapi/TransporterFacade.hpp:
Added braces around && to get rid of compiler warnings
into magare.gmz:/home/kgeorge/mysql/work/merge-5.1-bugteam
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
The server used to trust blindly information from the client about
its capabilities. During the connection handshake the server sends
information about what it supports and then the client sends back a
set of capabilities which cover all of the server's or less.
Before this changeset the server didn't check whether the flags sent
by the client were valid for the server. For example, if the server
doesn't support compressed protocol but the client does and sends that
bit turned on, the server didn't check it. The change make the server code
less error prone to problems related to the value of THD::client_capabilities.
Clearly there is no vulnerability being fixed but this is a maintainenance
fix to prevent misusage in the future.
include/mysql_com.h:
List all CLIENT flags in a common defition. Add also a definition
which excludes flags, which are optoinal.
sql/sql_connect.cc:
Renamed client_flags to server_capabilities to reflect what
the server supports. Only allow from the client the flags the
server supports.
than max_connections -- which results in user lockout.
The problem was that the variable thread_count that contains
the number of active threads was interpreted as a number of
active connections.
The fix is to introduce a new counter for active connections.
mysql-test/r/connect.result:
A test case for Bug#33507: Event scheduler creates more threads
than max_connections -- which results in user lockout.
mysql-test/t/connect.test:
A test case for Bug#33507: Event scheduler creates more threads
than max_connections -- which results in user lockout.
sql/mysql_priv.h:
1. Polishing: login_connection() and end_connection() need not
to be public.
2. Introduce connection_count -- a variable to contain the number
of active connections. It is protected by LOCK_connection_count.
sql/mysqld.cc:
Use connection_count to count active connections.
sql/sql_connect.cc:
1. Use connection_count to count active connections.
2. Make login_connection(), end_connection() private for the module
as they had to be.
into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
client/mysqltest.c:
Auto merged
mysql-test/r/view.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
Manually merged.
mysql-test/t/disabled.def:
Manually merged.
cause ROLLBACK of statement", part 1. Review fixes.
Do not send OK/EOF packets to the client until we reached the end of
the current statement.
This is a consolidation, to keep the functionality that is shared by all
SQL statements in one place in the server.
Currently this functionality includes:
- close_thread_tables()
- log_slow_statement().
After this patch and the subsequent patch for Bug#12713, it shall also include:
- ha_autocommit_or_rollback()
- net_end_statement()
- query_cache_end_of_result().
In future it may also include:
- mysql_reset_thd_for_next_command().
include/mysql_com.h:
Rename now unused members of NET: no_send_ok, no_send_error, report_error.
These were server-specific variables related to the client/server
protocol. They have been made obsolete by this patch.
Previously the same members of NET were used to store the error message
both on the client and on the server.
The error message was stored in net.last_error (client: mysql->net.last_error,
server: thd->net.last_error).
The error code was stored in net.last_errno (client: mysql->net.last_errno,
server: thd->net.last_errno).
The server error code and message are now stored elsewhere
(in the Diagnostics_area), thus NET members are no longer used by the
server.
Rename last_error to client_last_error, last_errno to client_last_errno
to avoid potential bugs introduced by merges.
include/mysql_h.ic:
Update the ABI file to reflect a rename.
Renames do not break the binary compatibility.
libmysql/libmysql.c:
Rename last_error to client_last_error, last_errno to client_last_errno.
This is necessary to ensure no unnoticed bugs introduced by merged
changesets.
Remove net.report_error, net.no_send_ok, net.no_send_error.
libmysql/manager.c:
Rename net.last_errno to net.client_last_errno.
libmysqld/lib_sql.cc:
Rename net.last_errno to net.client_last_errno.
Update the embedded implementation of the client-server protocol to
reflect the refactoring of protocol.cc.
libmysqld/libmysqld.c:
Rename net.last_errno to net.client_last_errno.
mysql-test/r/events.result:
Update to reflect the change in mysql_rm_db(). Now we drop stored
routines and events for a given database name only if there
is a directory for this database name. ha_drop_database() and
query_cache_invalidate() are called likewise.
Previously we would attempt to drop routines/events even if database
directory was not found (it worked, since routines and events are stored
in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc
does not exist".
The change was done because the previous code used to call send_ok()
twice, which led to an assertion failure when asserts against it were
added by this patch.
mysql-test/r/grant.result:
Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error
if mysql.procs_priv is missing.
This fixes the assert that send_ok() must not called after send_error()
(the original patch for Bug 16470 was prone to this).
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
Produce a more detailed error message.
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
Produce a more detailed error message.
mysql-test/t/grant.test:
Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv
is missing.
server-tools/instance-manager/mysql_connection.cc:
Rename net.last_errno to net.client_last_errno.
sql/ha_ndbcluster_binlog.cc:
Add asserts.
Use getters to access statement status information.
Add a comment why run_query() is broken. Reset the diagnostics area
in the end of run_query() to fulfill the invariant that the diagnostics_area
is never assigned twice per statement (see the comment in the code
when this can happen). We still do not clear thd->is_fatal_error and
thd->is_slave_error, which may lead to bugs, I consider the whole affair
as something to be dealt with separately.
sql/ha_partition.cc:
fatal_error() doesn't set an error by itself. Perhaps we should
remove this method altogether and instead add a flag to my_error
to set thd->is_fatal_error property.
Meanwhile, this change is a part of inspection made to the entire source
code with the goal to ensure that fatal_error()
is always accompanied by my_error().
sql/item_func.cc:
There is no net.last_error anymore. Remove the obsolete assignment.
sql/log_event.cc:
Use getters to access statement error status information.
sql/log_event_old.cc:
Use getters to access statement error status information.
sql/mysqld.cc:
Previously, if a continue handler for an error was found, my_message_sql()
would not set an error in THD. Since the current statement
must be aborted in any case, find_handler() had a hack to assign
thd->net.report_error to 1.
Remove this hack. Set an error in my_message_sql() even if the continue
handler is found. The error will be cleared anyway when the handler
is executed. This is one action among many in this patch to ensure the
invariant that whenever thd->is_error() is TRUE, we have a message in
thd->main_da.message().
sql/net_serv.cc:
Use a full-blown my_error() in net_serv.cc to report an error,
instead of just setting net->last_errno. This ensures the invariant that
whenever thd->is_error() returns TRUE, we have a message in
thd->main_da.message().
Remove initialization of removed NET members.
sql/opt_range.cc:
Use my_error() instead of just raising thd->net.report_error.
This ensures the invariant that whenever thd->is_error() returns TRUE,
there is a message in thd->main_da.message().
sql/opt_sum.cc:
Move invocation of fatal_error() right next to the place where
we set the error message. That makes it easier to track that whenever
fatal_error() is called, there is a message in THD.
sql/protocol.cc:
Rename send_ok() and send_eof() to net_send_ok() and net_send_eof()
respectively. These functions write directly to the network and are not
for use anywhere outside the client/server protocol code.
Remove the code that was responsible for cases when either there is
no error code, or no error message, or both.
Instead the calling code ensures that they are always present. Asserts
are added to enforce the invariant.
Instead of a direct access to thd->server_status and thd->total_warn_count
use function parameters, since these from now on don't always come directly
from THD.
Introduce net_end_statement(), the single-entry-point replacement API for
send_ok(), send_eof() and net_send_error().
Implement Protocol::end_partial_result_set to use in select_send::abort()
when there is a continue handler.
sql/protocol.h:
Update declarations.
sql/repl_failsafe.cc:
Use getters to access statement status information in THD.
Rename net.last_error to net.client_last_error.
sql/rpl_record.cc:
Set an error message in prepare_record() if there is no default
value for the field -- later we do print this message to the client.
sql/rpl_rli.cc:
Use getters to access statement status information in THD.
sql/slave.cc:
In create_table_from_dump() (a common function that is used in
LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks
with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded.
Update has_temporary_error() to work correctly when no error is set.
This is the case when Incident_log_event is executed: it always returns
an error but does not set an error message.
Use getters to access error status information.
sql/sp_head.cc:
Instead of hacks with no_send_error, work through the diagnostics area
interface to suppress sending of OK/ERROR packets to the client.
Move query_cache_end_of_result before log_slow_statement(), similarly
to how it's done in dispatch_command().
sql/sp_rcontext.cc:
Remove hacks with assignment of thd->net.report_error, they are not
necessary any more (see the changes in mysqld.cc).
sql/sql_acl.cc:
Use getters to access error status information in THD.
sql/sql_base.cc:
Access thd->main_da.sql_errno() only if there is an error. This fixes
a bug when auto-discovery, that was effectively disabled under pre-locking.
sql/sql_binlog.cc:
Remove hacks with no_send_ok/no_send_error, they are not necessary
anymore: the caller is responsible for network communication.
sql/sql_cache.cc:
Disable sending of OK/ERROR/EOF packet in the end of dispatch_command
if the response has been served from the query cache. This raises the
question whether we should store EOF packet in the query cache at all,
or generate it anew for each statement (we should generate it anew), but
this is to be addressed separately.
sql/sql_class.cc:
Implement class Diagnostics_area. Please see comments in sql_class.h
for details.
Fix a subtle coding mistake in select_send::send_data: when on slave,
an error in Item::send() was ignored.
The problem became visible due to asserts that the diagnostics area is
never double assigned.
Remove initialization of removed NET members.
In select_send::abort() do not call select_send::send_eof(). This is
not inheritance-safe. Even if a stored procedure continue handler is
found, the current statement is aborted, not succeeded.
Instead introduce a Protocol API to send the required response,
Protocol::end_partial_result_set().
This simplifies implementation of select_send::send_eof(). No need
to add more asserts that there is no error, there is an assert inside
Diagnostics_area::set_ok_status() already.
Leave no trace of no_send_* in the code.
sql/sql_class.h:
Declare class Diagnostics_area.
Remove the hack with no_send_ok from
Substatement_state.
Provide inline implementations of send_ok/send_eof.
Add commetns.
sql/sql_connect.cc:
Remove hacks with no_send_error.
Since now an error in THD is always set if net->error, it's not necessary
to check both net->error and thd->is_error() in the do_command loop.
Use thd->main_da.message() instead of net->last_errno.
Remove the hack with is_slave_error in sys_init_connect. Since now we do not
reset the diagnostics area in net_send_error (it's reset at the beginning
of the next statement), we can access it safely even after
execute_init_command.
sql/sql_db.cc:
Update the code to satisfy the invariant that the diagnostics area is never
assigned twice.
Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if
mysql.proc does not exist".
sql/sql_delete.cc:
Change multi-delete to abort in abort(), as per select_send protocol.
Fixes the merge error with the test for Bug 29136
sql/sql_derived.cc:
Use getters to access error information.
sql/sql_insert.cc:
Use getters to access error information.
sql-common/client.c:
Rename last_error to client_last_error, last_errno to client_last_errno.
sql/sql_parse.cc:
Remove hacks with no_send_error. Deploy net_end_statement().
The story of COM_SHUTDOWN is interesting. Long story short, the server
would become on its death's door, and only no_send_ok/no_send_error assigned
by send_ok()/net_send_error() would hide its babbling from the client.
First of all, COM_QUIT does not require a response. So, the comment saying
"Let's send a response to possible COM_QUIT" is not only groundless
(even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after
COM_SHUTDOWN), it's plainly incorrect.
Secondly, besides this additional 'OK' packet to respond to a hypothetical
COM_QUIT, there was the following code in dispatch_command():
if (thd->killed)
thd->send_kill_message();
if (thd->is_error()
net_send_error(thd);
This worked out really funny for the thread through which COM_SHUTDOWN
was delivered: we would get COM_SHUTDOWN, say okay, say okay again,
kill everybody, get the kill signal ourselves, and then attempt to say
"Server shutdown in progress" to the client that is very likely long gone.
This all became visible when asserts were added that the Diagnostics_area
is not assigned twice.
Move query_cache_end_of_result() to the end of dispatch_command(), since
net_send_eof() has been moved there. This is safe, query_cache_end_of_result()
is a no-op if there is no started query in the cache.
Consistently use select_send interface to call abort() or send_eof()
depending on the operation result.
Remove thd->fatal_error() from reset_master(), it was a no-op.
in hacks with no_send_error woudl save us
from complete breakage of the client/server protocol.
Consistently use select_send::abort() whenever there is an error,
and select_send::send_eof() in case of success.
The issue became visible due to added asserts.
sql/sql_partition.cc:
Always set an error in THD whenever there is a call to fatal_error().
sql/sql_prepare.cc:
Deploy class Diagnostics_area.
Remove the unnecessary juggling with the protocol in
Select_fetch_protocol_binary::send_eof(). EOF packet format is
protocol-independent.
sql/sql_select.cc:
Call fatal_error() directly in opt_sum_query.
Call my_error() whenever we call thd->fatal_error().
sql/sql_servers.cc:
Use getters to access error information in THD.
sql/sql_show.cc:
Use getters to access error information in THD.
Add comments.
Call my_error() whenever we call fatal_error().
sql/sql_table.cc:
Replace hacks with no_send_ok with the interface of the diagnostics area.
Clear the error if ENOENT error in ha_delete_table().
sql/sql_update.cc:
Introduce multi_update::abort(), which is the proper way to abort a
multi-update. This fixes the merge conflict between this patch and
the patch for Bug 29136.
sql/table.cc:
Use a getter to access error information in THD.
sql/tztime.cc:
Use a getter to access error information in THD.
into mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
sql/event_scheduler.cc:
Auto merged
sql/events.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
into stella.local:/home2/mydev/mysql-5.1-bug31210
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_servers.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/table.cc:
Auto merged
partitioned table
Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".
Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...
Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.
mysql-test/r/partition_hash.result:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added test result
mysql-test/t/partition_hash.test:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added test
sql/event_scheduler.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/events.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/ha_ndbcluster_binlog.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/slave.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_acl.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_base.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Asserted that lex is initialized in open_table().
sql/sql_connect.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_insert.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added initialization for thd->lex before open table.
sql/sql_lex.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_lex.h:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Added 'is_lex_started' to test if lex is initialized.
sql/sql_plugin.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_servers.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/sql_udf.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
sql/table.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Asserted that lex is initialized in open_table_from_share().
sql/tztime.cc:
Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
Initialized lex for later use in open_table().
The mysql_change_user command fails to properly update the database pointer
when no database is selected, leading to "use after free" errors. The same
happens on the user privilege pointer in the thread security context.
The solution is to properly reset and update the database name. Also update
the user_priv pointer so that it doesn't point to freed memory.
sql/sql_connect.cc:
After a successful call to check_user() without specifying a new
database name, the previous database thd->db) is freed but the
pointer is not updated to NULL.
sql/sql_parse.cc:
Update the security_ctx->priv_user pointer as it is a alias for
the user security_ctx->user pointer. Also remove unneeded cast,
the x_free macro casts the argument.
check_user()/check_connection()/check_for_max_user_connections().
This is a pre-requisite patch for the fix for Bug#12713 "Error in a stored
function called from a SELECT doesn't cause ROLLBACK of statem"
Implement review comments.
sql/mysql_priv.h:
check_for_max_user_connections() is used in one place only, make it static.
sql/mysqld.cc:
Remove net_printf_error(): a consolidation of error reporting facilities
is necessary to simplify maintenance of the query cache, the
client-server protocol, stored procedure continue handlers.
Rewrite the only place where its use is somewhat justified
(my_error() can not be used since we need to report an error for the thread
that does not exist) with my_snprintf()/net_send_error().
sql/protocol.cc:
Remove net_printf_error().
sql/protocol.h:
Remove net_printf_error().
sql/sql_connect.cc:
Remove net_printf_error(). In check_connection()/check_user()/
check_for_max_user_connections() do not write directly to the network,
but use the standard my_error() mechanism to record an error in THD.
It will be sent to the client by the caller. This was the last place
in the server that would attempt to send an error directly, mainly left
untouched by 5.0 refactoring because it is executed only during
thread startup.
sql/sql_parse.cc:
In the old code, when res was greater than 0, it contained an exact
error code, e.g. ER_OUT_OF_RESOURCES or NO SUCH DATABASE,
or ER_HANDSHAKE_ERROR. I don't know the reason why this error code was
ignored, and instead a generic ER_UNKNOWN_COM_ERROR was pushed into the
error stack, but knowing the relaxed attitude towards preserving the error
codes in the old code, I'm inclinded to think that it was a bug.
After this patch, the most specific error message is already pushed,
so calling my_message() again is useless.
If res is < 0, the error used to be already sent. This is not done
by the new code, but will be done later, in the end
of dispatch_command(). When this is done, clear_error() will be called
for us - it is in the first lines of do_command.
To sum up, this change is to remove COM_CHANGE_USER specific error handling
in favor of the standard one employed for all other COM_* commands.
Add comments.
sql/ha_ndbcluster_binlog.cc:
query_error -> slave_error
sql/handler.cc:
query_error -> slave_error
sql/log.cc:
query_error -> slave_error
sql/log_event.cc:
query_error -> slave_error
sql/log_event_old.cc:
query_error -> slave_error
sql/mysqld.cc:
query_error -> slave_error
sql/protocol.cc:
query_error -> slave_error
sql/slave.cc:
query_error -> slave_error
sql/sp_head.cc:
query_error -> slave_error
sql/sql_class.cc:
query_error -> slave_error
sql/sql_class.h:
Rename: query_error -> is_slave_error, to avoid confusion.
Add commenta.
sql/sql_connect.cc:
Rename: query_error -> is_slave_error, to avoid confusion.
Originally it was the same code to handle init-connect and init-slave
mysqld options. Then init-connect implementation forked off,
but the one who copy-pasted the code didn't change it to not
use a replication-specific variable.
of SQL_BIG_SELECTS.
The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.
The fix is to update SQL_BIG_SELECTS properly.
sql/mysql_priv.h:
Cleanup: make prepare_new_connection_state() private for module.
sql/sql_class.cc:
Update THD::options with the respect to SQL_BIG_SELECTS
in COM_CHANGE_USER.
sql/sql_connect.cc:
Cleanup: make prepare_new_connection_state() private for module.
tests/mysql_client_test.c:
Add a test case BUG#20023.
Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.
libmysqld/lib_sql.cc:
Add comment regarding duplication of code in create_embedded_thd()
vs. create_new_thread() and prepare_new_connection_state(). This
was a cause for not properly initializing the pseudo_thread_id variable.
mysql-test/r/func_misc.result:
Add test case to ensure connection_id() returns a sane value
mysql-test/t/func_misc.test:
Add test case to ensure connection_id() returns a sane value
sql/mysqld.cc:
Add comment warning of the duplication of code between create_new_thread()
and create_embedded_thd()
sql/sql_connect.cc:
Add comment warning of the duplication of code between
prepare_new_connection_state() and create_embedded_thd()
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime() (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
include/my_getopt.h:
Added support for double arguments
include/my_sys.h:
Fixed wrong type to packfrm()
Added new my_time functions
include/mysql/plugin.h:
Added support for DOUBLE
libmysql/CMakeLists.txt:
Added new time functions
libmysql/Makefile.shared:
Added new time functions
mysql-test/r/variables.result:
Testing of long_query_time
mysql-test/t/variables.test:
Testing of long_query_time
mysys/charset.c:
Fixed compiler warnings
mysys/default_modify.c:
Fixed compiler warnings
mysys/hash.c:
Fixed compiler warnings
mysys/mf_getdate.c:
Use my_time()
mysys/mf_iocache2.c:
Fixed compiler warnings
mysys/mf_pack.c:
Fixed compiler warnings
mysys/mf_path.c:
Fixed compiler warnings
mysys/my_append.c:
Fixed compiler warnings
mysys/my_compress.c:
Fixed compiler warnings
mysys/my_copy.c:
Fixed compiler warnings
mysys/my_gethwaddr.c:
Fixed compiler warnings
mysys/my_getopt.c:
Added support for double arguments
mysys/my_getsystime.c:
Added functions to get time in microseconds.
Added faster time() functions for system that has gethrtime() (Solaris)
Moved windows initialization code to my_init()
mysys/my_init.c:
Added initializing of variables needed for windows time functions
mysys/my_static.c:
Added variables needed for windows time functions
mysys/my_static.h:
Added variables needed for windows time functions
mysys/my_thr_init.c:
Added THR_LOCK_time, used for faster my_time()
mysys/mysys_priv.h:
Added THR_LOCK_time, used for faster my_time()
mysys/thr_alarm.c:
time() -> my_time()
sql/event_data_objects.cc:
end_time() -> set_current_time()
sql/event_queue.cc:
end_time() -> set_current_time()
sql/event_scheduler.cc:
Fixed compiler warnings
sql/field.h:
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
sql/item.h:
Added decimal to Item_float(double)
sql/item_cmpfunc.h:
Added decimal to Item_float(double)
sql/item_timefunc.cc:
time() -> my_time()
sql/item_xmlfunc.cc:
Fixed compiler warning
sql/lock.cc:
lock_time() -> set_time_after_lock()
sql/log.cc:
Timing in slow query log to file is now done in microseconds
Changed some while() loops to for() loops.
Fixed indentation
time() -> my_time()
sql/log.h:
Slow query logging is now done based on microseconds
sql/log_event.cc:
time() -> my_time()
Fixed arguments to new Item_float()
sql/mysql_priv.h:
Fixed compiler warnings
Added opt_log_slow_slave_statements
sql/mysqld.cc:
Added --log_slow_slave_statements and --min_examined_row_limit
--long-query-time now takes a double argument with microsecond resolution
Don't write shutdown message when using --help
Removed not needed \n
Thread create time and connect time is now done in microseconds
time() -> my_time()
Avoid some time() calls
sql/net_serv.cc:
Fixed compiler warnings
sql/parse_file.cc:
time() -> my_time()
sql/set_var.cc:
Added support for DOUBLE variables
Added support for variables that are given in seconds with microsecond resolution
sql/set_var.h:
Added support for variables that are given in seconds with microsecond resolution
sql/slave.cc:
Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
time() -> my_time()
sql/sql_cache.h:
Fixed compiler warning()
sql/sql_class.cc:
Initialize new THD variables
sql/sql_class.h:
long_query_time is now in microseconds
Added min_examined_row_limit
Reordered some THD elements for higher efficency
Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
Start of query is now recorded both in seconds and in microseconds.
Following renames was made for more clarity and avoid merge problems from earlier versions:
connect_time -> connect_utime
thr_create_time -> thr_create_utime
end_time() -> set_current_time()
lock_time() -> set_time_after_lock()
Added THD::start_utime, which is start of query in microseconds from some arbitary time
Added function THD::current_utime()
Removed safe_time() as retry's are handled in my_time()
sql/sql_connect.cc:
User resources are now using microsecond resolution
sql/sql_insert.cc:
end_time() -> set_current_time()
sql-common/client.c:
time() -> my_time()
sql/sql_parse.cc:
Testing if we should print to slow_query_log() is now done with microsecond precission.
If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
sql/sql_select.cc:
Simplify code now that Item_float() takes decimals as argument
sql/sql_show.cc:
time() -> my_time()
Added support for SYS_DOUBLE
sql/sql_table.cc:
Added debug function for stopping in mysql_admin_table() when tables are locked
sql/structs.h:
intime -> reset_utime
protocol
Update for function moved to new file in 5.1.
One could send a malformed packet that caused the server to SEGV. In
recent versions of the password protocol, the client tells the server
what length the ciphertext is (almost always 20). If that length was
large enough to overflow a signed char, then the number would jump to
very large after being casted to unsigned int.
Instead, cast the *passwd char to uchar.
sql/sql_connect.cc:
Update for function moved to new file in 5.1.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
client/mysqldump.c:
Auto merged
include/m_string.h:
Auto merged
include/mysql_com.h:
Auto merged
include/violite.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysys/my_init.c:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/strtod.c:
Auto merged
vio/vio_priv.h:
Auto merged
vio/viosocket.c:
Auto merged
client/mysqltest.c:
SCCS merged
include/my_global.h:
SCCS merged
sql/field.h:
SCCS merged
sql/sql_table.cc:
Manual merge
strings/ctype-bin.c:
Manual merge
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/comp_err.c:
Auto merged
include/decimal.h:
Auto merged
include/my_getopt.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
mysys/array.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/typelib.c:
Auto merged
sql/derror.cc:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
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_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/rpl_utility.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/example/ha_example.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/heap/ha_heap.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
strings/decimal.c:
Auto merged
strings/strtod.c:
Auto merged
include/hash.h:
Manual merge with 5.1 main tree.
mysys/my_getopt.c:
Manual merge with 5.1 main tree.
sql/field.h:
Manual merge with 5.1 main tree.
sql/ha_ndbcluster.cc:
Manual merge with 5.1 main tree.
sql/item_cmpfunc.h:
Manual merge with 5.1 main tree.
sql/item_create.cc:
Manual merge with 5.1 main tree.
sql/item_func.h:
Manual merge with 5.1 main tree.
sql/key.cc:
Manual merge with 5.1 main tree.
sql/lock.cc:
Manual merge with 5.1 main tree.
sql/mysqld.cc:
Manual merge with 5.1 main tree.
sql/set_var.cc:
Manual merge with 5.1 main tree.
sql/set_var.h:
Manual merge with 5.1 main tree.
sql/sql_base.cc:
Manual merge with 5.1 main tree.
sql/sql_handler.cc:
Manual merge with 5.1 main tree.
sql/sql_insert.cc:
Manual merge with 5.1 main tree.
sql/sql_plugin.cc:
Manual merge with 5.1 main tree.
sql/sql_table.cc:
Manual merge with 5.1 main tree.
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
sql/table.cc:
Manual merge with 5.1 main tree.
storage/innobase/handler/ha_innodb.cc:
Manual merge with 5.1 main tree.
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Manual merge with 5.1 main tree.
storage/ndb/tools/restore/restore_main.cpp:
Manual merge with 5.1 main tree.
The following type conversions was done:
- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t
Removed declaration of byte, gptr, my_string, my_size_t and size_s.
Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
as this requires fewer casts in the code and is more in line with how the
standard functions work.
- Added extra length argument to dirname_part() to return the length of the
created string.
- Changed (at least) following functions to take uchar* as argument:
- db_dump()
- my_net_write()
- net_write_command()
- net_store_data()
- DBUG_DUMP()
- decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
argument to my_uncompress() from a pointer to a value as we only return
one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.
Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
explicitely as this conflict was often hided by casting the function to
hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
size_t. This was needed to properly detect errors (which are
returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
(portability fix)
- Removed windows specific code to restore cursor position as this
causes slowdown on windows and we should not mix read() and pread()
calls anyway as this is not thread safe. Updated function comment to
reflect this. Changed function that depended on original behavior of
my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
m_size is the number of elements in the array, not a string/memory
length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
- Replaced some calls to alloc_root + memcpy to use
strmake_root()/strdup_root().
- Changed some calls from memdup() to strmake() (Safety fix)
- Simpler loops in client-simple.c
BitKeeper/etc/ignore:
added libmysqld/ha_ndbcluster_cond.cc
---
added debian/defs.mk debian/control
client/completion_hash.cc:
Remove not needed casts
client/my_readline.h:
Remove some old types
client/mysql.cc:
Simplify types
client/mysql_upgrade.c:
Remove some old types
Update call to dirname_part
client/mysqladmin.cc:
Remove some old types
client/mysqlbinlog.cc:
Remove some old types
Change some buffers to be uchar to avoid casts
client/mysqlcheck.c:
Remove some old types
client/mysqldump.c:
Remove some old types
Remove some not needed casts
Change some string lengths to size_t
client/mysqlimport.c:
Remove some old types
client/mysqlshow.c:
Remove some old types
client/mysqlslap.c:
Remove some old types
Remove some not needed casts
client/mysqltest.c:
Removed some old types
Removed some not needed casts
Updated hash-get-key function arguments
Updated parameters to dirname_part()
client/readline.cc:
Removed some old types
Removed some not needed casts
Changed some string lengths to use size_t
client/sql_string.cc:
Removed some old types
dbug/dbug.c:
Removed some old types
Changed some string lengths to use size_t
Changed some prototypes to avoid casts
extra/comp_err.c:
Removed some old types
extra/innochecksum.c:
Removed some old types
extra/my_print_defaults.c:
Removed some old types
extra/mysql_waitpid.c:
Removed some old types
extra/perror.c:
Removed some old types
extra/replace.c:
Removed some old types
Updated parameters to dirname_part()
extra/resolve_stack_dump.c:
Removed some old types
extra/resolveip.c:
Removed some old types
include/config-win.h:
Removed some old types
include/decimal.h:
Changed binary strings to be uchar* instead of char*
include/ft_global.h:
Removed some old types
include/hash.h:
Removed some old types
include/heap.h:
Removed some old types
Changed records_under_level to be 'ulong' instead of 'uint' to clarify usage of variable
include/keycache.h:
Removed some old types
include/m_ctype.h:
Removed some old types
Changed some string lengths to use size_t
Changed character length functions to return uint
unsigned char -> uchar
include/m_string.h:
Removed some old types
Changed some string lengths to use size_t
include/my_alloc.h:
Changed some string lengths to use size_t
include/my_base.h:
Removed some old types
include/my_dbug.h:
Removed some old types
Changed some string lengths to use size_t
Changed db_dump() to take uchar * as argument for memory to reduce number of casts in usage
include/my_getopt.h:
Removed some old types
include/my_global.h:
Removed old types:
my_size_t -> size_t
byte -> uchar
gptr -> uchar *
include/my_list.h:
Removed some old types
include/my_nosys.h:
Removed some old types
include/my_pthread.h:
Removed some old types
include/my_sys.h:
Removed some old types
Changed MY_FILE_ERROR to be in line with new definitions of my_write()/my_read()
Changed some string lengths to use size_t
my_malloc() / my_free() now uses void *
Updated parameters to dirname_part() & my_uncompress()
include/my_tree.h:
Removed some old types
include/my_trie.h:
Removed some old types
include/my_user.h:
Changed some string lengths to use size_t
include/my_vle.h:
Removed some old types
include/my_xml.h:
Removed some old types
Changed some string lengths to use size_t
include/myisam.h:
Removed some old types
include/myisammrg.h:
Removed some old types
include/mysql.h:
Removed some old types
Changed byte streams to use uchar* instead of char*
include/mysql_com.h:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
include/queues.h:
Removed some old types
include/sql_common.h:
Removed some old types
include/sslopt-longopts.h:
Removed some old types
include/violite.h:
Removed some old types
Changed some string lengths to use size_t
libmysql/client_settings.h:
Removed some old types
libmysql/libmysql.c:
Removed some old types
libmysql/manager.c:
Removed some old types
libmysqld/emb_qcache.cc:
Removed some old types
libmysqld/emb_qcache.h:
Removed some old types
libmysqld/lib_sql.cc:
Removed some old types
Removed some not needed casts
Changed some buffers to be uchar* to avoid casts
true -> TRUE, false -> FALSE
mysys/array.c:
Removed some old types
mysys/charset.c:
Changed some string lengths to use size_t
mysys/checksum.c:
Include zlib to get definition for crc32
Removed some old types
mysys/default.c:
Removed some old types
Changed some string lengths to use size_t
mysys/default_modify.c:
Changed some string lengths to use size_t
Removed some not needed casts
mysys/hash.c:
Removed some old types
Changed some string lengths to use size_t
Note: Prototype of hash_key() has changed which may cause problems if client uses hash_init() with a cast for the hash-get-key function.
hash_element now takes 'ulong' as the index type (cleanup)
mysys/list.c:
Removed some old types
mysys/mf_cache.c:
Changed some string lengths to use size_t
mysys/mf_dirname.c:
Removed some old types
Changed some string lengths to use size_t
Added argument to dirname_part() to avoid calculation of length for 'to'
mysys/mf_fn_ext.c:
Removed some old types
Updated parameters to dirname_part()
mysys/mf_format.c:
Removed some old types
Changed some string lengths to use size_t
mysys/mf_getdate.c:
Removed some old types
mysys/mf_iocache.c:
Removed some old types
Changed some string lengths to use size_t
Changed calculation of 'max_length' to be done the same way in all functions
mysys/mf_iocache2.c:
Removed some old types
Changed some string lengths to use size_t
Clean up comments
Removed not needed indentation
mysys/mf_keycache.c:
Removed some old types
mysys/mf_keycaches.c:
Removed some old types
mysys/mf_loadpath.c:
Removed some old types
mysys/mf_pack.c:
Removed some old types
Changed some string lengths to use size_t
Removed some not needed casts
Removed very old VMS code
Updated parameters to dirname_part()
Use result of dirnam_part() to remove call to strcat()
mysys/mf_path.c:
Removed some old types
mysys/mf_radix.c:
Removed some old types
mysys/mf_same.c:
Removed some old types
mysys/mf_sort.c:
Removed some old types
mysys/mf_soundex.c:
Removed some old types
mysys/mf_strip.c:
Removed some old types
mysys/mf_tempdir.c:
Removed some old types
mysys/mf_unixpath.c:
Removed some old types
mysys/mf_wfile.c:
Removed some old types
mysys/mulalloc.c:
Removed some old types
mysys/my_alloc.c:
Removed some old types
Changed some string lengths to use size_t
Use void* as type for allocated memory area
Removed some not needed casts
Changed argument 'Size' to 'length' according coding guidelines
mysys/my_chsize.c:
Changed some buffers to be uchar* to avoid casts
mysys/my_compress.c:
More comments
Removed some old types
Changed string lengths to use size_t
Changed arguments to my_uncompress() to make them easier to understand
Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix)
Changed type of 'pack_data' argument to packfrm() to avoid casts.
mysys/my_conio.c:
Changed some string lengths to use size_t
mysys/my_create.c:
Removed some old types
mysys/my_div.c:
Removed some old types
mysys/my_error.c:
Removed some old types
mysys/my_fopen.c:
Removed some old types
mysys/my_fstream.c:
Removed some old types
Changed some string lengths to use size_t
writen -> written
mysys/my_getopt.c:
Removed some old types
mysys/my_getwd.c:
Removed some old types
More comments
mysys/my_init.c:
Removed some old types
mysys/my_largepage.c:
Removed some old types
Changed some string lengths to use size_t
mysys/my_lib.c:
Removed some old types
mysys/my_lockmem.c:
Removed some old types
mysys/my_malloc.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed all functions to use size_t
mysys/my_memmem.c:
Indentation cleanup
mysys/my_once.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
mysys/my_open.c:
Removed some old types
mysys/my_pread.c:
Removed some old types
Changed all functions to use size_t
Added comment for how my_pread() / my_pwrite() are supposed to work.
Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe.
(If we ever would really need this, it should be enabled only with a flag argument)
mysys/my_quick.c:
Removed some old types
Changed all functions to use size_t
mysys/my_read.c:
Removed some old types
Changed all functions to use size_t
mysys/my_realloc.c:
Removed some old types
Use void* as type for allocated memory area
Changed all functions to use size_t
mysys/my_static.c:
Removed some old types
mysys/my_static.h:
Removed some old types
mysys/my_vle.c:
Removed some old types
mysys/my_wincond.c:
Removed some old types
mysys/my_windac.c:
Removed some old types
mysys/my_write.c:
Removed some old types
Changed all functions to use size_t
mysys/ptr_cmp.c:
Removed some old types
Changed all functions to use size_t
mysys/queues.c:
Removed some old types
mysys/safemalloc.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed all functions to use size_t
mysys/string.c:
Removed some old types
Changed all functions to use size_t
mysys/testhash.c:
Removed some old types
mysys/thr_alarm.c:
Removed some old types
mysys/thr_lock.c:
Removed some old types
mysys/tree.c:
Removed some old types
mysys/trie.c:
Removed some old types
mysys/typelib.c:
Removed some old types
plugin/daemon_example/daemon_example.cc:
Removed some old types
regex/reginit.c:
Removed some old types
server-tools/instance-manager/buffer.cc:
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/buffer.h:
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/commands.cc:
Removed some old types
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/instance_map.cc:
Removed some old types
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/instance_options.cc:
Changed buffer to be of type uchar*
Replaced alloc_root + strcpy() with strdup_root()
server-tools/instance-manager/mysql_connection.cc:
Changed buffer to be of type uchar*
server-tools/instance-manager/options.cc:
Removed some old types
server-tools/instance-manager/parse.cc:
Changed some string lengths to use size_t
server-tools/instance-manager/parse.h:
Removed some old types
Changed some string lengths to use size_t
server-tools/instance-manager/protocol.cc:
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
server-tools/instance-manager/protocol.h:
Changed some string lengths to use size_t
server-tools/instance-manager/user_map.cc:
Removed some old types
Changed some string lengths to use size_t
sql/derror.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/discover.cc:
Changed in readfrm() and writefrom() the type for argument 'frmdata' to uchar** to avoid casts
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
sql/event_data_objects.cc:
Removed some old types
Added missing casts for alloc() and sprintf()
sql/event_db_repository.cc:
Changed some buffers to be uchar* to avoid casts
Added missing casts for sprintf()
sql/event_queue.cc:
Removed some old types
sql/field.cc:
Removed some old types
Changed memory buffers to be uchar*
Changed some string lengths to use size_t
Removed a lot of casts
Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/field.h:
Removed some old types
Changed memory buffers to be uchar* (except of store() as this would have caused too many other changes).
Changed some string lengths to use size_t
Removed some not needed casts
Changed val_xxx(xxx, new_ptr) to take const pointers
sql/field_conv.cc:
Removed some old types
Added casts required because memory area pointers are now uchar*
sql/filesort.cc:
Initalize variable that was used unitialized in error conditions
sql/gen_lex_hash.cc:
Removed some old types
Changed memory buffers to be uchar*
Changed some string lengths to use size_t
Removed a lot of casts
Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/gstream.h:
Added required cast
sql/ha_ndbcluster.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
Added required casts
Removed some not needed casts
sql/ha_ndbcluster.h:
Removed some old types
sql/ha_ndbcluster_binlog.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Replaced sql_alloc() + memcpy() + set end 0 with sql_strmake()
Changed some string lengths to use size_t
Added missing casts for alloc() and sprintf()
sql/ha_ndbcluster_binlog.h:
Removed some old types
sql/ha_ndbcluster_cond.cc:
Removed some old types
Removed some not needed casts
sql/ha_ndbcluster_cond.h:
Removed some old types
sql/ha_partition.cc:
Removed some old types
Changed prototype for change_partition() to avoid casts
sql/ha_partition.h:
Removed some old types
sql/handler.cc:
Removed some old types
Changed some string lengths to use size_t
sql/handler.h:
Removed some old types
Changed some string lengths to use size_t
Changed type for 'frmblob' parameter for discover() and ha_discover() to get fewer casts
sql/hash_filo.h:
Removed some old types
Changed all functions to use size_t
sql/hostname.cc:
Removed some old types
sql/item.cc:
Removed some old types
Changed some string lengths to use size_t
Use strmake() instead of memdup() to create a null terminated string.
Updated calls to new Field()
sql/item.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.h:
Removed some old types
sql/item_create.cc:
Removed some old types
sql/item_func.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added test for failing alloc() in init_result_field()
Remove old confusing comment
Fixed compiler warning
sql/item_func.h:
Removed some old types
sql/item_row.cc:
Removed some old types
sql/item_row.h:
Removed some old types
sql/item_strfunc.cc:
Include zlib (needed becasue we call crc32)
Removed some old types
sql/item_strfunc.h:
Removed some old types
Changed some types to match new function prototypes
sql/item_subselect.cc:
Removed some old types
sql/item_subselect.h:
Removed some old types
sql/item_sum.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/item_sum.h:
Removed some old types
sql/item_timefunc.cc:
Removed some old types
Changed some string lengths to use size_t
sql/item_timefunc.h:
Removed some old types
sql/item_xmlfunc.cc:
Changed some string lengths to use size_t
sql/item_xmlfunc.h:
Removed some old types
sql/key.cc:
Removed some old types
Removed some not needed casts
sql/lock.cc:
Removed some old types
Added some cast to my_multi_malloc() arguments for safety
sql/log.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Changed usage of pwrite() to not assume it holds the cursor position for the file
Made usage of my_read() safer
sql/log_event.cc:
Removed some old types
Added checking of return value of malloc() in pack_info()
Changed some buffers to be uchar* to avoid casts
Removed some 'const' to avoid casts
Added missing casts for alloc() and sprintf()
Added required casts
Removed some not needed casts
Added some cast to my_multi_malloc() arguments for safety
sql/log_event.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/log_event_old.cc:
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/log_event_old.h:
Changed some buffers to be uchar* to avoid casts
sql/mf_iocache.cc:
Removed some old types
sql/my_decimal.cc:
Changed memory area to use uchar*
sql/my_decimal.h:
Changed memory area to use uchar*
sql/mysql_priv.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed some string lengths to use size_t
Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid long overflow
Changed some buffers to be uchar* to avoid casts
sql/mysqld.cc:
Removed some old types
sql/net_serv.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Ensure that vio_read()/vio_write() return values are stored in a size_t variable
Removed some not needed casts
sql/opt_range.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/opt_range.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/opt_sum.cc:
Removed some old types
Removed some not needed casts
sql/parse_file.cc:
Removed some old types
Changed some string lengths to use size_t
Changed alloc_root + memcpy + set end 0 -> strmake_root()
sql/parse_file.h:
Removed some old types
sql/partition_info.cc:
Removed some old types
Added missing casts for alloc()
Changed some buffers to be uchar* to avoid casts
sql/partition_info.h:
Changed some buffers to be uchar* to avoid casts
sql/protocol.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/protocol.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/records.cc:
Removed some old types
sql/repl_failsafe.cc:
Removed some old types
Changed some string lengths to use size_t
Added required casts
sql/rpl_filter.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some string lengths to use size_t
sql/rpl_filter.h:
Changed some string lengths to use size_t
sql/rpl_injector.h:
Removed some old types
sql/rpl_record.cc:
Removed some old types
Removed some not needed casts
Changed some buffers to be uchar* to avoid casts
sql/rpl_record.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/rpl_record_old.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/rpl_record_old.h:
Removed some old types
Changed some buffers to be uchar* to avoid cast
sql/rpl_rli.cc:
Removed some old types
sql/rpl_tblmap.cc:
Removed some old types
sql/rpl_tblmap.h:
Removed some old types
sql/rpl_utility.cc:
Removed some old types
sql/rpl_utility.h:
Removed some old types
Changed type of m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length
sql/set_var.cc:
Removed some old types
Updated parameters to dirname_part()
sql/set_var.h:
Removed some old types
sql/slave.cc:
Removed some old types
Changed some string lengths to use size_t
sql/slave.h:
Removed some old types
sql/sp.cc:
Removed some old types
Added missing casts for printf()
sql/sp.h:
Removed some old types
Updated hash-get-key function arguments
sql/sp_cache.cc:
Removed some old types
Added missing casts for printf()
Updated hash-get-key function arguments
sql/sp_head.cc:
Removed some old types
Added missing casts for alloc() and printf()
Added required casts
Updated hash-get-key function arguments
sql/sp_head.h:
Removed some old types
sql/sp_pcontext.cc:
Removed some old types
sql/sp_pcontext.h:
Removed some old types
sql/sql_acl.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added required casts
sql/sql_analyse.cc:
Changed some buffers to be uchar* to avoid casts
sql/sql_analyse.h:
Changed some buffers to be uchar* to avoid casts
sql/sql_array.h:
Removed some old types
sql/sql_base.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_binlog.cc:
Removed some old types
Added missing casts for printf()
sql/sql_cache.cc:
Removed some old types
Updated hash-get-key function arguments
Removed some not needed casts
Changed some string lengths to use size_t
sql/sql_cache.h:
Removed some old types
Removed reference to not existing function cache_key()
Updated hash-get-key function arguments
sql/sql_class.cc:
Removed some old types
Updated hash-get-key function arguments
Added missing casts for alloc()
Updated hash-get-key function arguments
Moved THD::max_row_length() to table.cc (as it's not depending on THD)
Removed some not needed casts
sql/sql_class.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Removed some not needed casts
Changed some string lengths to use size_t
Moved max_row_length and max_row_length_blob() to table.cc, as they are not depending on THD
sql/sql_connect.cc:
Removed some old types
Added required casts
sql/sql_db.cc:
Removed some old types
Removed some not needed casts
Added some cast to my_multi_malloc() arguments for safety
Added missing casts for alloc()
sql/sql_delete.cc:
Removed some old types
sql/sql_handler.cc:
Removed some old types
Updated hash-get-key function arguments
Added some cast to my_multi_malloc() arguments for safety
sql/sql_help.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_insert.cc:
Removed some old types
Added missing casts for alloc() and printf()
sql/sql_lex.cc:
Removed some old types
sql/sql_lex.h:
Removed some old types
Removed some not needed casts
sql/sql_list.h:
Removed some old types
Removed some not needed casts
sql/sql_load.cc:
Removed some old types
Removed compiler warning
sql/sql_manager.cc:
Removed some old types
sql/sql_map.cc:
Removed some old types
sql/sql_map.h:
Removed some old types
sql/sql_olap.cc:
Removed some old types
sql/sql_parse.cc:
Removed some old types
Trivial move of code lines to make things more readable
Changed some string lengths to use size_t
Added missing casts for alloc()
sql/sql_partition.cc:
Removed some old types
Removed compiler warnings about not used functions
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_partition.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/sql_plugin.cc:
Removed some old types
Added missing casts for alloc()
Updated hash-get-key function arguments
sql/sql_prepare.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Added missing casts for alloc() and printf()
sql-common/client.c:
Removed some old types
Changed some memory areas to use uchar*
sql-common/my_user.c:
Changed some string lengths to use size_t
sql-common/pack.c:
Changed some buffers to be uchar* to avoid casts
sql/sql_repl.cc:
Added required casts
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/sql_select.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some old types
sql/sql_select.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/sql_servers.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_show.cc:
Removed some old types
Added missing casts for alloc()
Removed some not needed casts
sql/sql_string.cc:
Removed some old types
Added required casts
sql/sql_table.cc:
Removed some old types
Removed compiler warning about not used variable
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_test.cc:
Removed some old types
sql/sql_trigger.cc:
Removed some old types
Added missing casts for alloc()
sql/sql_udf.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_union.cc:
Removed some old types
sql/sql_update.cc:
Removed some old types
Removed some not needed casts
sql/sql_view.cc:
Removed some old types
sql/sql_yacc.yy:
Removed some old types
Changed some string lengths to use size_t
Added missing casts for alloc()
sql/stacktrace.c:
Removed some old types
sql/stacktrace.h:
Removed some old types
sql/structs.h:
Removed some old types
sql/table.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
Removed setting of LEX_STRING() arguments in declaration
Added required casts
More function comments
Moved max_row_length() here from sql_class.cc/sql_class.h
sql/table.h:
Removed some old types
Changed some string lengths to use size_t
sql/thr_malloc.cc:
Use void* as type for allocated memory area
Changed all functions to use size_t
sql/tzfile.h:
Changed some buffers to be uchar* to avoid casts
sql/tztime.cc:
Changed some buffers to be uchar* to avoid casts
Updated hash-get-key function arguments
Added missing casts for alloc()
Removed some not needed casts
sql/uniques.cc:
Removed some old types
Removed some not needed casts
sql/unireg.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added missing casts for alloc()
storage/archive/archive_reader.c:
Removed some old types
storage/archive/azio.c:
Removed some old types
Removed some not needed casts
storage/archive/ha_archive.cc:
Removed some old types
Changed type for 'frmblob' in archive_discover() to match handler
Updated hash-get-key function arguments
Removed some not needed casts
storage/archive/ha_archive.h:
Removed some old types
storage/blackhole/ha_blackhole.cc:
Removed some old types
storage/blackhole/ha_blackhole.h:
Removed some old types
storage/csv/ha_tina.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
storage/csv/ha_tina.h:
Removed some old types
Removed some not needed casts
storage/csv/transparent_file.cc:
Removed some old types
Changed type of 'bytes_read' to be able to detect read errors
Fixed indentation
storage/csv/transparent_file.h:
Removed some old types
storage/example/ha_example.cc:
Removed some old types
Updated hash-get-key function arguments
storage/example/ha_example.h:
Removed some old types
storage/federated/ha_federated.cc:
Removed some old types
Updated hash-get-key function arguments
Removed some not needed casts
storage/federated/ha_federated.h:
Removed some old types
storage/heap/_check.c:
Changed some buffers to be uchar* to avoid casts
storage/heap/_rectest.c:
Removed some old types
storage/heap/ha_heap.cc:
Removed some old types
storage/heap/ha_heap.h:
Removed some old types
storage/heap/heapdef.h:
Removed some old types
storage/heap/hp_block.c:
Removed some old types
Changed some string lengths to use size_t
storage/heap/hp_clear.c:
Removed some old types
storage/heap/hp_close.c:
Removed some old types
storage/heap/hp_create.c:
Removed some old types
storage/heap/hp_delete.c:
Removed some old types
storage/heap/hp_hash.c:
Removed some old types
storage/heap/hp_info.c:
Removed some old types
storage/heap/hp_open.c:
Removed some old types
storage/heap/hp_rfirst.c:
Removed some old types
storage/heap/hp_rkey.c:
Removed some old types
storage/heap/hp_rlast.c:
Removed some old types
storage/heap/hp_rnext.c:
Removed some old types
storage/heap/hp_rprev.c:
Removed some old types
storage/heap/hp_rrnd.c:
Removed some old types
storage/heap/hp_rsame.c:
Removed some old types
storage/heap/hp_scan.c:
Removed some old types
storage/heap/hp_test1.c:
Removed some old types
storage/heap/hp_test2.c:
Removed some old types
storage/heap/hp_update.c:
Removed some old types
storage/heap/hp_write.c:
Removed some old types
Changed some string lengths to use size_t
storage/innobase/handler/ha_innodb.cc:
Removed some old types
Updated hash-get-key function arguments
Added missing casts for alloc() and printf()
Removed some not needed casts
storage/innobase/handler/ha_innodb.h:
Removed some old types
storage/myisam/ft_boolean_search.c:
Removed some old types
storage/myisam/ft_nlq_search.c:
Removed some old types
storage/myisam/ft_parser.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/ft_static.c:
Removed some old types
storage/myisam/ft_stopwords.c:
Removed some old types
storage/myisam/ft_update.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/ftdefs.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/fulltext.h:
Removed some old types
storage/myisam/ha_myisam.cc:
Removed some old types
storage/myisam/ha_myisam.h:
Removed some old types
storage/myisam/mi_cache.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_check.c:
Removed some old types
storage/myisam/mi_checksum.c:
Removed some old types
storage/myisam/mi_close.c:
Removed some old types
storage/myisam/mi_create.c:
Removed some old types
storage/myisam/mi_delete.c:
Removed some old types
storage/myisam/mi_delete_all.c:
Removed some old types
storage/myisam/mi_dynrec.c:
Removed some old types
storage/myisam/mi_extra.c:
Removed some old types
storage/myisam/mi_key.c:
Removed some old types
storage/myisam/mi_locking.c:
Removed some old types
storage/myisam/mi_log.c:
Removed some old types
storage/myisam/mi_open.c:
Removed some old types
Removed some not needed casts
Check argument of my_write()/my_pwrite() in functions returning int
Added casting of string lengths to size_t
storage/myisam/mi_packrec.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_page.c:
Removed some old types
storage/myisam/mi_preload.c:
Removed some old types
storage/myisam/mi_range.c:
Removed some old types
storage/myisam/mi_rfirst.c:
Removed some old types
storage/myisam/mi_rkey.c:
Removed some old types
storage/myisam/mi_rlast.c:
Removed some old types
storage/myisam/mi_rnext.c:
Removed some old types
storage/myisam/mi_rnext_same.c:
Removed some old types
storage/myisam/mi_rprev.c:
Removed some old types
storage/myisam/mi_rrnd.c:
Removed some old types
storage/myisam/mi_rsame.c:
Removed some old types
storage/myisam/mi_rsamepos.c:
Removed some old types
storage/myisam/mi_scan.c:
Removed some old types
storage/myisam/mi_search.c:
Removed some old types
storage/myisam/mi_static.c:
Removed some old types
storage/myisam/mi_statrec.c:
Removed some old types
storage/myisam/mi_test1.c:
Removed some old types
storage/myisam/mi_test2.c:
Removed some old types
storage/myisam/mi_test3.c:
Removed some old types
storage/myisam/mi_unique.c:
Removed some old types
storage/myisam/mi_update.c:
Removed some old types
storage/myisam/mi_write.c:
Removed some old types
storage/myisam/myisam_ftdump.c:
Removed some old types
storage/myisam/myisamchk.c:
Removed some old types
storage/myisam/myisamdef.h:
Removed some old types
storage/myisam/myisamlog.c:
Removed some old types
Indentation fix
storage/myisam/myisampack.c:
Removed some old types
storage/myisam/rt_index.c:
Removed some old types
storage/myisam/rt_split.c:
Removed some old types
storage/myisam/sort.c:
Removed some old types
storage/myisam/sp_defs.h:
Removed some old types
storage/myisam/sp_key.c:
Removed some old types
storage/myisammrg/ha_myisammrg.cc:
Removed some old types
storage/myisammrg/ha_myisammrg.h:
Removed some old types
storage/myisammrg/myrg_close.c:
Removed some old types
storage/myisammrg/myrg_def.h:
Removed some old types
storage/myisammrg/myrg_delete.c:
Removed some old types
storage/myisammrg/myrg_open.c:
Removed some old types
Updated parameters to dirname_part()
storage/myisammrg/myrg_queue.c:
Removed some old types
storage/myisammrg/myrg_rfirst.c:
Removed some old types
storage/myisammrg/myrg_rkey.c:
Removed some old types
storage/myisammrg/myrg_rlast.c:
Removed some old types
storage/myisammrg/myrg_rnext.c:
Removed some old types
storage/myisammrg/myrg_rnext_same.c:
Removed some old types
storage/myisammrg/myrg_rprev.c:
Removed some old types
storage/myisammrg/myrg_rrnd.c:
Removed some old types
storage/myisammrg/myrg_rsame.c:
Removed some old types
storage/myisammrg/myrg_update.c:
Removed some old types
storage/myisammrg/myrg_write.c:
Removed some old types
storage/ndb/include/util/ndb_opts.h:
Removed some old types
storage/ndb/src/cw/cpcd/main.cpp:
Removed some old types
storage/ndb/src/kernel/vm/Configuration.cpp:
Removed some old types
storage/ndb/src/mgmclient/main.cpp:
Removed some old types
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Removed some old types
Removed old disabled code
storage/ndb/src/mgmsrv/main.cpp:
Removed some old types
storage/ndb/src/ndbapi/NdbBlob.cpp:
Removed some old types
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
Removed not used variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
Added required casts
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Added required casts
storage/ndb/tools/delete_all.cpp:
Removed some old types
storage/ndb/tools/desc.cpp:
Removed some old types
storage/ndb/tools/drop_index.cpp:
Removed some old types
storage/ndb/tools/drop_tab.cpp:
Removed some old types
storage/ndb/tools/listTables.cpp:
Removed some old types
storage/ndb/tools/ndb_config.cpp:
Removed some old types
storage/ndb/tools/restore/consumer_restore.cpp:
Changed some buffers to be uchar* to avoid casts with new defintion of packfrm()
storage/ndb/tools/restore/restore_main.cpp:
Removed some old types
storage/ndb/tools/select_all.cpp:
Removed some old types
storage/ndb/tools/select_count.cpp:
Removed some old types
storage/ndb/tools/waiter.cpp:
Removed some old types
strings/bchange.c:
Changed function to use uchar * and size_t
strings/bcmp.c:
Changed function to use uchar * and size_t
strings/bmove512.c:
Changed function to use uchar * and size_t
strings/bmove_upp.c:
Changed function to use uchar * and size_t
strings/ctype-big5.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-bin.c:
Changed functions to use size_t
strings/ctype-cp932.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-czech.c:
Fixed indentation
Changed functions to use size_t
strings/ctype-euc_kr.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-eucjpms.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-gb2312.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-gbk.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-latin1.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-mb.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-simple.c:
Changed functions to use size_t
Simpler loops for caseup/casedown
unsigned int -> uint
unsigned char -> uchar
strings/ctype-sjis.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-tis620.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-uca.c:
Changed functions to use size_t
unsigned char -> uchar
strings/ctype-ucs2.c:
Moved inclusion of stdarg.h to other includes
usigned char -> uchar
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-ujis.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-utf8.c:
Changed functions to use size_t
unsigned char -> uchar
Indentation fixes
strings/ctype-win1250ch.c:
Indentation fixes
Changed functions to use size_t
strings/ctype.c:
Changed functions to use size_t
strings/decimal.c:
Changed type for memory argument to uchar *
strings/do_ctype.c:
Indentation fixes
strings/my_strtoll10.c:
unsigned char -> uchar
strings/my_vsnprintf.c:
Changed functions to use size_t
strings/r_strinstr.c:
Removed some old types
Changed functions to use size_t
strings/str_test.c:
Removed some old types
strings/strappend.c:
Changed functions to use size_t
strings/strcont.c:
Removed some old types
strings/strfill.c:
Removed some old types
strings/strinstr.c:
Changed functions to use size_t
strings/strlen.c:
Changed functions to use size_t
strings/strmake.c:
Changed functions to use size_t
strings/strnlen.c:
Changed functions to use size_t
strings/strnmov.c:
Changed functions to use size_t
strings/strto.c:
unsigned char -> uchar
strings/strtod.c:
Changed functions to use size_t
strings/strxnmov.c:
Changed functions to use size_t
strings/xml.c:
Changed functions to use size_t
Indentation fixes
tests/mysql_client_test.c:
Removed some old types
tests/thread_test.c:
Removed some old types
vio/test-ssl.c:
Removed some old types
vio/test-sslclient.c:
Removed some old types
vio/test-sslserver.c:
Removed some old types
vio/vio.c:
Removed some old types
vio/vio_priv.h:
Removed some old types
Changed vio_read()/vio_write() to work with size_t
vio/viosocket.c:
Changed vio_read()/vio_write() to work with size_t
Indentation fixes
vio/viossl.c:
Changed vio_read()/vio_write() to work with size_t
Indentation fixes
vio/viosslfactories.c:
Removed some old types
vio/viotest-ssl.c:
Removed some old types
win/README:
More explanations
into chilla.local:/home/mydev/mysql-5.1-wl2936-two
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/ndb_dd_basic.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/ndb_dd_basic.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
mysys/hash.c:
Auto merged
sql/event_queue.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/structs.h:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
include/typelib.h:
WL#2936 - Falcon & MySQL plugin interface: server variables
Manual merge
mysys/typelib.c:
WL#2936 - Falcon & MySQL plugin interface: server variables
Manual merge
"Plugin Server Variables"
Post review cleanups.
sql/mysql_priv.h:
WL2936
move where sql_plugin.h is included earlier so that plugin_ref
declaration is available to sql/structs.h
sql/sql_class.cc:
WL2936 cleanup
remove lock_locals argument for plugin_thdvar_init()
sql/sql_connect.cc:
WL2936 cleanup
redundant call to plugin_thdvar_init()
sql/sql_plugin.cc:
WL2936 cleanup
remove lock_locals argument for plugin_thdvar_init()
renamed st_bookmark member from 'name' to 'key'.
split cleanup_variables() and remove free_memory argument.
sql/sql_plugin.h:
WL2936 cleanup
remove lock_locals argument for plugin_thdvar_init()
sql/structs.h:
WL2936 cleanup
remove ugly conditional compilation, use plugin_ref
"Server Variables for Plugins"
Implement support for plugins to declare server variables.
Demonstrate functionality by removing InnoDB specific code from sql/*
New feature for HASH - HASH_UNIQUE flag
New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
Completed support for plugin reference counting.
include/hash.h:
New flag for HASH
HASH_UNIQUE
include/my_getopt.h:
New data types for options: ENUM and SET.
Use typelib to enumerate possible values.
New flag variable:
my_getopt_skip_unknown
include/my_sys.h:
change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
include/mysql.h:
relocate inclusion of typelib due to longlong requirement
include/mysql/plugin.h:
wl2936
New declarations for plugin server variable support.
New functions for use by plugins
include/mysys_err.h:
new my_getopt return value: EXIT_ARGUMENT_INVALID
include/typelib.h:
new typelib function: find_typeset(), returns an int which is a SET of
the elements in the typelib
mysql-test/r/im_utils.result:
change to more specific command line settings
--skip-innodb => --skip-plugin-innodb
etc.
mysql-test/r/log_tables.result:
set default storage engine to MEMORY so that test will succeed even
when some of the other named storage engines are not present
mysql-test/r/ndb_dd_basic.result:
change in error message
mysql-test/r/partition_innodb.result:
change in results
mysql-test/r/ps_1general.result:
bdb doesn't exist, use myisam for a non-transactional engine
mysql-test/r/variables.result:
information schema doesn't sort row results for server variables.
mysql-test/t/log_tables.test:
set default storage engine to MEMORY so that test will succeed even
when some of the other named storage engines are not present
mysql-test/t/ndb_dd_basic.test:
ALTER LOGFILE GROUP no longer silently fail here
mysql-test/t/partition_innodb.test:
ALTER TABLE no longer silently fails for unknown storage engine
mysql-test/t/ps_1general.test:
remove unneccessary parts
use myisam as it is an always present non-transactional engine
mysql-test/t/variables.test:
information schema doesn't sort row results for server variables.
mysql-test/t/warnings_engine_disabled-master.opt:
use the new style command line option
mysys/array.c:
change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
mysys/hash.c:
New flag for HASH
HASH_UNIQUE
Implement HASH_UNIQUE functionality by performing a hash_search
mysys/my_getopt.c:
New data types for options: ENUM and SET.
Use typelib to enumerate possible values.
New flag variable:
my_getopt_skip_unknown
mysys/typelib.c:
new typelib function: find_typeset(), returns an int which is a SET of
the elements in the typelib
sql/ha_ndbcluster.cc:
use ha_statistic_increment() method instead of
statistic_increment() function
ha_ndbcluster variable has gone away.
sql/ha_partition.cc:
fix for reference counting
sql/ha_partition.h:
fix for reference counting
sql/handler.cc:
fixes for reference counting
sql/handler.h:
fixes for reference counting
some new methods to aid storage engine writers
sql/item_func.cc:
find_sys_var() function now requires thd
sql/item_sum.cc:
fixes for ref counting
sql/mysql_priv.h:
remove unneccessary globals.
new lock: LOCK_system_variables_hash
sql/mysqld.cc:
Remove InnoBase specific code.
Support plugin command line processing.
sql/set_var.cc:
Remove InnoBase specific declarations
Remove redundant declarations
changes to permit new variables at run time
changes for ref counting
sql/set_var.h:
changes to permit new variables at run time
changes for ref counting
sql/sql_base.cc:
changes for ref counting
sql/sql_cache.cc:
mark code as needing work in the future
sql/sql_class.cc:
new functions to aid plugin authors
initialize variables for dynamic plugin variables
sql/sql_class.h:
remove InnoBase specific declarations
New declarations for plugin variables.
sql/sql_connect.cc:
initialization and cleanup of plugin variables
sql/sql_delete.cc:
change for ref counting
sql/sql_insert.cc:
change for ref counting
sql/sql_lex.cc:
changes for ref counting and plugin variables
sql/sql_lex.h:
add properties for plugin ref counting,
add to distructor to clean up
sql/sql_partition.cc:
changes for ref counting
sql/sql_plugin.cc:
WL2936
Plugin Variables
New methods and code to support server variables for plugins.
New code to complete plugin reference counting
Debug code adds further indirection so that malloc debugging can be
used to aid finding plugin ref count leaks
sql/sql_plugin.h:
WL2936
Plugin Variables
New methods and code to support server variables for plugins.
New code to complete plugin reference counting
Debug code adds further indirection so that malloc debugging can be
used to aid finding plugin ref count leaks
sql/sql_repl.cc:
replication system variables moved here from set_var.cc
sql/sql_repl.h:
new function to initialise replication server variables
sql/sql_select.cc:
changes for ref counting
sql/sql_show.cc:
changes for ref counting
sql/sql_table.cc:
changes for ref counting
sql/sql_tablespace.cc:
use supplied functions instead of digging into data structures manually
sql/sql_yacc.yy:
changes for ref counting
find_sys_var() now requires thd parameter
changes on reporting errors to keep user-visible behaviour the same.
sql/structs.h:
changes for ref counting
sql/table.cc:
changes for ref counting
sql/table.h:
changes for ref counting
storage/federated/ha_federated.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/heap/ha_heap.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/innobase/handler/ha_innodb.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
WL2936
Move InnoBase specific code out of mysqld.cc and into here
Declare all required server variables for InnoBase
storage/innobase/include/trx0trx.h:
store a bit more state so that InnoBase does not have to dig into
mysqld internal data structures.
storage/myisam/ha_myisam.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/myisammrg/ha_myisammrg.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.
Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.
Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
BitKeeper/deleted/.del-SETUP.sh.rej:
Rename: BUILD/SETUP.sh.rej -> BitKeeper/deleted/.del-SETUP.sh.rej
BitKeeper/deleted/.del-configure.in.rej:
Rename: configure.in.rej -> BitKeeper/deleted/.del-configure.in.rej
BitKeeper/deleted/.del-my_global.h.rej:
Rename: include/my_global.h.rej -> BitKeeper/deleted/.del-my_global.h.rej
BitKeeper/deleted/.del-my_pthread.h.rej:
Rename: include/my_pthread.h.rej -> BitKeeper/deleted/.del-my_pthread.h.rej
BitKeeper/deleted/.del-mysql_client_test.c.rej:
Rename: tests/mysql_client_test.c.rej -> BitKeeper/deleted/.del-mysql_client_test.c.rej
BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89:
Rename: sql/mysqld.cc.rej -> BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89
BitKeeper/deleted/.del-sql_parse.cc.rej:
Rename: sql/sql_parse.cc.rej -> BitKeeper/deleted/.del-sql_parse.cc.rej
BitKeeper/deleted/.del-table.cc.rej:
Rename: sql/table.cc.rej -> BitKeeper/deleted/.del-table.cc.rej
BitKeeper/deleted/.del-thr_alarm.c.rej:
Rename: mysys/thr_alarm.c.rej -> BitKeeper/deleted/.del-thr_alarm.c.rej
BUILD/compile-pentium64:
Update this to be in line with compile-pentium
BUILD/compile-pentium:
Send command line options to SETUP.sh
BUILD/compile-solaris-sparc-debug:
Update scripts
BUILD/compile-solaris-sparc-forte:
Update scripts
BUILD/compile-solaris-sparc-purify:
Update scripts
BUILD/compile-solaris-sparc:
Update scripts
BitKeeper/deleted/.del-DbtupSystemRestart.cpp~15b54d7e4e75d2d:
Removed compiler warning
BitKeeper/deleted/.del-ha_berkeley.cc:
Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64
configure.in:
Added detection of port_create and port.h (for future)as
---
manual merge
BitKeeper/deleted/.del-ha_berkeley.h:
Moved get_auto_primary_key() to ha_berkeley.cc
BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b:
Fixed compiler warnings
BitKeeper/etc/ignore:
added storage/ndb/src/ndbapi/ndberror_check
client/mysqlbinlog.cc:
Removed not needed 'static' (caused compiler warning)
client/mysqldump.c:
Fixed compiler warnings from 'max' build
client/mysqltest.c:
Free warning and query memory no abort.
(Removes strange warnings on screen if mysql-test-run fails)
Removed compiler warnings
Portability fix for windows (windows doesn't have mode_t)
client/sql_string.h:
Removed compiler warning
cmd-line-utils/readline/xmalloc.c:
Fixed compiler warnings from 'max' build
extra/charset2html.c:
Fixed compiler warnings
extra/comp_err.c:
Fixed compiler warnings from 'max' build
extra/yassl/include/lock.hpp:
Fix for windows64
extra/yassl/include/openssl/ssl.h:
Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/include/socket_wrapper.hpp:
Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit
extra/yassl/include/yassl.hpp:
Fix for windows64
extra/yassl/src/ssl.cpp:
Removed compiler warning
Detect wrong parameter (Happens when running test suite on solaris)
Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/taocrypt/src/integer.cpp:
Fixed compiler warnings
extra/yassl/testsuite/testsuite.cpp:
Removed compiler warning
include/config-win.h:
Added HAVE_WINSOCK2 (for future)
include/my_dbug.h:
Fixed DBUG_PROCESS() so that we don't get compiler warnings for it
include/my_global.h:
Fixed unsafe define of uint4korr()
manual merge (ignore changes from 5.0)
Fixed warnings on win64 when using int5store and int6store
include/my_pthread.h:
Added my_thread_id typedef
Renamed 'my_thread_id() function to my_thead_dbug_id()
include/thr_alarm.h:
Make thr_alarm_kill() to depend on thread_id instead of thread
include/thr_lock.h:
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
libmysql/libmysql.def:
Fixed compiler warnings on win64
libmysqld/CMakeLists.txt:
Added missing files
libmysqld/Makefile.am:
Added new files
libmysqld/lib_sql.cc:
Remove not needed code (store_globals() now takes care of things)
mysql-test/lib/mtr_report.pl:
Removed wrong messages when using --extern
mysql-test/mysql-test-run.pl:
Fixed that --extern works
Print help on stdout instead of stderr (make it easier to pipe it to less)
Fixed typo that caused mysql-test-run.pl to fail on Solaris
mysql-test/r/keywords.result:
manual merge
mysql-test/r/ndb_lock.result:
After merge fixes
mysql-test/r/ps.result:
Portability fix
mysql-test/t/disabled.def:
Disabled ndb_alter_table as this very often fails for me (and have done it for a long time)
mysql-test/t/keywords.test:
manual merge
mysql-test/t/ndb_lock.test:
Added other possible error code
mysql-test/t/ps.test:
Portability fix (when compiling without DLOPEN)
mysql-test/t/wait_timeout.test:
Don't run this if we are not using a thread per connection (as other thread_handling code may not support timeouts)
mysys/base64.c:
Fixed compiler warnings on win64
mysys/mf_keycache.c:
Fixed compiler warnings
mysys/my_getopt.c:
Fixed compiler warning
mysys/my_init.c:
Fixed compiler warning
Re-indented long comment
mysys/my_thr_init.c:
Always use mysys_var->id to generate thread name (makes things uniform accross thread implementations and thread usage)
Always generate my_thread_name() when using DBUG
Ensure mysys_var->pthread_self is set
Fixed compiler warnings
mysys/ptr_cmp.c:
Fixed compiler warnings from 'max' build
mysys/thr_alarm.c:
Change thr_alarm_kill() to use mysys_var->id instead of thread id
Fixed compiler warning on windows
mysys/thr_lock.c:
Change thr_abort_locks_for_thread() to use mysys_var->id instead of thread id
Add purecov statements around not tested code
Fixed compiler warnings
mysys/thr_mutex.c:
my_thread_id() -> my_thread_dbug_id()
server-tools/instance-manager/guardian.cc:
Fixed compiler warning
server-tools/instance-manager/instance.cc:
Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
Fixed compiler warnings
server-tools/instance-manager/mysqlmanager.cc:
Fixed compiler warnings
sql/CMakeLists.txt:
Added missing files
sql/Makefile.am:
Added new files
sql/event_scheduler.cc:
Added pthread_exit() calls
Ensure DBUG_xxx calls are not made before my_thread_init()
Use common functions to set up thread handling
sql/field.h:
manual merge
sql/ha_ndbcluster.cc:
Removed some trivial 'current_thd' calls
sql/handler.cc:
Avoid warnings on KILL_CONNECTION
Don't print out null pointer with printf() (Causes crashes on Solaris)
sql/item.cc:
Fixed compiler warnings from 'max' build
sql/item_cmpfunc.cc:
After merge fixes
sql/item_func.cc:
Merge embedded and normal code usage
(GET_LOCK, RELEASE_LOCK now works on my_thread_id instead of pthread_t)
Fixed compiler warning
sql/item_strfunc.cc:
Fixed compiler warning
sql/item_timefunc.cc:
Fixed compiler warnings
sql/lock.cc:
Use (new) parameter to thr_abort_locks_for_thread()
sql/log.cc:
Fixed compiler warning
sql/log_event.cc:
Fixed compiler warnings about not used variable
sql/mysql_priv.h:
Remove TEST_NO_THREADS (not needed with new scheduler interface)
Added functions from sql_connect.cc and new functions from sql_parse.cc
sql/mysqld.cc:
Use thread_scheduler structure to dispatch calls (make code more dynamic)
Change --one-thread option to use thread_scheduler interface
Made ONE_THREAD option independent of DBUG_BUILD
--one-thread is now depricated. One should instead use '--thread-handling=no-threads'
Remove not used uname() function.
Split create_new_thread() into reusable sub functions.
Preliminary interface code for future thread_handling code.
Fixed compiler warnings
sql/parse_file.cc:
Don't send zero pointer to fn_format() (Causes crashes when using --debug)
sql/repl_failsafe.cc:
Setup pseudo_thread_id same way as other code
sql/set_var.cc:
Added variables 'thread_handling'
Prepare for future variable 'thread_pool_size'
Fixed compiler warnings
sql/set_var.h:
Fixed compiler warning
sql/slave.cc:
Setup pseudo_thread_id same way as other code
Removed not used signal mask
sql/sql_acl.cc:
Fixed compiler warnings from 'max' build
sql/sql_base.cc:
Fixed long comments
Normalized variable setup
Don't destroy value of thd->variables.pseduo_thread_id
More DBUG_PRINT()'s
More DBUG_ASSERT()'s
Fixed compiler warnings from 'max' build
sql/sql_class.cc:
Remove thd->real_id and thd->dbug_thread_id
Added DBUG_ASSERT()
Use thread_scheduler to signal threads to be killed.
In THD::store_globals(), set my_thread_var->id to be thd->thread_id.
Fixed compiler warnings
sql/sql_class.h:
Use 'my_thread_id' for internal thread id's
Remove not needed THD elements: block_signals and dbug_thread_id
Added 'thread_scheduler' scheduling extension element to THD
sql/sql_insert.cc:
After merge fixes
(This actually fixes a bug in old code when many connections are in use)
Setup pseudo_thread_id same way as other code
Removed not used signal mask
Initialize variable that may be used unitialized on error conditions (not fatal)
sql/sql_parse.cc:
Move connection related code to sql_connect.cc
Remove setting of signal mask (not needed)
Ensure TABLE_LIST->alias is set for generated TABLE_LIST elements (fixed core dumps when running with --debug)
Added previous 'optional' element to reset_mgh()
Removed not needed DBUG_PRINT call
sql/sql_partition.cc:
Fixed compiler warnings
sql/sql_prepare.cc:
Removed not needed casts
Fixed compiler warnings from 'max' build
sql/sql_select.cc:
Fixed compiler warnings
sql-bench/bench-init.pl.sh:
Added --one-missing-tests
sql-bench/example:
Better example
sql-bench/run-all-tests.sh:
Added --only-missing-tests
sql-bench/test-insert.sh:
Fixed wrong estimate of update_with_key_prefix
sql/sql_show.cc:
Don't send pthread_kill() to threads to detect if they exists.
(Not that useful and causes problems with future thread_handling code)
Fixed compiler warnings
sql/sql_table.cc:
Simplify code
Fixed compiler warnings
sql/sql_test.cc:
Remove dbug_thread_id from test output
sql/sql_view.cc:
Don't send zero pointer to fn_format()
sql/tztime.cc:
Fixed compiler warning
sql/udf_example.def:
Fixed compiler warnings on win64
sql/unireg.cc:
Initialize variable that may be used unitialized on error conditions
storage/archive/archive_test.c:
Fixed compiler warnings
storage/archive/azio.c:
Fixed compiler warnings
storage/innobase/dict/dict0crea.c:
Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0dict.c:
Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0load.c:
Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0mem.c:
Fixed compiler warnings detected on windows64
storage/innobase/eval/eval0proc.c:
Fixed compiler warnings detected on windows64
storage/innobase/handler/ha_innodb.cc:
Fixed compiler warnings detected on windows64
storage/innobase/include/ut0byte.ic:
Fixed compiler warnings on win64
storage/innobase/include/ut0ut.ic:
Fixed compiler warnings on win64
storage/innobase/mtr/mtr0log.c:
Fixed compiler warnings detected on windows64
storage/innobase/pars/pars0lex.l:
Fixed warnings on win64
storage/innobase/rem/rem0cmp.c:
Fixed compiler warnings detected on windows64
storage/innobase/row/row0mysql.c:
Fixed compiler warnings detected on windows64
storage/innobase/row/row0sel.c:
Fixed compiler warnings detected on windows64
storage/innobase/sync/sync0rw.c:
Fixed compiler warnings detected on windows64
storage/innobase/trx/trx0trx.c:
Fixed compiler warnings detected on windows64
storage/myisam/mi_log.c:
my_thread_id() -> my_thread_debug_id()
storage/myisam/mi_packrec.c:
Fixed compiler warnings detected on windows64
storage/myisam/myisamchk.c:
Fixed compiler warnings from 'max' build
storage/ndb/src/common/debugger/EventLogger.cpp:
Fixed compiler warnings
storage/ndb/src/common/util/ConfigValues.cpp:
Removed compiler warnings
storage/ndb/src/common/util/NdbSqlUtil.cpp:
Removed compiler warnings
storage/ndb/src/cw/cpcd/CPCD.hpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/blocks/diskpage.hpp:
Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc.cpp:
Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
Fixed compiler warnings
storage/ndb/src/mgmclient/main.cpp:
Fixed compiler warnings
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
Fixed compiler warnings
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
Fixed compiler warnings
storage/ndb/src/ndbapi/SignalSender.cpp:
Fixed compiler warnings
storage/ndb/tools/restore/consumer_restore.cpp:
Fixed compiler warnings
strings/ctype-ucs2.c:
Fixed compiler warnings
strings/ctype-utf8.c:
Fixed compiler warnings
strings/decimal.c:
Fixed compiler warnings
strings/my_strchr.c:
Fixed conflict between function and prototype
support-files/compiler_warnings.supp:
Ignore warnings from sql_yacc.cc that are hard to remove
Ignore some not important warnings from windows 64 bit build
Suppress warnings from bdb and (for the moment) warnings from ndb
Suppress all warnings for all pushbuild platforms (should make all trees green)
vio/viosslfactories.c:
Added DBUG_PRINT
BUILD/compile-pentium64-max:
New BitKeeper file ``BUILD/compile-pentium64-max''
libmysqld/scheduler.cc:
New BitKeeper file ``libmysqld/scheduler.cc''
libmysqld/sql_connect.cc:
New BitKeeper file ``libmysqld/sql_connect.cc''
mysql-test/include/one_thread_per_connection.inc:
New BitKeeper file ``mysql-test/include/one_thread_per_connection.inc''
mysql-test/r/no-threads.result:
New BitKeeper file ``mysql-test/r/no-threads.result''
mysql-test/r/one_thread_per_connection.require:
New BitKeeper file ``mysql-test/r/one_thread_per_connection.require''
mysql-test/t/no-threads-master.opt:
New BitKeeper file ``mysql-test/t/no-threads-master.opt''
mysql-test/t/no-threads.test:
New BitKeeper file ``mysql-test/t/no-threads.test''
sql/scheduler.cc:
New BitKeeper file ``sql/scheduler.cc''
sql/scheduler.h:
New BitKeeper file ``sql/scheduler.h''
sql/sql_connect.cc:
New BitKeeper file ``sql/sql_connect.cc''