Commit graph

3322 commits

Author SHA1 Message Date
Alexey Kopytov
4a1b59b7ab Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-01-24 00:09:23 +03:00
Magne Mahre
132b46e96e WL#5154 Remove deprecated 4.1 features
Several items said to be deprecated in the 4.1 manual
have never been removed.  This worklog adds deprecation
warnings when these items are used, and warns the user 
that the items will be removed in MySQL 5.6.

A couple of previously deprecation decision have been
reversed (see single file comments)



client/client_priv.h:
  Macro similar to the one in the server (mysql_priv.h)
  for printing a deprecation warning message
client/mysql.cc:
  no-auto-rehash  will not be deprecated
  skip-line-numbers will not be deprecated
  skip-column-names will not be deprecated
  no-pager is deprecated
  set-variable is deprecated
  no-named-commands is deprecated
client/mysqladmin.cc:
  set-variable is deprecated
client/mysqlbinlog.cc:
  position is deprecated
client/mysqldump.c:
  first-slave is deprecated
  no-set-names is deprecated
  set-variable is deprecated
mysql-test/r/mysqlbinlog.result:
  Adding the [Warning] to the test case, just to show that the
  deprecation works.
  The test case will be changed in Celosia to use --start-position.
mysys/my_getopt.c:
  set-variable (include -O) is deprecated
scripts/mysqld_multi.sh:
  Warning for mysqld_multi
sql/mysqld.cc:
  default-collation is deprecated
  log-bin-trust-routine-creators is deprecated
  set-variable is deprecated
  default-character-set is deprecated
  safe-show-database is deprecated
sql/share/errmsg.txt:
  Added version number for sql_log_update deprecation message.
2010-01-21 09:10:05 +01:00
Alexey Kopytov
3ba6a2a9fa Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

mysql-test/collections/default.experimental
2009-12-25 13:56:50 +03:00
Alexey Kopytov
930a08784c Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
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
2009-12-23 16:42:05 +03:00
Georgi Kodinov
c248859ec8 merge 2009-12-24 11:00:04 +02:00
Davi Arnaut
61ae928898 Manual merge. 2009-12-18 16:44:24 -02:00
Jim Winstead
dd1378c8ff Merge approved bug fix 2009-12-17 12:06:36 -08:00
Davi Arnaut
06a1df9181 Bug#48983: Bad strmake calls (length one too long)
The problem is a somewhat common misusage of the strmake function.
The strmake(dst, src, len) function writes at most /len/ bytes to
the string pointed to by src, not including the trailing null byte.
Hence, if /len/ is the exact length of the destination buffer, a
one byte buffer overflow can occur if the length of the source
string is equal to or greater than /len/.

client/mysqldump.c:
  Make room for the trailing null byte.
libmysql/libmysql.c:
  Add comment, there is enough room in the buffer.
  Increase buffer length, two strings are concatenated.
libmysqld/lib_sql.cc:
  Make room for the trailing null byte.
mysys/default.c:
  Make room for the trailing null bytes.
mysys/mf_pack.c:
  Make room for the trailing null byte.
server-tools/instance-manager/commands.cc:
  Copy only if overflow isn't possible in both cases.
server-tools/instance-manager/listener.cc:
  Make room for the trailing null byte.
sql/log.cc:
  Make room for the trailing null byte.
sql/sp_pcontext.h:
  Cosmetic fix.
sql/sql_acl.cc:
  MAX_HOSTNAME already specifies space for the trailing null byte.
sql/sql_parse.cc:
  Make room for the trailing null byte.
sql/sql_table.cc:
  Make room for the trailing null byte.
2009-12-17 15:58:38 -02:00
Georgi Kodinov
adc17cd41e Bug #48866: mysql.test fails under Fedora 12
strmov() is not guaranteed to work correctly on overlapping
source and destination buffers. On some OSes it may work,
but Fedora 12 has a stpcpy() that's not working correctly 
on overlapping buffers.
Fixed to use the overlap-safe version of strmov instead.
Re-vitalized the overlap-safe version of strmov.
2009-12-16 19:31:19 +02:00
Alexander Nozdrin
bcedf962ff Auto-merge from mysql-trunk. 2009-12-16 13:27:39 +03:00
Alexander Nozdrin
78c61d6b83 Remove .cvsignore files (attempt #2). 2009-12-16 11:24:30 +03:00
Alexey Kopytov
ebdef570e5 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. 2009-12-11 19:40:58 +03:00
Alexander Nozdrin
5676713687 Manual merge from mysql-trunk.
Conflicts:
  - client/mysqltest.cc
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/t/disabled.def
  - sql/mysqld.cc
  - sql/opt_range.cc
  - sql/sp.cc
  - sql/sql_acl.cc
  - sql/sql_partition.cc
  - sql/sql_table.cc
2009-12-11 12:39:38 +03:00
unknown
699a87110d This is a patch for bug#41569.
"mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table but does
not set values".
            
mysql_upgrade (ver 5.1) adds 3 fields (character_set_client, 
collation_connection and db_collation) to the mysql.proc table, but 
does not set any values. When we run stored procedures, which were 
created with mysql 5.0, a warning is logged into the error log.
            
The solution to this is for mysql_upgrade to set default best guess
values for these fields. A warning is also written during upgrade, to
make the user aware that default values are set.

client/mysql_upgrade.c:
  Result lines which start with "WARNING" are passed through to the output. 
  This way we have a way of triggering WARNING-messages during upgrade 
  directly from the .sql-script.
mysql-test/r/mysql_upgrade.result:
  Expected result of the test.
mysql-test/t/mysql_upgrade.test:
  Added a test-case for the bug.
scripts/mysql_system_tables_fix.sql:
  The new fields are populated, and warnings are written.
2009-12-03 17:15:47 +01:00
Satya B
fab8effefe merge to mysql-5.1-bugteam 2009-11-26 13:12:16 +05:30
Satya B
82b115ec16 Fix for BUG#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
mysql client displays wrong character-set of server. When a user changes the
charset of a server, mysql client 'status' command displays wrong charset but
the command "SHOW VARIABLES LIKE "%charset%" displayed correct charset results.
The problem is only with the mysql client's 'status' command output.

In mysql client, the method mysql_store_lazy_result() returns 0 for
success and non-zero for failure. The method com_status() was using this method
wrongly. Fixed all such instances according to return value of the method 
mysql_store_lazy_result().

client/mysql.cc:
  Fix for BUG#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
  
  Fix com_status() method to use mysql_store_lazy_result() properly.
mysql-test/r/bug47671.result:
  Fix for BUG#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
  
  Testcase for BUG#47671
mysql-test/t/bug47671-master.opt:
  Fix for BUG#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
  
  Testcase for BUG#47671
mysql-test/t/bug47671.test:
  Fix for BUG#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
  
  Testcase for BUG#47671
2009-11-25 12:25:49 +05:30
Tatiana A. Nurnberg
22d0345272 auto-merge 2009-11-24 08:08:47 -08:00
Jim Winstead
84c5abbd33 Backport fix for Bug #27884. 2009-11-23 14:38:08 -08:00
Davi Arnaut
64f097dc80 Post-merge fixes: fix typo and remove unused variables. 2009-11-21 10:11:45 -02:00
Alexander Nozdrin
e99e453633 Auto-merge from mysql-next-mr. 2009-11-12 18:00:24 +03:00
Alexey Botchkov
6388a13230 Bug#42520 killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8
The additional patch. That 'loadxml.test' failure was actually about our testing system,
   not the code.
   Firstly we need a new mysqltest command, wich i called 'send_eval'. So the expression
   can be evaluated, then started in a parallel thread. We only have separane 'send' and
   'eval' commands at the moment.
   Then we need to add the waiting code after the 'KILL' to our test, so the thread will be killed
   before the test goes further. The present 'reap' command doesn't handle the killed threads
   well.
      
per-file comments:
  client/mysqltest.cc
Bug#42520      killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8
    The 'send_eval' command implemented.

  mysql-test/r/loadxml.result
Bug#42520      killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8
   test result updated.

  mysql-test/t/loadxml.test
Bug#42520      killing load .. infile Assertion failed: ! is_set(), file .\sql_error.cc, line 8
   test case added.
2009-11-11 00:55:05 +04:00
Alexander Nozdrin
b712dce3d5 Auto-merge from mysql-next-mr. 2009-11-10 10:31:33 +03:00
Alexander Nozdrin
49bb8cba8e Fix manual-merge (2nd attempt). 2009-11-10 00:08:17 +03:00
Alexander Nozdrin
831c8434a7 Fix manual-merge. 2009-11-09 18:13:11 +03:00
Alexander Nozdrin
7cd11f45be Manual merge from mysql-trunk-merge. 2009-11-06 17:20:27 +03:00
Alexander Nozdrin
d476bbb0be Auto-merge from mysql-next-mr. 2009-11-05 15:08:37 +03:00
Alexander Nozdrin
660043abaf Auto-merge from mysql-5.1. 2009-11-05 12:36:34 +03:00
Alexander Nozdrin
5bbacc5214 Manual merge from mysql-5.1. 2009-11-05 12:23:55 +03:00
Alexander Nozdrin
c063bd171e Manual merge from mysql-5.1. 2009-11-05 12:20:41 +03:00
Alexander Nozdrin
b40aed07bf Auto-merge from mysql-5.1. 2009-11-05 12:14:01 +03:00
Alexander Nozdrin
0fd7ff87bb Auto-merge from mysql-5.1. 2009-11-05 12:02:44 +03:00
Vladislav Vaintroub
2377eed362 Bug #47423 mtr connects to wrong database
The reason for the bug is that mysqtest as well as other client tools
running in test suite (mysqlbinlog, mysqldump) will first try to connect 
whatever database has created shared memory with default base name 
"MySQL" and use this. (Same effect could be seen on Unix if mtr would
not care to calculate "port" and "socket" parameter).
      
The fix ensures that all client tools and  running in mtr use unique  
per-database shared memory base parameters, so there is no possibility
to clash with already installed one. We use socket name for shared memory 
base (it's known to be unique). This shared-memory-base is written to the
MTR config file to the [client] and [mysqld] sections. Fix made also made 
sure all client tools understand and correctly handle --shared-memory-base.
Prior to this patch  it was not the case for  mysqltest, mysqlbinlog and 
mysql_client_test.
      
All new connections done from mtr scripts via connect() will by default 
set shared-memory-base. And finally, there is a possibility to force 
shared memory or pipe connection and overwrite shared memory/pipe base name
from within mtr scripts via optional PIPE or SHM modifier. This functionality
was manually backported from 6.0
(original patch  http://lists.mysql.com/commits/74749)
2009-11-03 01:19:37 +01:00
Alexander Nozdrin
a708ba6524 Manual merge from mysql-next-mr. 2009-11-02 14:10:04 +03:00
Tatiana A. Nurnberg
1b0be8c5b8 Bug#47655: Memory free error when connecting to 4.1 server from 5.1+ client
When starting the (5.1+) mysql command-line client, we try to get
"select @@version_comment" from the server to present it to the
user. Recent clients are aware that older servers do not have that
variable and fall back on other info to be able to present *something*
at least. This fallback string was allocated through the POSIX interface,
but released through the my*() suite, which rightfully complained about
the imbalance in calls when compiled with --debug. While this wasn't
as bad as it looked (no double-free, use of uninitialized or freed
buffer, etc.), it did look funky.

Using my_strdup() now for what will be my_free()d later.

client/mysql.cc:
  Use my_strdup() for server_version, as we'll my_free() it later
  and don't want to upset the mysql client's memory accounting.
2009-11-02 00:46:00 -08:00
Sergei Golubchik
319847a4ec backport of dbug extensions from 6.0:
function/ syntax
  glob(7) wildcards
  unit tests
2009-10-30 19:13:58 +01:00
Georgi Kodinov
27c2af97f7 merge 2009-10-30 16:57:16 +02:00
Georgi Kodinov
ecef6c3308 merge from 5.0-main 2009-10-30 16:34:54 +02:00
Alexander Nozdrin
f236f9a9dc Automerge from mysql-next-mr. 2009-10-29 18:03:30 +03:00
Alexey Botchkov
36299d59ef WL#4991 mysql_upgrade --fix-privilege-tables
(backport)
   mysql_upgrade script accepts --upgrade-system-tables option,
   fixing only system tables in this case.

per-file comments:
  client/mysql_upgrade.c
WL#4991 mysql_upgrade --fix-privilege-tables
    --upgrade-system-tables option added.
   if it is set, the tool won't look for the mysqlcheck then
   run_mysqlcheck_fixnames() and run_mysqlcheck_upgrade won't be called.
  mysql-test/r/mysql_upgrade.result
WL#4991 mysql_upgrade --fix-privilege-tables
    test result added
  mysql-test/t/mysql_upgrade.test
WL#4991 mysql_upgrade --fix-privilege-tables
    test case added
2009-10-28 14:02:00 +04:00
Alexander Nozdrin
22fe8e10e2 Merge from mysql-next-mr. 2009-10-28 10:55:44 +03:00
Alexander Nozdrin
55b8f07a99 Automerge from mysql-next-mr. 2009-10-28 10:48:53 +03:00
unknown
30625323e9 Bug #34777 mysqlbinlog: --help output for --base64-output is hard to understand
Append the description of the 'decode-rows' value for --base64-output argument.
2009-10-28 15:04:06 +08:00
Vladislav Vaintroub
b51777484f merge 2009-11-03 01:52:57 +01:00
Alexander Nozdrin
47c9089ef5 Automerge from mysql-next-mr. 2009-10-27 12:59:09 +03:00
Alexander Nozdrin
cd6e159890 Automerge from mysql-next-mr. 2009-10-27 12:57:44 +03:00
unknown
37743aedda Merge from mysql-5.0.87-release 2009-10-26 19:20:02 +01:00
Alexander Nozdrin
2dc132b209 Merge from mysql-next-mr. 2009-10-23 15:22:21 +04:00
Luis Soares
f1bb8c3c55 manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge
Conflicts
=========

Text conflict in .bzr-mysql/default.conf
Text conflict in libmysqld/CMakeLists.txt
Text conflict in libmysqld/Makefile.am
Text conflict in mysql-test/collections/default.experimental
Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test
Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result
Text conflict in mysql-test/t/mysqlbinlog.test
Text conflict in sql/CMakeLists.txt
Text conflict in sql/Makefile.am
Text conflict in sql/log_event_old.cc
Text conflict in sql/rpl_rli.cc
Text conflict in sql/slave.cc
Text conflict in sql/sql_binlog.cc
Text conflict in sql/sql_lex.h
21 conflicts encountered.

NOTE
====
 mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr:
 - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr"

 This is the first cset (merge/...) committed after pulling 
 from mysql-next-mr.
2009-10-22 23:30:28 +01:00
Alexander Nozdrin
a8c6e84a42 Automerge from mysql-next-mr. 2009-10-23 00:24:32 +04:00
Alexander Nozdrin
20eac04d7c Automerge from mysql-next-mr. 2009-10-23 00:20:44 +04:00