Commit graph

1460 commits

Author SHA1 Message Date
Alexander Nozdrin
7cd11f45be Manual merge from mysql-trunk-merge. 2009-11-06 17:20:27 +03:00
Alexander Nozdrin
c063bd171e Manual merge from mysql-5.1. 2009-11-05 12:20:41 +03:00
Alexander Nozdrin
a708ba6524 Manual merge from mysql-next-mr. 2009-11-02 14:10:04 +03: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
Sergey Glukhov
f554a3c094 5.0-bugteam->5.1-bugteam merge 2009-10-27 14:09:36 +04:00
Sergey Glukhov
f0a7ff8419 Bug#41049 does syntax "grant" case insensitive?
Problem 1:
column_priv_hash uses utf8_general_ci collation
for the key comparison. The key consists of user name,
db name and table name. Thus user with privileges on table t1
is able to perform the same operation on T1
(the similar situation with user name & db name, see acl_cache).
So collation which is used for column_priv_hash and acl_cache
should be case sensitive.
The fix:
replace system_charset_info with my_charset_utf8_bin for
column_priv_hash and acl_cache
Problem 2:
The same situation with proc_priv_hash, func_priv_hash,
the only difference is that Routine name is case insensitive.
So the fix is to use my_charset_utf8_bin for
proc_priv_hash & func_priv_hash and convert routine name into lower
case before writing the element into the hash and
before looking up the key.
Additional fix: mysql.procs_priv Routine_name field collation
is changed to utf8_general_ci.
It's necessary for REVOKE command
(to find a field by routine hash element values).
Note: 
It's safe for lower-case-table-names mode too because
db name & table name are converted into lower case
(see GRANT_NAME::GRANT_NAME).


mysql-test/include/have_case_insensitive_fs.inc:
  test case
mysql-test/r/case_insensitive_fs.require:
  test case
mysql-test/r/grant_lowercase_fs.result:
  test result
mysql-test/r/lowercase_fs_off.result:
  test result
mysql-test/r/ps_grant.result:
  test result
mysql-test/r/system_mysql_db.result:
  changed Routine_name field collation to case insensitive
mysql-test/t/grant_lowercase_fs.test:
  test case
mysql-test/t/lowercase_fs_off.test:
  test case
scripts/mysql_system_tables.sql:
  changed Routine_name field collation to case insensitive
scripts/mysql_system_tables_fix.sql:
  changed Routine_name field collation to case insensitive
sql/sql_acl.cc:
  Problem 1:
  column_priv_hash uses utf8_general_ci collation
  for the key comparison. The key consists of user name,
  db name and table name. Thus user with privileges on table t1
  is able to perform the same operation on T1
  (the similar situation with user name & db name, see acl_cache).
  So collation which is used for column_priv_hash and acl_cache
  should be case sensitive.
  The fix:
  replace system_charset_info with my_charset_utf8_bin for
  column_priv_hash and acl_cache
  Problem 2:
  The same situation with proc_priv_hash, func_priv_hash,
  the only difference is that Routine name is case insensitive.
  So the fix is to use my_charset_utf8_bin for
  proc_priv_hash & func_priv_hash and convert routine name into lower
  case before writing the element into the hash and
  before looking up the key.
  Additional fix: mysql.procs_priv Routine_name field collation
  is changed to utf8_general_ci.
  It's necessary for REVOKE command
  (to find a field by routine hash element values).
  Note: 
  It's safe for lower-case-table-names mode too because
  db name & table name are converted into lower case
  (see GRANT_NAME::GRANT_NAME).
2009-10-27 12:09:19 +04:00
Alexander Nozdrin
2dc132b209 Merge from mysql-next-mr. 2009-10-23 15:22:21 +04:00
Alexander Barkov
b231187218 Postfix for WL#1349.
Don't do character set autodetection when running
mysql from mysql_fix_privilege_tables.
2009-10-23 13:31:14 +05:00
Alexander Nozdrin
564952afb0 Automerge from mysql-next-mr. 2009-10-22 22:06:01 +04:00
Alexander Barkov
dcb8bb23c2 Merging mysql-next-mr-merge to mysql-next-mr. 2009-10-21 15:48:22 +05:00
Alexander Nozdrin
2c3d501189 Automerge from mysql-trunk-merge. 2009-10-19 22:41:18 +04:00
Alexander Nozdrin
a1ac1b7d48 Automerge from mysql-trunk. 2009-10-19 22:40:08 +04:00
Timothy Smith
df129b749d Merge from mysql-5.4.3-beta-release 2009-10-16 20:19:36 +02:00
Sergey Glukhov
d8c3f2263f WL#751 Error message construction, backport 2009-10-15 17:23:43 +05:00
Alexander Nozdrin
c30d924dd5 Manual merge from mysql-trunk-merge. 2009-10-14 12:25:39 +04:00
Alexander Nozdrin
c69629d269 Merge from mysql-5.1. 2009-10-13 13:42:38 +04:00
Sergei Golubchik
285257f7c8 bug#33731 - INSTALL/UNINSTALL PLUGIN: Inconsistent handling of identifier case
indexed column in mysql.plugin table should use case-insensitive collation
for index lookups to work

(backport from 6.0)

sql/sql_plugin.cc:
  generate the key correctly using key_copy.
  field->store() stores the value in record format, not key format.
2009-10-12 20:15:10 +02:00
Alexander Nozdrin
13f09243e3 A backporting patch for WL#4300 (Define privileges for tablespaces).
Original revision in 6.0:
------------------------------------------------------------
revno: 2630.13.11
committer: Alexander Nozdrin <alik@mysql.com>
branch nick: 6.0-rt-wl4300
timestamp: Thu 2008-07-24 11:44:21 +0400
message:
  A patch for WL#4300: Define privileges for tablespaces.
------------------------------------------------------------

per-file messages:
  mysql-test/r/grant.result
    Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
  mysql-test/r/ps.result
    Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
  mysql-test/r/system_mysql_db.result
    Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
  mysql-test/suite/falcon/r/falcon_tablespace_priv.result
    Test case for WL#4300.
  mysql-test/suite/falcon/t/falcon_tablespace_priv.test
    Test case for WL#4300.
  mysql-test/suite/ndb/r/ndb_dd_ddl.result
    Test case for WL#4300.
  mysql-test/suite/ndb/t/ndb_dd_ddl.test
    Test case for WL#4300.
  scripts/mysql_system_tables.sql
    New columm 'Create_tablespace_priv' has been added to mysql.user.
  scripts/mysql_system_tables_data.sql
    'CREATE TABLESPACE' is granted by default to the root user.
  scripts/mysql_system_tables_fix.sql
    Grant 'CREATE TABLESPACE' privilege during system table upgrade
    if a user had SUPER privilege.
  sql/sql_acl.cc
    Added CREATE TABLESPACE privilege.
  sql/sql_acl.h
    Added CREATE TABLESPACE privilege.
  sql/sql_parse.cc
    Check global 'CREATE TABLESPACE' privilege for the following SQL statements:
      - CREATE | ALTER | DROP TABLESPACE
      - CREATE | ALTER | DROP LOGFILE GROUP
  sql/sql_show.cc
    Added CREATE TABLESPACE privilege.
  sql/sql_yacc.yy
    Added CREATE TABLESPACE privilege.
2009-10-10 00:01:10 +04:00
Jon Olav Hauglid
2464586b75 Bug #34197 CREATE PROCEDURE fails when COMMENT truncated in non
strict SQL mode

The problem was that a COMMENT longer than 64 characters
caused CREATE PROCEDURE to fail.

This patch fixed the problem by changing the COMMENT field in 
mysql.proc from char(64) to text. The corresponding ROUTINE_COMMENT
field in INFORMATION_SCHEMA.ROUTINES is also changed from
varchar(64) to longtext.

mysql_system_tables.sql and mysql_system_tables_fix.sql updated.
Test case added to sp.test and affected result-files updated.
2009-10-09 17:35:07 +02:00
Jonathan Perkin
f021d44687 bug#41546: mysql-stress-run.pl is not packaged on Windows
Copy mysql-stress-run.pl into noinstall package.
2009-09-30 14:46:47 +01:00
Vladislav Vaintroub
b73763e0f9 Backport of the patch
http://lists.mysql.com/commits/57725

Vladislav Vaintroub	2008-11-03
Cleanup CMakeLists.txt(s) - remove winsock2 (ws2_32) from 
TARGET_LINK_LIBRARIES. 
      
Every exe or dll linked with mysys needs ws2_32, because
mysys uses winsock function WSAStartup in my_init().
However, there is no need to explicitely add ws2_32 to
the list of TARGET_LINK_LIBRARIES multiple times. 
Visual Studio comes with a handy pragma that tells linker
to add library. So patch replaces bunch of ws2_32 in 
CMakeLists with  single pragma comment(lib,"ws2_32")
in my_init.c
      
Additionally, reference to non-existing "debug" library
has been removed from TARGET_LINK_LIBRARIES. The correct
name of the library is "dbug".
2009-09-30 03:39:37 +02:00
unknown
503530f273 make_binary_distribution.sh: fix path for installing the MALLOC_LIB (to $DEST/lib) 2009-09-29 21:11:41 +02:00
unknown
4188fcbd55 make_binary_distribution and mysql.spec: add options to copy a shared library, for use by mysqld_safe, into pkglibdir during package creation 2009-09-29 08:58:32 +02:00
Alexander Nozdrin
68a9b7dbe3 Merge from mysql-5.1. 2009-09-23 11:16:11 +04:00
unknown
5ce71b22bf Add --malloc-lib=LIB option to mysqld_safe to LD_PRELOAD a shared library for mysqld 2009-09-23 01:26:08 +02:00
Alexander Nozdrin
ede2edd19b Merge from mysql-5.1. 2009-09-19 13:07:51 +04:00
Joerg Bruehe
29d0fa12f7 This is the 5.4 version of the fix for bug#47007
Unresolved reference to 'innodb_system_libs' in "mysql_config"

In 5.4.2, we use InnoDB 1.0.4 which does file IO via separate
threads, opposed to the use of asynchronous IO previously.

So there is no InnoDB call to "aio_read()" which was searched
in "librt", causing a "-lrt" value of "innodb_system_libs",
that whole variable is gone.

This fix was applied in the build of 5.4.2-beta.

scripts/Makefile.am:
  There is no "innodb_system_libs" variable any more,
  so it cannot be replaced by its value.
scripts/mysql_config.pl.in:
  InnoDB does not need any platform-specific libraries any more,
  "innodb_system_libs" may go.
scripts/mysql_config.sh:
  InnoDB does not need any platform-specific libraries any more,
  "innodb_system_libs" may go.
2009-09-08 15:35:01 +02:00
Jonathan Perkin
c7d32876f3 Install mysqld.lib 2009-09-04 17:45:07 +02:00
Jonathan Perkin
71f4bfd6c7 Only install the innodb plugin if the plugin directory exists. 2009-09-01 08:40:13 +02:00
Georgi Kodinov
40defb1d53 backport of Chad's fix for bug #39326 to 5.0-bugteam 2009-08-19 10:59:17 +03:00
Jonathan Perkin
f0e14f7181 Install innodb_plugin on Windows. 2009-08-18 16:23:15 +02:00
Guilhem Bichot
eceba8912c merge of 5.1-main into mysql-trunk.
Changes to ha_innodb.cc are not propagated to plugin, they will come back
via Oracle/Innobase if needed.
2009-08-12 15:44:34 +02:00
Guilhem Bichot
b57e4dbd88 Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:
bzr branch mysql-5.1-performance-version mysql-trunk # Summit
cd mysql-trunk
bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin 
bzr rm innobase # remove the builtin
Next step: build, test fixes.
2009-08-04 13:25:19 +02:00
Joerg Bruehe
886c982730 Merge the bug fix for 37808 ("make_binary_distribution.sh")
into 5.0-build.
2009-07-21 19:37:28 +02:00
Joerg Bruehe
35d6a155a9 Merge the fix for bug#37808 into 5.1-build. 2009-07-21 18:49:42 +02:00
Joerg Bruehe
64c7dff6f5 Upmerge a bug fix from 5.0 to 5.1:
bug#37808
"make_binary_distribution" does not always generate correct names

Successfully tested on 5.1 sources.
2009-07-21 09:36:43 +02:00
Mikael Ronstrom
c75a265381 Merged in 5.1.35 2009-07-01 14:36:40 +02:00
Joerg Bruehe
4bcab578af This is a fix for bug#37808
"make_binary_distribution" does not always generate correct names

Originally, we solved deficiencies of the predefined "autoconf" macros
(at least on OS X 10.5, they do not correctly differ between "x86" and
"x86_64") by providing explicit "--platform" arguments.

With this patch, "make_binary_distribution" evaluates CFLAGS, so it
"just works" because CFLAGS contains information about the target CPU.

This patch is accompanied by a change in our build tools that drops the
setting of "--platform" arguments.

scripts/make_binary_distribution.sh:
  This is a fix for bug#37808
     "make_binary_distribution" does not always generate correct names
  
  Our platform names are the combination of operating system, architecture (CPU),
  and a possible suffix (typically "64bit", if a CPU is available in 32 bit too).
  We get these values from some predefined "autoconf" macros.
  
  However, these macros are not perfect, especially on OS X 10.5 they do not
  differ correctly between x86 (32 bit) and x86_64 (64 bit).
  Originally, we solved that by providing an explicit "--platform" argument,
  but it is better to get rid of that and ensure the script "just works".
  
  The best indication we have about the CPU is the "CFLAGS" value provided
  with "configure" and used in "make": It describes for which CPU the
  binaries are generated, not just which one was running the build.
  This approach should work even if we implement cross-compilation.
  
  So this patch evaluates CFLAGS and extracts its "-arch XYZ" part.
  
  When touching the file, I also replaced some tab characters by blanks.
2009-06-26 11:58:19 +02:00
Georgi Kodinov
a11f9409e1 automerge 2009-06-19 18:32:10 +03:00
Georgi Kodinov
014e289125 Bug #36654: mysqld_multi cannot start instances with different versions
occasionally.

mysql_multi can call mysqld_safe. In doing this it's not changing the 
current working directory. This may cause confusion in the case where 
mysqld_multi is handling instances of servers of different versions 
and the current working directory is the installation directory of one 
of these servers.

Fixed by enhancing the meaning of basedir in [mysqldN] sections of 
mysqld_multi. If specified, mysqld_multi will change the current 
working directory to the basedir directory before starting the server 
in mysqld_multi ... start ... and then change it back to what it was.

scripts/mysqld_multi.sh:
  Bug #36654: optionally preserve, change and restore the cwd when 
  starting server instances
2009-06-19 15:52:20 +03:00
Mikael Ronstrom
a22c8c5be5 Merge MySQL 5.1.35 into MySQL 5.4 2009-06-11 12:07:59 +02:00
MySQL Build Team
782b8f0550 Some portability fixes.
include/Makefile.am: use @PERL@ to call scripts/dheadgen.pl - don't rely on #! /usr/bin/perl
scripts/dheadgen.pl: use 2-arg open() for compatibility with older Perl versions
storage/innobase/srv/srv0srv.c: Don't use C++-style comments in C code
2009-06-04 18:47:38 +02:00
Joerg Bruehe
74507d486a Merge up 5.0-build into 5.1-build:
mostly just the merge changesets,
but also a change of Perl scripts to use "/usr/bin/perl" fixed.
2009-05-29 15:40:55 +02:00
Staale Smedseng
a1212080ad Bug #44736 mysqld_safe's my_which() is broken and
doesn't find 'logger'

Due to a variable quoting mistake, the $PATH environment
variable isn't parsed correctly when searching for the
existence of the desired executable(s) (logger in this 
case).

This patch removes the quotes.
2009-05-25 18:21:40 +02:00
Georgi Kodinov
feef9ed1de merged 5.1-main -> 5.1-bugteam 2009-05-15 16:03:22 +03:00
Kent Boortz
6d7f876a88 Use /usr/bin/perl as standard Perl install path (bug#44643) 2009-05-09 23:43:48 +02:00
Joerg Bruehe
d3dbf166b6 Merge main 5.0 into 5.0-build 2009-05-08 22:16:06 +02:00
Joerg Bruehe
d2fe2a71da Merge main 5.1 into 5.1-build
165 changesets with 23 conflicts:
Text conflict in mysql-test/r/lock_multi.result
Text conflict in mysql-test/t/lock_multi.test
Text conflict in mysql-test/t/mysqldump.test
Text conflict in sql/item_strfunc.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/parse_file.cc
Text conflict in sql/slave.cc
Text conflict in sql/sp.cc
Text conflict in sql/sp_head.cc
Text conflict in sql/sql_acl.cc
Text conflict in sql/sql_base.cc
Text conflict in sql/sql_class.cc
Text conflict in sql/sql_crypt.cc
Text conflict in sql/sql_db.cc
Text conflict in sql/sql_lex.cc
Text conflict in sql/sql_parse.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in sql/sql_view.cc
Text conflict in storage/innobase/handler/ha_innodb.cc
Text conflict in storage/myisam/mi_packrec.c
Text conflict in tests/mysql_client_test.c

Updates to Innobase, taken from main 5.1:
bzr: ERROR: Some change isn't sane:
File mysql-test/r/innodb-semi-consistent.result is owned by Innobase and should not be updated.
File mysql-test/t/innodb-semi-consistent.test is owned by Innobase and should not be updated.
File storage/innobase/handler/ha_innodb.cc is owned by Innobase and should not be updated.
File storage/innobase/ibuf/ibuf0ibuf.c is owned by Innobase and should not be updated.
File storage/innobase/include/row0mysql.h is owned by Innobase and should not be updated.
File storage/innobase/include/srv0srv.h is owned by Innobase and should not be updated.
File storage/innobase/include/trx0trx.h is owned by Innobase and should not be updated.
File storage/innobase/include/trx0trx.ic is owned by Innobase and should not be updated.
File storage/innobase/lock/lock0lock.c is owned by Innobase and should not be updated.
File storage/innobase/page/page0cur.c is owned by Innobase and should not be updated.
File storage/innobase/row/row0mysql.c is owned by Innobase and should not be updated.
File storage/innobase/row/row0sel.c is owned by Innobase and should not be updated.
File storage/innobase/srv/srv0srv.c is owned by Innobase and should not be updated.
File storage/innobase/trx/trx0trx.c is owned by Innobase and should not be updated.
(Set env var 'ALLOW_UPDATE_INNOBASE_OWNED' to override.)
2009-05-08 21:04:07 +02:00
Jim Winstead
d0a1de80b4 The arguments to use for ps on Mac OS X were mis-detected by the mysql_zap
utility. (Bug #41883, patch by Nicklas Westerlund)
2009-05-07 17:53:03 -07:00