Commit graph

231 commits

Author SHA1 Message Date
unknown
3477b50a32 Use same type for function declaration and definition 2006-11-13 13:45:40 +01:00
unknown
b4093b65be Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-11-07 13:45:56 +03:00
unknown
b2c40c1698 Merge mysql.com:/home/cps/mysql/trees/4.1-runtime-bug9191
into  mysql.com:/home/cps/mysql/trees/5.0-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/timezone2.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/time.cc:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
sql-common/my_time.c:
  manual merge
sql/item_timefunc.cc:
  manual merge
sql/tztime.cc:
  manual merge
2006-11-01 17:35:35 +03:00
unknown
8a7bc05288 Fix Bug #9191 "TIMESTAMP/from_unixtime() no longer accepts 2^31-1"
(4.1 version, with post-review fixes)
  
  The fix for another Bug (6439) limited FROM_UNIXTIME() to
  TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
  however unix timestamp in general is not considered to be limited 
  by this value. All dates up to power(2,31)-1 are valid.
  
  This patch extends allowed TIMESTAMP range so, that max
  TIMESTAMP value is power(2,31)-1. It also corrects
  FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
  max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
  is fixed accordingly to allow conversion of dates up to
  2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
  function to allow extended range of dates.
  
  The main problem solved in the patch is possible overflows
  of variables, used in broken-time representation to time_t
  conversion (required for UNIX_TIMESTAMP).


acinclude.m4:
  Add new macro to check time_t range
configure.in:
  Call the macro to check time_t range
include/my_time.h:
  Move time-related defines to proper place.
  Add a function to perform a rough check if
  a TIMESTAMP value fits into the boundaries.
  Note: it is defined as "static inline", as
  otherwise libmysql won't compile (due to the
  way how gcc handles "inline" directive).
mysql-test/r/func_time.result:
  Update test result
mysql-test/r/timezone.result:
  Update test result
mysql-test/r/timezone2.result:
  Update test result
mysql-test/t/func_time.test:
  Add test for Bug#9191 and update test to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone.test:
  Update old tests to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone2.test:
  Update tests for convert_tz to be consistent with new
  TIMESTAMP boundaries
sql/item_timefunc.cc:
  Fix convert_tz to allow dates from the new (extended)
  TIMESTAMP range
sql/mysql_priv.h:
  Move time handling defaults to my_time.h
sql-common/my_time.c:
  Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
  became possible. Here we make it safe against the overflows by stepping
  back from the boundary dates which are likely to trigger them.
sql/time.cc:
  Update TIME_to_timestamp to allow conversion of
  extended date range
sql/tztime.cc:
  Fix new (4.1) implementation of broken-down time representation
  to time_t conversion routine to avoid overflows during conversion
  of boundary dates
mysql-test/r/timezone4.result:
  New BitKeeper file ``mysql-test/r/timezone4.result''
mysql-test/t/timezone4-master.opt:
  New BitKeeper file ``mysql-test/t/timezone4-master.opt''
mysql-test/t/timezone4.test:
  New BitKeeper file ``mysql-test/t/timezone4.test''
2006-11-01 16:47:40 +03:00
unknown
0e33031804 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint-new


mysql-test/r/mysql.result:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-10-12 17:37:59 +02:00
unknown
4d45abc5d2 Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
sql-common/client.c:
  Auto merged
2006-10-12 11:30:07 +02:00
unknown
6cbc74a706 Add DBUG_ASSERT to check that mysql is not null when mysql_reconnect is called
Add DBUG_PRINT to show the value of mysql->reconnect
2006-10-12 10:27:44 +02:00
unknown
be0f6405c4 Merge polly.local:/tmp/maint/bug11655/my50-bug11655
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql-common/my_time.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
2006-10-12 11:28:44 +04:00
unknown
78f47fbf3a Merge polly.local:/tmp/maint/bug11655/my41-bug11655
into  polly.local:/tmp/maint/bug11655/my50-bug11655


sql/time.cc:
  Auto merged
include/my_time.h:
  Manually merged
mysql-test/r/func_sapdb.result:
  Manually merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
sql-common/my_time.c:
  Manually merged
sql/field.cc:
  Manually merged
sql/item_timefunc.cc:
  Manually merged
2006-10-11 14:16:30 +04:00
unknown
634d3ff2c6 Fixes a number of problems with time/datetime <-> string conversion functions:
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced


include/my_time.h:
  Added defines for the TIME limits
  Added defines for the warning flags set by str_to_time() and check_time_range()
  Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
  Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
  Fixed testcase which relied on incorrect behaviour
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
  Added check_time_range() to be used from str_to_time() and item_timefunc.cc
  Added new out-of-range flag to str_to_time() warnings
  Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
  Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
  Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
  Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
  Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
  Checks for 'unsigned int' overflows in Item_func_maketime
  Use make_time_with_warn() instead of make_time() in Item_func_maketime
  Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
  Check for return value of str_to_time() along with warning flags
2006-10-04 17:13:32 +04:00
unknown
6d77ba47e5 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/5.0


sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/table.cc:
  Auto merged
include/mysql_com.h:
  manual merge
mysql-test/r/ctype_utf8.result:
  manual merge
mysql-test/t/ctype_utf8.test:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-09-27 18:06:46 +05:00
unknown
abd883f4d0 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
unknown
146049d2e4 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-merge
into  mysql.com:/home/gluh/MySQL/Merge/5.0


include/mysql_com.h:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-09-07 15:17:46 +05:00
unknown
ddb9f8668f Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte


include/mysql_com.h:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN
mysql-test/r/ctype_utf8.result:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
mysql-test/t/ctype_utf8.test:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
sql-common/client.c:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/sql_acl.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that user name is not longer than USERNAME_LENGTH symbols
sql/sql_parse.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/table.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that db name is not longer than NAME_LEN symbols
2006-08-30 15:56:17 +05:00
unknown
3f53d3d57d Merge zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-release_mergable
into  zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-maint


include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
sql-common/client.c:
  Auto merged
2006-08-25 11:55:43 -04:00
unknown
0c1ccbf014 Bug#21543: 5.0.24 breaks ABI compatibility for python bindings: \
InterfaceError on connect

Removed the bool flag from the st_mysql_options struct, since it adds 
another word in size to the memory size and shifts member memory locations
down, both of which break binary-interface compatibility.

Instead, use a flag, 2**30, in the client_options bit-field to represent
that the client should check the SSL certificate of the server.


include/mysql.h:
  Do not change the struct size.
include/mysql_com.h:
  Add a new bit-flag for client verifying server SSL certificate.
  
  Emphasize that we're not stepping on anyone else's bit/toes.
sql-common/client.c:
  Set and read the bit-field for client-side SSL-cert checking of the server.
2006-08-25 11:54:33 -04:00
unknown
256ac388eb Bug#7192 Specify --with-collation doesn't work for connections?
--with-collation worked only on the server side.
Client side ignored this argument, so collation_connection
was not properly set (remained latin1_swedish_ci).



sql-common/client.c:
  - Take into account MYSQL_DEFAULT_COLLATION_NAME if
  character set is not set using mysql_option(), to
  honor --with-collation argument to configure.
  - Use default collation for the character set when it's
  not set using mysql_option().
2006-08-11 13:14:26 +05:00
unknown
ed44a2ee51 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_group.result:
  Merge manually
mysql-test/t/func_group.test:
  Merge manually
2006-08-03 09:32:58 +02:00
unknown
f3919e9284 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


include/mysql.h:
  Auto merged
include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-02 14:13:01 +04:00
unknown
36510232aa A fix and a test case for Bug#15752 "Lost connection to MySQL server
when calling a SP from C API"

The bug was caused by lack of checks for misuse in mysql_real_query. 
A stored procedure always returns at least one result, which is the 
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this 
result and ivnoked the next query. In turn, libmysql had no check for 
such scenario and mysql_real_query was simply trying to send that query 
without reading the pending response, thus messing up the communication
protocol.

The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.


client/mysqlbinlog.cc:
  net_safe_read -> cli_safe_read
include/mysql.h:
  Remove a private function from the public header.
include/mysql_com.h:
  Remove a define that is never used.
include/sql_common.h:
  Add a declaration for cli_safe_read - a function that reads one packet
  from the server.
libmysql/libmysql.c:
  net_safe_read -> cli_safe_read
  Return CR_COMMANDS_OUT_OF_SYNC on attempt to execute a statement
  using a connection which has pending result sets.
sql-common/client.c:
  Actual fix for Bug#15752: if the server has pending result sets for
  the client, return CR_COMMANDS_OUT_OF_SYNC on attempt to execute
  another query. Similarly to the behaviour of mysql_use_result(),
  multiple result sets block the connection and must be fetched
  before it can be used for another query.
  This uncovered an error in the protocol: the server doesn't drop
  SERVER_MORE_RESULTS_EXISTS status flag upon an error, so in case of
  a multi-query like SELECT 1; SELECT syntax_error; SELECT 2; 
  the client has no way to know that the server won't ever come to 
  execution of the third query and won't return any result sets for it.
  For now, fix it in cli_safe_read, as a proper fix requires extension
  of the client-server protocol.
sql/protocol.cc:
  Remove a name that is never used.
sql/slave.cc:
  net_safe_read -> cli_safe_read
tests/mysql_client_test.c:
  Make 'query' a local variable to avoid name clash.
  Add a test case for Bug#15752 "Lost connection to MySQL server when
  calling an SP from C API"
2006-07-24 14:56:53 +04:00
unknown
7b8285c956 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 11:06:08 +02:00
unknown
8819a677cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370


mysql-test/r/date_formats.result:
  Auto merged
2006-07-23 13:43:44 +05:00
unknown
2dfdcae398 Merge mysql.com:/home/hf/work/mysql-4.1.mrg
into  mysql.com:/home/hf/work/mysql-5.0.mrg


libmysqld/embedded_priv.h:
  Auto merged
sql-common/client.c:
  Auto merged
include/mysql.h:
  merging
libmysql/libmysql.c:
  merging
libmysqld/lib_sql.cc:
  merging
libmysqld/libmysqld.c:
  merging
sql/sql_parse.cc:
  merging
2006-07-18 14:52:29 +05:00
unknown
d9992cc79e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.16017


include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
libmysqld/libmysqld.c:
  merging
2006-07-13 22:32:18 +05:00
unknown
97a3d52682 Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
mysql-test/r/date_formats.result:
  Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
    - results adjusted
mysql-test/r/strict.result:
  Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
    - results adjusted
mysql-test/r/type_datetime.result:
  Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
    - results adjusted
mysql-test/t/strict.test:
  Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
    - tests adjusted
sql-common/my_time.c:
  Fix for bug #19370: DateTime datatype in MySQL has two bugs in it
    - Regardless of the title of the bug the only real bug is that it
      doesn't make sense to have only some invalid parts in a date.
      E.g. a valid day among invalid years or months is totally ambiguous 
      and we should refuse to guess what it means.
  
      To fix it, we add a check that both the year is zero and either day
      or month are zero (year and (day or month)), and if they are then  we
      reject such dates. Doing so should adequately fix the reported problem.
2006-07-12 11:38:11 +05:00
unknown
0b399f1d3f Merge mysql.com:/usr/home/bar/mysql-4.1.b7192
into  mysql.com:/usr/home/bar/mysql-5.0-kt


sql-common/client.c:
  Auto merged
2006-07-07 16:27:38 +05:00
unknown
e34b9cfb4a client.c:
Define 'mysql_get_ssl_cipher' even if no SSL built in, it is referenced in libmysql.def


sql-common/client.c:
  Define 'mysql_get_ssl_cipher' even if no SSL built in, it is referenced in libmysql.def
2006-07-03 20:08:38 +02:00
unknown
eebe37d051 Bug#7192 Specify --with-collation doesn't work for connections?
--with-collation worked only on the server side.
Client side ignored this argument, so collation_connection
was not properly set (remained latin1_swedish_ci).


sql-common/client.c:
  - Take into account MYSQL_DEFAULT_COLLATION_NAME if
  character set is not set using mysql_option(), to
  honor --with-collation argument to configure.
  - Use default collation for the character set when it's
  not set using mysql_option().
2006-06-30 16:48:18 +05:00
unknown
87257abe59 merging
libmysqld/libmysqld.c:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-26 22:32:02 +05:00
unknown
8b6c2d312b bug #20318 (ctype_ucs2_def test fails with embedded)
there was two problems about charsets in embedded server
1. mysys/charset.c - defined there default_charset_info variable is
modified by both server and client code (particularly when
--default-charset option is handled)
In embedded server we get two codelines modifying one variable.
I created separate default_client_charset_info for client code

2. mysql->charset and mysql->options.charset initialization isn't
properly done for embedded server - necessary calls added


include/sql_common.h:
  client charset info default declared
libmysqld/lib_sql.cc:
  thd_init_client_charset calls added
libmysqld/libmysqld.c:
  check_embedded_connection moved to client.c to avoid code duplication
sql-common/client.c:
  charset initialization moved to mysql_init_character_set to
  be used in embedded server
sql/sql_parse.cc:
  thread client charset initialization moved to thd_init_client_charset
  to avoid code duplication
2006-06-19 22:11:01 +05:00
unknown
eadcf20081 bug #16017 (memory leaks in embedded server)
There actually was 3 different problems -
hash_user_connections wasn't cleaned
one strdupped database name wasn't freed
and stmt->mem_root wasn't cleaned as it was
replased with mysql->field_alloc for result
For the last one - i made the library using stmt's
fields to store result if it's the case.


include/mysql.h:
  statement pointer added to the advanced_command to be checked in
  embedded server
include/sql_common.h:
  stmt added to the cli_advanced_command interface
libmysql/libmysql.c:
  stmt pointer now sent to advanced_command
libmysqld/embedded_priv.h:
  it's enough to send database name to check_embedded_connection
libmysqld/lib_sql.cc:
  Now we store result directly in the MYSQL_STMT structure to
  avoid extra copying
libmysqld/libmysqld.c:
  it's enough to only send database pointer to check_embedded_connection
sql-common/client.c:
  stmt fake attribute added to cli_advanced_command
sql/sql_parse.cc:
  hash_user_connections isn't used if no access checks compiled
2006-06-01 17:06:42 +05:00
unknown
e3d7061d66 Remove C++ comments
Formatting
2006-05-03 16:59:02 +02:00
unknown
88724885d5 Merge neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
include/mysql.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/client.c:
  SCCS merged
2006-04-26 22:24:25 +02:00
unknown
98a2008fd2 Backport fix for mysql client not using SSl library directly
- Add function mysql_get_ssl_cipher
 - Use function mysql_get_ssl_cipher from mysql


client/mysql.cc:
  Backport fix for mysql client not using SSl library directly
include/mysql.h:
  Backport fix for mysql client not using SSl library directly
libmysql/libmysql.def:
  Backport fix for mysql client not using SSl library directly
libmysqld/libmysqld.def:
  Backport fix for mysql client not using SSl library directly
sql-common/client.c:
  Backport fix for mysql client not using SSl library directly
2006-04-22 00:48:13 +02:00
unknown
c1d64ccc1b Bug#17208 SSL: client does not verify server certificate
- Add new function 'ssl_verify_server_cert' which is used if we are 
   connecting to the server with SSL. It will compare the hostname in 
   the server's cert against the hostname that we used when connecting 
   to the server. Will reject the connection if hostname does not match.
 - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options
   which will turn on checking of servers cert.
 - Add new argument "ssl-verify-server-cert" to all mysql* clients which 
   will activate the above option.
 - Generate a new server cert with 1024 bits that has "localhost" as the server name.


SSL/server-cert.pem:
  Generate a new server cert that has "localhost" as CN, so that we can test to verify the hostname we connected against with the hostname in the cert
client/client_priv.h:
  Add OPT_SSL_VERIFY_CERT
client/mysql.cc:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqladmin.cc:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqldump.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqlimport.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqlshow.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqltest.c:
  Always set opt_ssl_verify_server_cert on in mysqltest if we are using SSL
include/mysql.h:
  Add variable ssl_verify_cerver_cert
include/sslopt-longopts.h:
  Add ssl-verify-server-cert options to all clients.
include/sslopt-vars.h:
  Add opt_ssl_varify_server_cert to all clients.
sql-common/client.c:
  Add ssl_vertify_server_cert function which is executed if user has set the option ssl_verify_cerver_cert
vio/viosslfactories.c:
  Ask the SSL library to verify servers cert by setting the SSL_VERIFY_PEER flag
2006-04-18 17:58:27 +02:00
unknown
c3babee88a Fix up patch
sql-common/client.c:
  Remove the ssl_verify_server_cert will be added in separate patch
vio/viossl.c:
  Fix coding standard
vio/viosslfactories.c:
  Remove comment
2006-04-12 14:06:05 +02:00
unknown
6af90061f4 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-04-12 12:52:34 +02:00
unknown
a0f7e7558f Moving mysql_get_server_version() from libmysql.c to client.c,
as it is now required by mysql_set_character_set()


libmysql/libmysql.c:
  Removing mysql_get_server_version()
sql-common/client.c:
  Adding mysql_get_server_version()
2006-04-06 13:03:22 +05:00
unknown
f53c12c833 client.c:
Bug#18830 incompatibility new libraries with old server
  Additional 5.0 fix:
  applying the same patch to client.c.


sql-common/client.c:
  Bug#18830 incompatibility new libraries with old server
  Additional 5.0 fix:
  applying the same patch to client.c.
2006-04-06 12:43:13 +05:00
unknown
783780f1c9 Safer fix for Bug #18435 "5.0.19 libmysqlclient not ABI-compatible with 5.0.18"
This fixes the problem if someone is using struct MYSQL as part of another structure together with a shared
library


include/mysql.h:
  Safer fix for Bug #18435
sql-common/client.c:
  Safer fix for Bug #18435
2006-03-27 12:02:23 +03:00
unknown
3e6330e783 Make usage of the MYSQL struct in shared libraries compatible with MySQL 5.0.17 and
5.0.18 by not reseting or accessing the info_buffer member
2006-03-23 00:37:40 +02:00
unknown
b2d5243e97 Cleanup SSL implementation
Remove duplicate code
Merge common functions
Enforce MySQL coding standard


include/violite.h:
  Cleanup SSL implementation
sql-common/client.c:
  Cleanup SSL implementation
sql/mysql_priv.h:
  Cleanup SSL implementation
sql/mysqld.cc:
  Cleanup SSL implementation
sql/sql_acl.cc:
  Cleanup SSL implementation
vio/vio.c:
  Cleanup SSL implementation
vio/vio_priv.h:
  Cleanup SSL implementation
vio/viossl.c:
  Cleanup SSL implementation
vio/viosslfactories.c:
  Cleanup SSL implementation
2006-03-10 16:41:14 +01:00
unknown
0afb6ff660 Fixes to embedded server to be able to run tests with it
(Needed for "list of pushes" web page and autopush)


include/mysql.h:
  Fix to embedded server to be able to run tests on it
libmysql/libmysql.c:
  Fix to embedded server to be able to run tests on it
libmysqld/emb_qcache.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/embedded_priv.h:
  Fix to embedded server to be able to run tests on it
libmysqld/lib_sql.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/libmysqld.c:
  Fix to embedded server to be able to run tests on it
mysql-test/mysql-test-run.sh:
  Fix to embedded server to be able to run tests on it
mysql-test/r/binlog.result:
  Updated test for embedded server
mysql-test/r/ctype_cp932.result:
  Updated test for embedded server
mysql-test/r/innodb.result:
  Updated test for embedded server
mysql-test/r/mysqltest.result:
  Updated test for embedded server
mysql-test/r/query_cache.result:
  Updated test for embedded server
mysql-test/r/query_cache_notembedded.result:
  Updated test for embedded server
mysql-test/r/sp-error.result:
  Updated test for embedded server
mysql-test/r/sp.result:
  Updated test for embedded server
mysql-test/r/subselect.result:
  Updated test for embedded server
mysql-test/r/view.result:
  Updated test for embedded server
mysql-test/r/view_grant.result:
  Updated test for embedded server
mysql-test/t/backup.test:
  Updated test for embedded server
mysql-test/t/binlog.test:
  Updated test for embedded server
mysql-test/t/blackhole.test:
  Updated test for embedded server
mysql-test/t/compress.test:
  Updated test for embedded server
mysql-test/t/ctype_cp932.test:
  Updated test for embedded server
mysql-test/t/delayed.test:
  Updated test for embedded server
mysql-test/t/handler.test:
  Updated test for embedded server
mysql-test/t/innodb.test:
  Updated test for embedded server
mysql-test/t/mysql.test:
  Updated test for embedded server
mysql-test/t/mysql_client_test.test:
  Updated test for embedded server
mysql-test/t/mysqltest.test:
  Updated test for embedded server
mysql-test/t/query_cache.test:
  Updated test for embedded server
mysql-test/t/query_cache_notembedded.test:
  Updated test for embedded server
mysql-test/t/read_only.test:
  Updated test for embedded server
mysql-test/t/skip_grants.test:
  Updated test for embedded server
mysql-test/t/sp-destruct.test:
  Updated test for embedded server
mysql-test/t/sp-error.test:
  Updated test for embedded server
mysql-test/t/sp-threads.test:
  Updated test for embedded server
mysql-test/t/sp.test:
  Updated test for embedded server
mysql-test/t/subselect.test:
  Updated test for embedded server
mysql-test/t/temp_table.test:
  Updated test for embedded server
mysql-test/t/view.test:
  Updated test for embedded server
mysql-test/t/view_grant.test:
  Updated test for embedded server
mysql-test/t/wait_timeout.test:
  Updated test for embedded server
mysys/mf_dirname.c:
  Review fix: Don't access data outside of array
mysys/my_bitmap.c:
  Remove compiler warnings
scripts/mysql_fix_privilege_tables.sql:
  Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
sql-common/client.c:
  Updated test for embedded server
sql/item.cc:
  Remove DBUG_PRINT statement that can cause crashes when running with --debug
sql/mysqld.cc:
  Fix to embedded server to be able to run tests on it
sql/protocol.cc:
  Fix to embedded server to be able to run tests on it
  (Trivial reconstruction of code)
sql/protocol.h:
  Fix to embedded server to be able to run tests on it
sql/sql_base.cc:
  Better comment
sql/sql_class.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_class.h:
  Fix to embedded server to be able to run tests on it
sql/sql_cursor.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_parse.cc:
  Fix to embedded server to be able to run tests on it
  Don't crash for disabled commands when using embedded server
sql/sql_prepare.cc:
  Fix to embedded server to be able to run tests on it
mysql-test/r/ctype_cp932_notembedded.result:
  New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
mysql-test/r/innodb_notembedded.result:
  New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
mysql-test/r/sp.result.orig:
  New BitKeeper file ``mysql-test/r/sp.result.orig''
mysql-test/r/sp_notembedded.result:
  New BitKeeper file ``mysql-test/r/sp_notembedded.result''
mysql-test/r/subselect_notembedded.result:
  New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
mysql-test/t/ctype_cp932_notembedded.test:
  New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
mysql-test/t/innodb_notembedded.test:
  New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
mysql-test/t/sp.test.orig:
  New BitKeeper file ``mysql-test/t/sp.test.orig''
mysql-test/t/sp_notembedded.test:
  New BitKeeper file ``mysql-test/t/sp_notembedded.test''
mysql-test/t/subselect_notembedded.test:
  New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
2006-02-24 18:34:15 +02:00
unknown
d1ed8e22d1 Merge neptunus.(none):/home/msvensson/mysql/bug15719/my50-bug15719
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql-common/client.c:
  Auto merged
tests/mysql_client_test.c:
  Merge
2006-01-30 11:02:09 +01:00
unknown
f220f89212 Bug #15719 MYSQL_OPT_RECONNECT option is modified by mysql_real_connect
- Move init of "reconnect" variable to mysql_init 
 - Add test case to mysql_client_test.


sql-common/client.c:
  Move initialisation of reconnect variable to mysql_init instead of doing it in mysql_real_connect.
tests/mysql_client_test.c:
  Add test to check that reconnect is not modified by a call to mysql_real_connect
2006-01-26 11:20:59 +01:00
unknown
ad5ac3f897 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


client/mysqldump.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-01-16 18:09:04 +01:00
unknown
d4d29edb83 Fix for BUG#15110: mysqldump --triggers: does not include DEFINER clause
There are two main idea of this fix:
  - introduce a common function for server and client to split user value
    (<user name>@<host name>) into user name and host name parts;
  - dump DEFINER clause in correct format in mysqldump.


BitKeeper/etc/ignore:
  added client/my_user.c libmysqld/my_user.c sql/my_user.c
client/Makefile.am:
  Use my_user.c in linking of mysqldump executable.
client/mysqldump.c:
  Fix for BUG#15110(mysqldump --triggers: does not include DEFINER clause)
include/Makefile.am:
  Add my_user.c
include/mysql_com.h:
  Introduce a constant for max user length.
libmysqld/Makefile.am:
  Add my_user.c
mysql-test/r/mysqldump.result:
  Update result file.
sql-common/Makefile.am:
  Add my_user.c
sql/Makefile.am:
  Add my_user.c
sql/sp.cc:
  Use constant for max user length.
sql/sp_head.cc:
  Use common function to parse user value.
sql/sql_acl.cc:
  Use constant for max user length.
sql/sql_parse.cc:
  Use constant for max user length.
sql/sql_show.cc:
  Use constant for max user length.
sql/sql_trigger.cc:
  Use constant for max user length.
include/my_user.h:
  A header file for parse_user().
sql-common/my_user.c:
  A new file for parse_user() implementation.
2006-01-11 02:07:40 +03:00
unknown
c489cdebea merged
myisam/mi_delete.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-01-03 18:12:03 +01:00
unknown
307c0b77a1 many warnings (practically safe but annoying) corrected
client/mysqladmin.cc:
  don't use the handler after it's closed
client/mysqlbinlog.cc:
  memory leak
client/mysqldump.c:
  many "ignore return value" warnings, one "NULL dereference"
cmd-line-utils/libedit/history.c:
  memory leak
include/my_base.h:
  cleanup
libmysql/libmysql.c:
  "return value ignored" warning
myisam/mi_delete.c:
  "return value ignored" warning
myisam/myisampack.c:
  "out-of-bound access" warning
myisam/sort.c:
  "double free" warning
mysys/default_modify.c:
  "double free" warning
mysys/mf_iocache2.c:
  "return value ignored" warnings
mysys/my_bitmap.c:
  s/return/DBUG_RETURN/
mysys/my_error.c:
  memory leak
server-tools/instance-manager/parse.cc:
  "NULL dereference" warning
sql-common/client.c:
  "NULL dereference" warning
sql/field.cc:
  deadcode, "NULL dereference", "uninitialized" warnings
sql/field.h:
  unused parameters removed from constructor
sql/ha_myisam.cc:
  "return value ignored" warnings
sql/item.cc:
  "return value ignored" warnings
  changed constructor
sql/item_func.cc:
  "return value ignored" warnings
sql/log_event.cc:
  uninitialized warning
sql/opt_range.cc:
  "double free" and uninitialized warnings
sql/opt_range.h:
  "return value ignored" warning
sql/repl_failsafe.cc:
  "return value ignored" warning
sql/set_var.cc:
  "return value ignored" warning
sql/slave.cc:
  "return value ignored" warnings
sql/slave.h:
  new prototype
sql/sql_acl.cc:
  deadcode and "NULL dereference" warnings
sql/sql_db.cc:
  "return value ignored" warning
sql/sql_handler.cc:
  "NULL dereference" warning
sql/sql_help.cc:
  "NULL dereference" warning
sql/sql_insert.cc:
  "return value ignored" warning
sql/sql_parse.cc:
  "return value ignored" warning
  one more DBUG_ASSERT
sql/sql_repl.cc:
  "return value ignored" and memory leak warnings
sql/sql_show.cc:
  "return value ignored" and "NULL dereference"  warnings
sql/sql_test.cc:
  "return value ignored" warning
sql/table.cc:
  memory leak
sql/uniques.cc:
  "return value ignored" warning
  endspaces deleted
2006-01-03 17:54:54 +01:00
unknown
4db14a57e7 Merge mysql.com:/home/alexi/dev/mysql-4.1-12440
into  mysql.com:/home/alexi/dev/mysql-5.0-12440


mysql-test/r/type_time.result:
  Auto merged
ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
ndb/src/ndbapi/NdbRecAttr.cpp:
  Auto merged
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
sql-common/my_time.c:
  Auto merged
zlib/Makefile.am:
  Auto merged
2005-12-15 18:59:40 +03:00