Commit 5f8c96c0 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/dlenev/src/mysql-4.0-bg8894
parents 4ea2dbe2 ee2923fc
...@@ -70,6 +70,7 @@ jimw@mysql.com ...@@ -70,6 +70,7 @@ jimw@mysql.com
joerg@mysql.com joerg@mysql.com
jorge@linux.jorge.mysql.com jorge@linux.jorge.mysql.com
kaj@work.mysql.com kaj@work.mysql.com
kent@mysql.com
konstantin@mysql.com konstantin@mysql.com
kostja@oak.local kostja@oak.local
lenz@kallisto.mysql.com lenz@kallisto.mysql.com
......
...@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env=""; ...@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=$opt_with_big_tables=0;
GetOptions( GetOptions(
"bdb", "bdb",
...@@ -51,6 +51,7 @@ GetOptions( ...@@ -51,6 +51,7 @@ GetOptions(
"use-old-distribution", "use-old-distribution",
"user=s", "user=s",
"version-suffix=s", "version-suffix=s",
"with-big-tables",
"with-debug", "with-debug",
"with-low-memory", "with-low-memory",
"with-other-libc=s", "with-other-libc=s",
...@@ -255,9 +256,10 @@ if ($opt_stage <= 1) ...@@ -255,9 +256,10 @@ if ($opt_stage <= 1)
$opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions $opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb); $opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client); $opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
$opt_config_options.= " --with-debug" if ($opt_with_debug); $opt_config_options.= " --with-debug" if ($opt_with_debug);
$opt_config_options.= " --with-libwrap" if ($opt_libwrap); $opt_config_options.= " --with-libwrap" if ($opt_libwrap);
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory); $opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
$opt_config_options.= " --with-big-tables" if ($opt_with_big_tables);
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server); $opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
$opt_config_options.= " --with-raid" if ($opt_raid); $opt_config_options.= " --with-raid" if ($opt_raid);
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded); $opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
......
...@@ -868,6 +868,34 @@ AC_MSG_CHECKING(for OpenSSL) ...@@ -868,6 +868,34 @@ AC_MSG_CHECKING(for OpenSSL)
]) ])
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_BIG_TABLES
dnl Sets BIG_TABLES if --with-big-tables is used
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_BIG_TABLES], [
AC_ARG_WITH([big-tables],
[
--with-big-tables Support tables with more than 4 G rows even on 32 bit platforms],
[bigtables="$withval"],
[bigtables=no])
AC_MSG_CHECKING([for big tables support])
case "$bigtables" in
yes )
AC_DEFINE([BIG_TABLES], [1], [Support big tables])
AC_MSG_RESULT([yes])
;;
* )
AC_MSG_RESULT([no])
;;
esac
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_BIG_TABLES SECTION
dnl ---------------------------------------------------------------------------
AC_DEFUN(MYSQL_CHECK_MYSQLFS, [ AC_DEFUN(MYSQL_CHECK_MYSQLFS, [
AC_ARG_WITH([mysqlfs], AC_ARG_WITH([mysqlfs],
[ [
......
...@@ -2482,6 +2482,7 @@ EOF ...@@ -2482,6 +2482,7 @@ EOF
AC_MSG_RESULT([default: $default_charset; compiled in: $CHARSETS]) AC_MSG_RESULT([default: $default_charset; compiled in: $CHARSETS])
MYSQL_CHECK_BIG_TABLES
MYSQL_CHECK_ISAM MYSQL_CHECK_ISAM
MYSQL_CHECK_BDB MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB MYSQL_CHECK_INNODB
......
...@@ -22,6 +22,20 @@ n ...@@ -22,6 +22,20 @@ n
4 4
drop database if exists mysqltest; drop database if exists mysqltest;
create database mysqltest; create database mysqltest;
use mysqltest;
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28;
Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table'
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28, table29, table30;
Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table14,table15,table16,table17,table18,table19,table20,table21,table22,table23,table'
use test;
drop database mysqltest; drop database mysqltest;
flush tables with read lock; flush tables with read lock;
create database mysqltest; create database mysqltest;
......
...@@ -22,6 +22,28 @@ insert into mysqltest.mysqltest values (4); ...@@ -22,6 +22,28 @@ insert into mysqltest.mysqltest values (4);
select * from mysqltest.mysqltest; select * from mysqltest.mysqltest;
drop database if exists mysqltest; drop database if exists mysqltest;
create database mysqltest; create database mysqltest;
#
# drop many tables - bug#3891
# we'll do it in mysqltest db, to be able to use longer table names
# (tableN instead on tN)
#
use mysqltest;
--error 1051
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28;
--error 1051
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28, table29, table30;
use test;
drop database mysqltest; drop database mysqltest;
# test drop/create database and FLUSH TABLES WITH READ LOCK # test drop/create database and FLUSH TABLES WITH READ LOCK
...@@ -39,3 +61,4 @@ drop database mysqltest; ...@@ -39,3 +61,4 @@ drop database mysqltest;
show databases; show databases;
--error 1008 --error 1008
drop database mysqltest; drop database mysqltest;
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
"Column '%-.64s' cannot be null", "Column '%-.64s' cannot be null",
"Unknown database '%-.64s'", "Unknown database '%-.64s'",
"Table '%-.64s' already exists", "Table '%-.64s' already exists",
"Unknown table '%-.64s'", "Unknown table '%-.180s'",
"Column: '%-.64s' in %-.64s is ambiguous", "Column: '%-.64s' in %-.64s is ambiguous",
"Server shutdown in progress", "Server shutdown in progress",
"Unknown column '%-.64s' in '%-.64s'", "Unknown column '%-.64s' in '%-.64s'",
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
" '%-.64s' NULL", " '%-.64s' NULL",
" '%-.64s'", " '%-.64s'",
" '%-.64s' ", " '%-.64s' ",
" '%-.64s'", " '%-.175s'",
" '%-.64s' %-.64s ", " '%-.64s' %-.64s ",
" ", " ",
" '%-.64s' '%-.64s'", " '%-.64s' '%-.64s'",
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
" '%-.64s' ", " '%-.64s' ",
"צ '%-.64s'", "צ '%-.64s'",
" '%-.64s' դ", " '%-.64s' դ",
"צ '%-.64s'", "צ '%-.180s'",
" '%-.64s' %-.64s ", " '%-.64s' %-.64s ",
"դ ", "դ ",
"צ '%-.64s' '%-.64s'", "צ '%-.64s' '%-.64s'",
......
...@@ -2704,6 +2704,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -2704,6 +2704,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
DBUG_PRINT("enter",("want_access: %lu master_access: %lu", want_access, DBUG_PRINT("enter",("want_access: %lu master_access: %lu", want_access,
thd->master_access)); thd->master_access));
ulong db_access,dummy; ulong db_access,dummy;
bool db_is_pattern= test(want_access & GRANT_ACL);
if (save_priv) if (save_priv)
*save_priv=0; *save_priv=0;
else else
...@@ -2725,9 +2726,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -2725,9 +2726,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
*/ */
db_access= thd->db_access; db_access= thd->db_access;
if (!(thd->master_access & SELECT_ACL) && if (!(thd->master_access & SELECT_ACL) &&
(db && (!thd->db || strcmp(db,thd->db)))) (db && (!thd->db || db_is_pattern || strcmp(db,thd->db))))
db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
thd->priv_user, db, test(want_access & GRANT_ACL)); thd->priv_user, db, db_is_pattern);
*save_priv=thd->master_access | db_access; *save_priv=thd->master_access | db_access;
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
...@@ -2745,9 +2746,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -2745,9 +2746,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if (db == any_db) if (db == any_db)
DBUG_RETURN(FALSE); // Allow select on anything DBUG_RETURN(FALSE); // Allow select on anything
if (db && (!thd->db || strcmp(db,thd->db))) if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))
db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr, db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
thd->priv_user, db, test(want_access & GRANT_ACL)); thd->priv_user, db, db_is_pattern);
else else
db_access=thd->db_access; db_access=thd->db_access;
// Remove SHOW attribute and access rights we already have // Remove SHOW attribute and access rights we already have
......
...@@ -237,7 +237,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, ...@@ -237,7 +237,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (wrong_tables.length()) if (wrong_tables.length())
{ {
if (!foreign_key_error) if (!foreign_key_error)
my_error(ER_BAD_TABLE_ERROR,MYF(0),wrong_tables.c_ptr()); my_printf_error(ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR), MYF(0),
wrong_tables.c_ptr());
else else
my_error(ER_ROW_IS_REFERENCED,MYF(0)); my_error(ER_ROW_IS_REFERENCED,MYF(0));
error= 1; error= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment