Commit a6638895 authored by dlenev@mysql.com's avatar dlenev@mysql.com

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

into mysql.com:/home/dlenev/src/mysql-4.0-bg8894
parents 6d6d04a0 3098b93e
......@@ -70,6 +70,7 @@ jimw@mysql.com
joerg@mysql.com
jorge@linux.jorge.mysql.com
kaj@work.mysql.com
kent@mysql.com
konstantin@mysql.com
kostja@oak.local
lenz@kallisto.mysql.com
......
......@@ -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_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_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(
"bdb",
......@@ -51,6 +51,7 @@ GetOptions(
"use-old-distribution",
"user=s",
"version-suffix=s",
"with-big-tables",
"with-debug",
"with-low-memory",
"with-other-libc=s",
......@@ -255,9 +256,10 @@ if ($opt_stage <= 1)
$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-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-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-raid" if ($opt_raid);
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
......
......@@ -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_ARG_WITH([mysqlfs],
[
......
......@@ -2482,6 +2482,7 @@ EOF
AC_MSG_RESULT([default: $default_charset; compiled in: $CHARSETS])
MYSQL_CHECK_BIG_TABLES
MYSQL_CHECK_ISAM
MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB
......
......@@ -22,6 +22,20 @@ n
4
drop database if exists 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;
flush tables with read lock;
create database mysqltest;
......
......@@ -22,6 +22,28 @@ insert into mysqltest.mysqltest values (4);
select * from mysqltest.mysqltest;
drop database if exists 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;
# test drop/create database and FLUSH TABLES WITH READ LOCK
......@@ -39,3 +61,4 @@ drop database mysqltest;
show databases;
--error 1008
drop database mysqltest;
......@@ -65,7 +65,7 @@
"Column '%-.64s' cannot be null",
"Unknown database '%-.64s'",
"Table '%-.64s' already exists",
"Unknown table '%-.64s'",
"Unknown table '%-.180s'",
"Column: '%-.64s' in %-.64s is ambiguous",
"Server shutdown in progress",
"Unknown column '%-.64s' in '%-.64s'",
......
......@@ -70,7 +70,7 @@
" '%-.64s' NULL",
" '%-.64s'",
" '%-.64s' ",
" '%-.64s'",
" '%-.175s'",
" '%-.64s' %-.64s ",
" ",
" '%-.64s' '%-.64s'",
......
......@@ -71,7 +71,7 @@
" '%-.64s' ",
"צ '%-.64s'",
" '%-.64s' դ",
"צ '%-.64s'",
"צ '%-.180s'",
" '%-.64s' %-.64s ",
"դ ",
"צ '%-.64s' '%-.64s'",
......
......@@ -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,
thd->master_access));
ulong db_access,dummy;
bool db_is_pattern= test(want_access & GRANT_ACL);
if (save_priv)
*save_priv=0;
else
......@@ -2725,9 +2726,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
*/
db_access= thd->db_access;
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,
thd->priv_user, db, test(want_access & GRANT_ACL));
thd->priv_user, db, db_is_pattern);
*save_priv=thd->master_access | db_access;
DBUG_RETURN(FALSE);
}
......@@ -2745,9 +2746,9 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if (db == any_db)
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,
thd->priv_user, db, test(want_access & GRANT_ACL));
thd->priv_user, db, db_is_pattern);
else
db_access=thd->db_access;
// 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,
if (wrong_tables.length())
{
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
my_error(ER_ROW_IS_REFERENCED,MYF(0));
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