Commit graph

364 commits

Author SHA1 Message Date
unknown
4c919abfb0 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-06-19 12:09:24 +02:00
unknown
6169a5ab11 after merge fix.
client/mysqldump.c:
  after merge fix.
    - 'lengths' declaration moved to the beginning of the block.
2006-05-29 12:32:08 +05:00
unknown
e9ad2183c3 manual merge 2006-05-29 11:17:38 +05:00
unknown
45710b7f47 BUG#17201: Improve handling of views.
client/mysqldump.c:
   Better view handling:
  
    Distinguish better between tables and views in the output.
    
    Add many comments about the distinctions between tables and views, and
    the tradeoffs that we make, notably that, since we don't maintain
    dependencies.
    
    get_table_structure: Clarify in the output that a view is first
    		       created as a workaround for the lack of
    		       dependencies.
    
    dump_table:  Return if we're trying to dump a view.
    
    dump_all_views_in_db: Don't call init_dumping.  It's already been done
                          in dump_all_tables_in_db.  This is the problem
                          reported in BUG#17201.
    
    Change the variable was_views to seen_views, and clarify the comment.
    The previous name was not overly "intuitive".
mysql-test/r/mysqldump.result:
  We no longer have spurious text in the results.
  Add results for the final test (BUG#17201)
mysql-test/t/mysqldump.test:
  Add a new test (BUG#17201)
2006-05-25 17:30:28 +09:30
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
dafa39f1c4 Fix version of DEFINER-clause in mysqldump.
Now DEFINER-clause in stored routines is expected to appear
in 5.0.20 release, not in 5.0.19. as it was supposed before.


client/mysqldump.c:
  Fixing version.
mysql-test/r/mysqldump.result:
  Updated the result file.
2006-03-10 22:23:04 +03:00
unknown
9a1fed13ee Implementation of WL#2897: Complete definer support in the stored routines.
The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION
statements. Almost all support of definer in stored routines had been already
done before this patch.

NOTE: this patch changes behaviour of dumping stored routines in mysqldump.
Before this patch, mysqldump did not dump DEFINER-clause for stored routines
and this was documented behaviour. In order to get full information about stored
routines, one should have dumped mysql.proc table. This patch changes this
behaviour, so that DEFINER-clause is dumped.

Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements
before this patch, the clause is covered by additional version-specific comments.


client/mysqldump.c:
  Updated the code for dumping stored routines: cover DEFINER-clause
  into version-specific comment.
mysql-test/r/gis.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/information_schema.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/mysqldump.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_ddl.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_sp.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/rpl_trigger.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/sp-security.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/sp.result:
  Updated result file after adding DEFINER-clause.
mysql-test/r/sql_mode.result:
  Updated result file after adding DEFINER-clause.
mysql-test/t/sp-security.test:
  Updated result file after adding DEFINER-clause.
sql/sp.cc:
  Added DEFINER-clause.
sql/sp_head.cc:
  Added a new convenient variant of set_definer() operation.
sql/sp_head.h:
  Updated result file after adding DEFINER-clause.
sql/sql_lex.h:
  Renamed trigger_definition_begin into stmt_definition_begin to be used for
  triggers and stored routines.
sql/sql_parse.cc:
  Check DEFINER-clause.
sql/sql_trigger.cc:
  Renamed trigger_definition_begin into stmt_definition_begin to be used for
  triggers and stored routines.
sql/sql_yacc.yy:
  Added DEFINER-clause.
2006-03-02 15:18:49 +03:00
unknown
7262273457 Change snprintf to my_snprintf
client/mysqldump.c:
  snprintf =>  my_snprintf
2006-02-23 16:08:28 +01:00
unknown
24c44a9bea Aix52 build fix
client/mysqldump.c:
  Declare variable in start of function
2006-02-23 14:06:29 +01:00
unknown
c9d8cb49ba Merge neptunus.(none):/home/msvensson/mysql/bug14871/my50-bug14871
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
2006-02-21 15:05:58 +01:00
unknown
15c3702598 Bug#14871 mysqldump: invalid view dump output
- Add comments with embeded veriosn info around the parts of the view syntax that are only supported by a certain version of MySQL Server


client/mysqldump.c:
  Use information_schema.views to gather information about the view, then replace some parts of the output from "SHOW CREATE VIEW" with comment markers with version, to make thos parts of the view syntax become parsed only of MySQL servers that supports it.
  Create common function "open_sql_file_for_table" to open the individual .sql file where to dump the table or view.
mysql-test/r/mysqldump.result:
  Update results
mysql-test/t/mysqldump.test:
  Add test to see that views can be deumped and reloaded alos when they contain "SECURITY TYPE", "CHECK OPTION" and "DEFINER"
2006-02-21 13:21:17 +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
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
3016ec15be Merge mysql.com:/home/jimw/my/mysql-4.1-13318
into  mysql.com:/home/jimw/my/mysql-5.0-clean


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Resolve conflicts
mysql-test/t/mysqldump.test:
  Resolve conflicts
2005-12-01 12:21:29 -08:00
unknown
b34c9cfb0f Merge mysql.com:/home/jimw/my/mysql-4.1-5792
into  mysql.com:/home/jimw/my/mysql-5.0-clean


client/mysql.cc:
  Auto merged
client/mysqladmin.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqlshow.c:
  Auto merged
client/mysqltest.c:
  Auto merged
2005-11-28 10:52:52 -08:00
unknown
eb92d6a1e3 Fix values printed by mysqldump for empty blob fields when
--hex-blob is used. (Bug #13318)


client/mysqldump.c:
  Don't use 0x... syntax for empty fields.
mysql-test/r/mysqldump.result:
  Add new results
mysql-test/t/mysqldump.test:
  Add new regression test
2005-11-23 17:31:44 -08:00
unknown
ac5159a86a Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0


client/mysqldump.c:
  Auto merged
2005-11-21 18:31:36 +01:00
unknown
3ecbc8e66e Fixed BUG #14554: mysqldump does not separate "ROW" and trigger
statement for tables created in the IGNORE_SPACE sql mode.


client/mysqldump.c:
  Modified dump_triggers_for_table(): if trigger statement returned
   by SHOW TRIGGERS query does not contain a leading white space,
   additional space is inserted between "ROW" and the statement.
   The leading white spaces are removed by yylex() in the
   IGNORE_SPACE sql mode.
mysql-test/r/mysqldump.result:
  Fixed test case result for bug 14554.
mysql-test/t/mysqldump.test:
  Added test case for bug 14554.
2005-11-21 13:36:48 +03:00
unknown
e8885320dd Netware specific changes for 5.0.16a
client/mysql.cc:
  Fixed option.
client/mysqladmin.cc:
  Fixed option.
client/mysqlbinlog.cc:
  Fixed option.
client/mysqlcheck.c:
  Fixed option.
client/mysqldump.c:
  Fixed option.
client/mysqlimport.c:
  Fixed option.
client/mysqlshow.c:
  Fixed option.
configure.in:
  Changed version for Netware.
myisam/myisamchk.c:
  Fixed option.
myisam/myisampack.c:
  Fixed option.
netware/mysql_test_run.c:
  NetWare specific changes:
  Define MYSQL_CHECK environment variable to make mysqlcheck test case pass
2005-11-18 18:25:46 +01:00
unknown
2b35ab1245 Merge paul@bk-internal.mysql.com:/home/bk/mysql-5.0
into  frost.snake.net:/Users/paul/bk/mysql-5.0


client/mysqldump.c:
  Auto merged
2005-10-28 14:26:22 -05:00
unknown
fd0ed478d3 Add DROP TABLE before trying to create view (in mysqldump)
Cleaned up xxxx_gis.test's and made gis_generic.inc independent of ndb
(Note that archive_gis.test fails, but this is independent of this patch)


client/mysqldump.c:
  Add DROP TABLE to be able to re-run mysqldump if it fails after 'table-named-as-view' is created
mysql-test/include/gis_generic.inc:
  Remove dependency of ndb
mysql-test/include/have_archive.inc:
  Fix syntax
mysql-test/include/have_geometry.inc:
  Fix syntax
mysql-test/r/mysqldump.result:
  New test results after adding 'drop table'
mysql-test/t/archive_gis.test:
  gis_generic tests for have_geometry.inc
mysql-test/t/bdb_gis.test:
  gis_generic tests for have_geometry.inc
mysql-test/t/innodb_gis.test:
  gis_generic tests for have_geometry.inc
mysql-test/t/ndb_gis.test:
  gis_generic tests for have_geometry.inc
sql/item_func.cc:
  Simplify code (as signal_divide_by_null sets 'null_value')
2005-10-27 22:45:18 +03:00
unknown
9cee62af2f Merge paul@bk-internal.mysql.com:/home/bk/mysql-5.0
into  frost.snake.net:/Users/paul/bk/mysql-5.0


client/mysqldump.c:
  Auto merged
2005-10-25 12:50:03 -05:00
unknown
cecdc15a0d This cset fixes BUG# 12838, 14061, 12129
mysqldump.result:
  BUG# 12838
      New test results for mysqldump -x on a DB with views
mysqldump.test:
  sqldump.test:
      BUG# 12838
      New test to run mysqldump -x on a DB with views
mysqldump.c:
  BUG# 12838
      Removed/Changed code which created tables to be put into the dump
      (For loading views of views) by creating temp tables and then using
      the CREATE TABLE information in those temp tables. The problem with this
      is that when mysqldump -x is called, it locks all tables, so the
      temp tables could not be created, causing the mysqldump to exit with
      failure. The code was changed to use SHOW FIELDS to get the column
      names and type to build CREATE TABLE text used to create these tables
      that views need in the dump.


client/mysqldump.c:
  BUG# 12838
      Removed/Changed code which created tables to be put into the dump
      (For loading views of views) by creating temp tables and then using
      the CREATE TABLE information in those temp tables. The problem with this
      is that when mysqldump -x is called, it locks all tables, so the
      temp tables could not be created, causing the mysqldump to exit with
      failure. The code was changed to use SHOW FIELDS to get the column
      names and type to build CREATE TABLE text used to create these tables
      that views need in the dump.
mysql-test/t/mysqldump.test:
  sqldump.test:
      BUG# 12838
      New test to run mysqldump -x on a DB with views
mysql-test/r/mysqldump.result:
  BUG# 12838
      New test results for mysqldump -x on a DB with views
2005-10-25 19:04:31 +02:00
unknown
c69cea4bf4 mysqldump.c:
Slight change to help message.


client/mysqldump.c:
  Slight change to help message.
2005-10-19 14:40:10 -05:00
unknown
75184ffa66 Changeset:
Changed option text in mysqldump.c
mysqldump.c:
  Changed text to read "+00:00" as opposed to "UTC" (per what the code does)


client/mysqldump.c:
  Changed text to read "+00:00" as opposed to "UTC" (per what the code does)
2005-10-18 18:51:07 -07:00
unknown
98b4390f17 BUG# 13052 Changed text in options to TIMESTAMP
client/mysqldump.c:
  BUG# 13052 Changed text in option to TIMESTAMP
2005-10-17 12:30:01 -07:00
unknown
b52b67eb58 BUG# 13146
Re-application of patch to clean 5.0 tree. Fixed issue with ANSI quotes 
when dumping triggers


client/mysqldump.c:
  BUG# 13146
  
  Re-application of fix to clean 5.0 tree. 
  
  Added comments for quote_name, moved declarations into proper order, 
  unset MASK_ANSI_QUOTES flag in opt_compatible_mode global when dumping
  triggers
mysql-test/r/mysqldump.result:
  BUG# 13146
  
  New test results
mysql-test/t/mysqldump.test:
  BUG# 13146
  
  New test
2005-10-13 13:42:56 -07:00
unknown
a247d3a3b7 Fix being able to set default TCP port for command-line utilities
by using MYSQL_TCP_PORT variable. (Bug #5792)


client/mysql.cc:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqladmin.cc:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqlbinlog.cc:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqlcheck.c:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqldump.c:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqlimport.c:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqlshow.c:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
client/mysqltest.c:
  Set default port to 0 so MYSQL_TCP_PORT is handled by mysql_server_init().
2005-10-13 12:28:43 -07:00
unknown
a2ceebf245 BUG# 13052
Clean application of patch - 
- Added --tz-utc to fix issue of dumping timestamp values between 
servers with different global time zone settings, particularly 
with regard to the day of DST changeover, which without this fix,
 would dump duplicate timestamp values.


client/client_priv.h:
  BUG# 13052 - clean application of http://lists.mysql.com/internals/30993
client/mysqldump.c:
  BUG# 13052
  
  Clean application of patch http://lists.mysql.com/internals/30993
  
  - added new --tz-utc option
  - added saving of TIME_ZONE in dump file
  - set TIME_ZONE to "+00:00" in dump
mysql-test/r/mysqldump.result:
  BUG# 13052 New results
mysql-test/t/mysqldump.test:
  BUG# 13052
  
  Added new test to test if the new option --tz-utc places 
  'SET TIME_ZONE="+00:00" at the top of the file and that this fixes 
  the problem of ending up with duplicate timestamp values that should
   be unique on eve of DST
2005-10-12 22:44:42 -07:00
unknown
0ce12f70ed Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code


client/mysqldump.c:
  Simple optimizations of new code
  Indentation fixes
client/mysqltest.c:
  Removed not needed variable
include/mysql_com.h:
  Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
  CHAR() now returns binary string as default
mysql-test/r/func_str.result:
  CHAR() now returns binary string as default
mysql-test/r/range.result:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
  CHAR() now returns binary string as default
mysql-test/r/view.result:
  More tests of view rename
mysql-test/t/ctype_utf8.test:
  CHAR() now returns binary string as default
mysql-test/t/func_str.test:
  CHAR() now returns binary string as default
mysql-test/t/range.test:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
  More tests of view rename
mysys/mf_keycache.c:
  Indentation changes
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
  Fix to MySQL coding style
  Optimized functions
mysys/thr_lock.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
  Use octet2hex()
sql/ha_ndbcluster.cc:
  Removed not used variable
sql/handler.cc:
  Simplify code
  Use *NONE* instead of 'none' for not existing storage engine
  Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
  Remove not needed test for *ref.  (If ref is set, it should never point at 0)
sql/item_func.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  Simplify code
  More comments
  Require that last argument to find_and_check_access() is given
  (Made code shorter and faster)
sql/item_strfunc.cc:
  Changed CHAR() to return result in binary collation
  CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
  
  Bar will shortly add the following syntax:
  CHAR(.... USING character_set)
  and ensure that
  CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
  Use ocet2hex()
sql/item_strfunc.h:
  CHAR() now returns a binary string
sql/log_event.cc:
  Use octet2hex()
  Simplify code
sql/parse_file.cc:
  Indentation fixes
  Use for() instead of while()
sql/password.c:
  Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
  Indentation fixes
sql/sql_insert.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
  Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
  Fixed wrong merge
sql/sql_select.cc:
  Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
  Removed not used variable
sql/sql_table.cc:
  Indentation fixed
  Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
  Simplify code
sql/unireg.cc:
  Use octet2hex()
2005-10-12 00:58:22 +03:00
unknown
c2621f3dcb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


BUILD/SETUP.sh:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_inno.result:
  Auto merged
mysql-test/r/multi_statement.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/temp_table.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/information_schema_inno.test:
  Auto merged
mysql-test/t/multi_statement.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
strings/decimal.c:
  Auto merged
sql/sql_parse.cc:
  manual merge
sql/sql_prepare.cc:
  manual merge
sql/table.cc:
  manual merge
2005-10-08 03:37:23 +03:00
unknown
c807724f36 Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code



BUILD/FINISH.sh:
  Ensure that ccache is also used for C programs
BUILD/SETUP.sh:
  Ensure that ccache is also used for C programs
client/mysql.cc:
  More debugging
  Ensure that 'delimiter' works the same way in batch mode as in normal mode.
  Compare 'delimiter' command case-insensitive.
  The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump.
client/mysqldump.c:
  Indentation fixes
  Use ;; as a delmimiter for stored procedures and triggers instead of //
client/mysqltest.c:
  Indentation fixes
include/my_sys.h:
  Remove not needed MY_UNIX_PATH parameter
mysql-test/r/alter_table.result:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/r/func_str.result:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/r/information_schema.result:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/r/information_schema_inno.result:
  Drop all used tables
mysql-test/r/multi_statement.result:
  Drop used tables
mysql-test/r/mysql.result:
  Add error messages to result
mysql-test/r/mysqldump.result:
  ;; is now used as SP/trigger delimiter
mysql-test/r/mysqlshow.result:
  Drop used tables
mysql-test/r/temp_table.result:
  Drop used views
  Rename views to v#
mysql-test/t/alter_table.test:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/t/func_str.test:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/t/information_schema.test:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/t/information_schema_inno.test:
  Drop all used tables
mysql-test/t/multi_statement.test:
  Drop used tables
mysql-test/t/mysql.test:
  Add error messages to result
mysql-test/t/mysqlshow.test:
  Drop used tables
mysql-test/t/temp_table.test:
  Drop used views
  Rename views to v#
mysys/mf_format.c:
  Remove not needed MY_UNIX_PATH parameter
  (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH)
sql/ha_federated.cc:
  Removed extra empty line
sql/item.cc:
  Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal
  Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable
  One doesn't have to set 'null_value' when calling 'is_null()'
sql/item.h:
  Add THD as a class variable to Item_splocal
  Use 'str_value' instead of 'str_value_ptr' to hold temp result
  Fixed bug in Item_hex when used in CAST()
sql/item_func.cc:
  Optimize new code
sql/log_event.cc:
  Move 'to_unix_path()' out of fn_format()
sql/opt_range.cc:
  Simplify code
sql/sp_head.cc:
  Ensure that Item_splocal has thd set before we call '->this_item()'
sql/sql_class.cc:
  Return error if Statement::insert() fails in either hash_insert()
sql/sql_parse.cc:
  Remove 'current_db_used' as we can trivially check if db table qualifier was used without this.
  Simplify code
sql/sql_prepare.cc:
  Use enum instead of const int, to avoid ugly code for VC++
sql/structs.h:
  Remove compiler warnings when using STRING_WITH_LEN() with constant strings.
sql/table.cc:
  Fixed indentation
sql/table.h:
  Remove not needed current_db_used
strings/decimal.c:
  Simplify code
strings/longlong2str-x86.s:
  A bit faster longlong2str.
  (Took some ideas from Peter Gulutzan's code)
strings/my_strtoll10.c:
  Simplify code for MetroWerks compiler
2005-10-06 17:54:43 +03:00
unknown
13651fa55b BUG #7815 - Post-review fixes required for push.
client/mysqldump.c:
  BUG #7815
  
  Pre-push fixes requested per Sergei's review.
2005-09-27 09:40:51 -07:00
unknown
f0a9ad917a BUG #7815
Changes per serg to http://lists.mysql.com/internals/30281

Re-enabled --delayed-insert


client/mysqldump.c:
  BUG #7815 
  
  Changes per serg on patch: http://lists.mysql.com/internals/30281
  
  1. Re-enabled --delayed-insert
       - modified options, removed code that was in place until bug was 
         fixed    
  2. Moved the call to get_table_structure to dump_table 
    - Use added 'ignore_flag' variable to determine what exactly is
      being ignored - whole table or just delayed insert ability
  3. Changed return type of ignore_table to char with byte value that
     determines what exactly is being ignored - the whole table, or
     delayed inserts
  4. Added ignore_table flags IGNORE_DATA and IGNORE_INSERT_DELAYED
  5. Added logic in get_table_structure to not append INSERT data text
     if the table's data isn't going to be dumped because the return
     value from ignore_table is IGNORE_DATA
  6. Changed the name of numFields to numfields. Studly caps aren't
     consistent with the rest of the code!
  7. Added inclusive list to check_if_ignore_table to set the flag to
     IGNORE_INSERT_DELAYED if the table type doesn't support delayed
     inserts.
  8. More documentation
mysql-test/r/mysqldump.result:
  BUG #7815 new results
mysql-test/r/mysqldump-max.result:
  BUG #7815
  
  New test results
mysql-test/t/mysqldump-max.test:
  BUG #7815
  New test for testing if insert delayed is applied to tables that support
  it in mysqldump, but only if all storage engines in test have been compiled
  in
2005-09-26 22:43:09 -07:00
unknown
840ab3dd1e enabled mysqldump hex-blob option for bit fields 2005-09-14 15:46:31 +02:00
unknown
4f4ab005af Removed compiler warnings 2005-09-14 04:40:18 +03:00
unknown
21f4f6cfba after pull review - many bugs in mysqldump --routines
mysql-test/r/mysqldump.result:
  updated
mysql-test/t/mysqldump.test:
  cleanup, new test
2005-09-13 19:32:37 +02:00
unknown
cb03cbae7d Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  radha.local:/Users/patg/mysql-build/mysql-5.0.bug12597


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  resolving conflicts in order to push for bug #12597
mysql-test/t/mysqldump.test:
  resolving conflicts for pushing to bug #12597
2005-09-10 01:50:38 +02:00
unknown
6c2312842f BUG #12597 This is a complete patch (2nd) containing fixes per Serg's review
client/mysqldump.c:
  BUG #12597
  - Dump triggers after data dump of each table
  - created dump_triggers_for_table function
  - added space between "MODE" and "*/"
mysql-test/r/mysqldump.result:
  Tests to test BUG #12597
mysql-test/t/mysqldump.test:
  BUG #12597
  - New tests to test bug #12597
2005-09-09 00:03:07 +02:00
unknown
b024d74fb2 BUG #9056 Changes to patch #2 per Serg's review
client/mysqldump.c:
  BUG #9056 Fixes per serg
  * if opt_lock for locking mysql.proc
  * calling mysql_query_with_error_report where needed
  * print functions same way as procs, file bug about commented functions
mysql-test/r/mysqldump.result:
  BUG #9056 New results
mysql-test/t/mysqldump.test:
  BUG #9056 Removed redirect, simplified, dump in results, per Serg
2005-09-08 19:45:25 +02:00
unknown
3058d9fd44 BUG #9056 Added --routines flag to mysqldump to enable mysqldump to be able
to dump PROCEDURES and FUNCTIONS.


client/mysqldump.c:
  BUG #9056, added dumping of functions/procs to mysqldump
  - added opt_routines (--routines/-R)
  - added dump_routines_for_db, function that dumps proc and funcs
  - added calling of dump_routines to dump_all_tables_in_db and dump_selected_tables
mysql-test/r/mysqldump.result:
  BUG #9056 new test results for mysqldump --routines
mysql-test/t/mysqldump.test:
  BUG #9056 New tests for mysqldump --routines
2005-09-04 01:34:58 +02:00
unknown
9d4a4f38d0 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0


BitKeeper/deleted/.del-isamchk.c~c0f59c2687d2248f:
  Auto merged
BitKeeper/etc/config:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqlcheck.c:
  Auto merged
BitKeeper/deleted/.del-pack_isam.c~43801f0df7504834:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqlshow.c:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/my_print_defaults.c:
  Auto merged
extra/perror.c:
  Auto merged
extra/resolve_stack_dump.c:
  Auto merged
include/help_end.h:
  Auto merged
include/help_start.h:
  Auto merged
myisam/myisamchk.c:
  Auto merged
myisam/myisamlog.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
netware/myisamchk.def:
  Auto merged
netware/mysql.def:
  Auto merged
netware/mysql_test_run.c:
  Auto merged
netware/mysqladmin.def:
  Auto merged
netware/mysqlbinlog.def:
  Auto merged
netware/mysqlcheck.def:
  Auto merged
netware/mysqld_safe.c:
  Auto merged
netware/mysqldump.def:
  Auto merged
netware/mysqlimport.def:
  Auto merged
netware/mysqlshow.def:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_blackhole.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
client/client_priv.h:
  Merged from 4.1
client/mysqladmin.cc:
  Merged from 4.1
client/mysqlbinlog.cc:
  Merged from 4.1
mysys/charset.c:
  Merged from 4.1
2005-08-26 15:56:52 +03:00
unknown
ea09b97036 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1


client/mysqlcheck.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/my_print_defaults.c:
  Auto merged
extra/perror.c:
  Auto merged
extra/resolve_stack_dump.c:
  Auto merged
include/help_end.h:
  Auto merged
include/help_start.h:
  Auto merged
isam/isamchk.c:
  Auto merged
isam/pack_isam.c:
  Auto merged
myisam/myisamlog.c:
  Auto merged
netware/myisamchk.def:
  Auto merged
netware/mysql.def:
  Auto merged
netware/mysqladmin.def:
  Auto merged
netware/mysqlbinlog.def:
  Auto merged
netware/mysqlcheck.def:
  Auto merged
netware/mysqldump.def:
  Auto merged
netware/mysqlimport.def:
  Auto merged
netware/mysqlshow.def:
  Auto merged
client/client_priv.h:
  Merged from 4.0.
client/mysql.cc:
  Merged from 4.0.
client/mysqladmin.cc:
  Merged from 4.0.
client/mysqlbinlog.cc:
  Merged from 4.0.
client/mysqldump.c:
  Merged from 4.0.
client/mysqlshow.c:
  Merged from 4.0.
myisam/myisamchk.c:
  Merged from 4.0.
myisam/myisampack.c:
  Merged from 4.0.
netware/mysql_test_run.c:
  Merged from 4.0.
netware/mysqld_safe.c:
  Merged from 4.0.
sql/mysqld.cc:
  Merged from 4.0.
2005-08-25 12:08:26 +03:00
unknown
97dbe8dbe3 Several fixes for Netware.
client/client_priv.h:
  Added option auto close for Netware.
client/mysql.cc:
  Added option auto close for Netware.
client/mysqladmin.c:
  Added option auto close for Netware.
client/mysqlbinlog.cc:
  Added option auto close for Netware.
client/mysqlcheck.c:
  Added option auto close for Netware.
client/mysqldump.c:
  Added option auto close for Netware.
client/mysqlimport.c:
  Added option auto close for Netware.
client/mysqlshow.c:
  Added option auto close for Netware.
client/mysqltest.c:
  Fixed help messages for Netware.
extra/my_print_defaults.c:
  Fixed help messages for Netware.
extra/perror.c:
  Fixed help messages for Netware.
extra/resolve_stack_dump.c:
  Fixed help messages for Netware.
include/help_end.h:
  Fixed help messages for Netware.
include/help_start.h:
  Fixed help messages for Netware.
isam/isamchk.c:
  Added auto close of window for Netware
isam/pack_isam.c:
  Added auto close of window for Netware
myisam/myisamchk.c:
  Added auto close of window for Netware
myisam/myisamlog.c:
  Added help for Netware.
myisam/myisampack.c:
  Added auto close for Netware.
netware/myisamchk.def:
  Scrollable screen patch.
netware/mysql.def:
  Scrollable screen patch.
netware/mysql_test_run.c:
  Fixed strindex for Netware.
netware/mysqladmin.def:
  Scrollable screen patch.
netware/mysqlbinlog.def:
  Scrollable screen patch.
netware/mysqlcheck.def:
  Scrollable screen patch.
netware/mysqld_safe.c:
  Removed debug message for Netware.
netware/mysqldump.def:
  Scrollable screen patch.
netware/mysqlimport.def:
  Scrollable screen patch.
netware/mysqlshow.def:
  Scrollable screen patch.
sql/mysqld.cc:
  Abnormal end patch when shutting down and volume not ready.
2005-08-24 22:03:34 +03:00
unknown
e43a609600 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0


mysql-test/t/sp.test:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
client/client_priv.h:
  Simple merge
client/mysqldump.c:
  Simple merge
mysql-test/r/variables.result:
  Simple merge
mysql-test/t/variables.test:
  Simple merge
sql/sql_trigger.cc:
  Simple merge
2005-07-31 12:56:02 +03:00
unknown
6b3478ec12 Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.


client/client_priv.h:
  Added OPT_TRIGGERS (to get rid of compiler warning)
client/mysql.cc:
  Added cast to get rid of compiler warning
client/mysqldump.c:
  Added OPT_TRIGGERS (to get rid of compiler warning)
  Abort if we can't write to outfile (even if --ignore-errors is given)
client/mysqltest.c:
  Added --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
include/my_sys.h:
  Make my_progname const
include/my_time.h:
  Avoid using 'bool' in C programs
mysql-test/lib/init_db.sql:
  Align with mysql_create_system_tables
  (Ideally this file should be auto-generated from the above script)
mysql-test/r/mysqltest.result:
  Test for --enable_parsing
mysql-test/r/variables.result:
  Update results after fix for overflow checking of max_heap_table_size
mysql-test/t/information_schema.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/mysqltest.test:
  Test for --enable_parsing
mysql-test/t/sp.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/variables.test:
  Portability fix for 64 bit systems
mysql-test/t/view.test:
  USe --enable/disable parsing instead of comments
mysys/my_init.c:
  May my_progname const
mysys/my_static.c:
  May my_progname const
mysys/thr_lock.c:
  Remove not needed casts
sql-common/my_time.c:
  Change bool -> my_bool as bool is not portable in C programs
sql/field.cc:
  Test number_to_datetime() for -1 instead of < 0 (Safety fix)
  New prototype for TIME_to_timestamp()
sql/item.h:
  Don't have prototypes for both uint32 and ulong as these 'may' be the same thing
sql/item_timefunc.cc:
  New prototype for TIME_to_timestamp()
sql/log.cc:
  Remove compiler warnings
sql/mysql_priv.h:
  New prototype for TIME_to_timestamp()
  Added function for comparing LEX_STRING
sql/set_var.cc:
  Added overflow checking when setting ulong variable
sql/sql_base.cc:
  Added function is_equal()
  Changed strncmp -> is_equal() as strncmp() to not match "V" (instead of "VIEW")
sql/sql_class.cc:
  Added comment
sql/sql_select.cc:
  Portability fixes
  After review fixes
sql/sql_trigger.cc:
  Use 'tables_alias_charset' for comparing database name
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/sql_view.cc:
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/time.cc:
  New prototype for TIME_to_timestamp() to allow easyer mapping to C function
sql/tztime.cc:
  bool -> my_bool (to allow calling C code from C++ code)
sql/tztime.h:
  bool -> my_bool (to allow calling C code from C++ code)
2005-07-31 12:49:55 +03:00
unknown
675c4bb48c Added sql_mode saving to mysql_dump (BUG#5891, part 2)
client/client_priv.h:
  add OPT_ for --trigger parameter
client/mysqldump.c:
  fixed short simbol for trigger
  fixed lines break for more compiler compatibility
  added sql_mode output
  added comments
  made protection of trigger and view restoring commands from execution by old versions of mysql
mysql-test/r/mysqldump.result:
  changed test, to test sql_mode
mysql-test/r/sp.result:
  now sql_mode preserved in SP
mysql-test/t/mysqldump.test:
  changed test, to test sql_mode
mysql-test/t/sp.test:
  now sql_mode preserved in SP
sql/set_var.cc:
  fixed comment
2005-07-29 23:39:08 +03:00
unknown
d2810c56cf Fixed compiler warnings
client/mysqldump.c:
  Fixed wrong argument to printf()
client/mysqltest.c:
  Fixed compiler warning
myisam/ft_boolean_search.c:
  Fixed compiler warning
myisammrg/myrg_static.c:
  Fixed compiler warning
mysql-test/r/rpl_drop_temp.result:
  Drop used database
mysql-test/t/rpl_drop_temp.test:
  Drop used database
ndb/src/common/logger/LogHandler.cpp:
  Fixed compiler warning
sql/field.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/sql_base.cc:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
2005-07-28 21:25:05 +03:00
unknown
606c22ac76 Applied and tested this patch successfully (bug 10431) to a clean
tree on brian's amd 64 box (which was already approved). 

[patg@zim mysql-5.0]$ bk changes
ChangeSet@1.1882, 2005-07-21 18:43:55+05:00, gluh@eagle.intranet.mysql.r18.ru
  merge fix

Was the changeset level I applied this patch to.

Master shutdown finished
Slave shutdown finished
All 326 tests were successful.

[patg@zim mysql-5.0]$ 


client/mysqldump.c:
  This is a fresh application of Magnus Svensson's patch for bug 10431
mysql-test/r/mysqldump.result:
  Fresh application of Magnus Svensson's patch for bug 10431
mysql-test/t/mysqldump.test:
  fresh application of Magnus Svensson's patch for bug 10431
2005-07-22 04:11:45 +02:00