mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-maint BitKeeper/deleted/.del-configure.in.rej: Auto merged configure.in: Auto merged sql/ha_ndbcluster.cc: Auto merged
This commit is contained in:
commit
8a2e904c3f
224 changed files with 4051 additions and 2075 deletions
|
@ -1810,6 +1810,7 @@ repl-tests/test-repl/sum-wlen-slave.master.re
|
|||
repl-tests/test-repl/sum-wlen-slave.master.reje
|
||||
replace/*.ds?
|
||||
replace/*.vcproj
|
||||
scripts/comp_sql
|
||||
scripts/fill_func_tables
|
||||
scripts/fill_func_tables.sql
|
||||
scripts/fill_help_tables
|
||||
|
@ -1827,6 +1828,7 @@ scripts/mysql_find_rows
|
|||
scripts/mysql_fix_extensions
|
||||
scripts/mysql_fix_privilege_tables
|
||||
scripts/mysql_fix_privilege_tables.sql
|
||||
scripts/mysql_fix_privilege_tables_sql.c
|
||||
scripts/mysql_install_db
|
||||
scripts/mysql_secure_installation
|
||||
scripts/mysql_setpermission
|
||||
|
|
|
@ -139,6 +139,7 @@ ADD_SUBDIRECTORY(dbug)
|
|||
ADD_SUBDIRECTORY(strings)
|
||||
ADD_SUBDIRECTORY(regex)
|
||||
ADD_SUBDIRECTORY(mysys)
|
||||
ADD_SUBDIRECTORY(scripts)
|
||||
ADD_SUBDIRECTORY(zlib)
|
||||
ADD_SUBDIRECTORY(extra/yassl)
|
||||
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
|
||||
|
|
|
@ -21,9 +21,9 @@ AUTOMAKE_OPTIONS = foreign
|
|||
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
|
||||
README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
|
||||
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
@readline_topdir@ sql-common \
|
||||
@readline_topdir@ sql-common scripts \
|
||||
@thread_dirs@ pstack \
|
||||
@sql_union_dirs@ unittest storage plugin \
|
||||
@sql_union_dirs@ scripts unittest storage plugin \
|
||||
@sql_server@ scripts @man_dirs@ tests \
|
||||
netware @libmysqld_dirs@ \
|
||||
mysql-test support-files sql-bench @tools_dirs@ \
|
||||
|
|
|
@ -82,6 +82,7 @@ TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl taocrypt zlib wso
|
|||
|
||||
ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c ../mysys/my_getpagesize.c)
|
||||
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient dbug yassl taocrypt zlib wsock32)
|
||||
ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs)
|
||||
|
||||
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
|
||||
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl taocrypt zlib wsock32)
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
#include <errmsg.h>
|
||||
#include <my_getopt.h>
|
||||
|
||||
#ifndef WEXITSTATUS
|
||||
# ifdef __WIN__
|
||||
# define WEXITSTATUS(stat_val) (stat_val)
|
||||
# else
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
enum options_client
|
||||
{
|
||||
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
|
||||
|
@ -67,5 +75,6 @@ enum options_client
|
|||
OPT_SLAP_POST_QUERY,
|
||||
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID,
|
||||
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
|
||||
OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_WRITE_BINLOG
|
||||
OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_WRITE_BINLOG,
|
||||
OPT_MAX_CLIENT_OPTION
|
||||
};
|
||||
|
|
|
@ -818,7 +818,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
break;
|
||||
#endif
|
||||
case OPT_CHARSETS_DIR:
|
||||
strmov(mysql_charsets_dir, argument);
|
||||
strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
|
||||
charsets_dir = mysql_charsets_dir;
|
||||
break;
|
||||
case OPT_DEFAULT_CHARSET:
|
||||
|
@ -871,7 +871,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
if (argument && strlen(argument))
|
||||
{
|
||||
default_pager_set= 1;
|
||||
strmov(pager, argument);
|
||||
strmake(pager, argument, sizeof(pager) - 1);
|
||||
strmov(default_pager, pager);
|
||||
}
|
||||
else if (default_pager_set)
|
||||
|
@ -885,14 +885,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
opt_nopager= 1;
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
opt_rehash= 0;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -287,15 +287,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
#endif
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
usage();
|
||||
|
|
|
@ -944,14 +944,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
remote_opt= 1;
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
case OPT_START_DATETIME:
|
||||
start_datetime= convert_str_to_timestamp(start_datetime_str);
|
||||
break;
|
||||
|
@ -1167,7 +1162,7 @@ could be out of memory");
|
|||
}
|
||||
if (len < 8 && net->read_pos[0] == 254)
|
||||
break; // end of data
|
||||
DBUG_PRINT("info",( "len: %lu, net->read_pos[5]: %d\n",
|
||||
DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n",
|
||||
len, net->read_pos[5]));
|
||||
if (!(ev= Log_event::read_log_event((const char*) net->read_pos + 1 ,
|
||||
len - 1, &error_msg,
|
||||
|
@ -1222,6 +1217,18 @@ could be out of memory");
|
|||
len= 1; // fake Rotate, so don't increment old_off
|
||||
}
|
||||
}
|
||||
else if (type == FORMAT_DESCRIPTION_EVENT)
|
||||
{
|
||||
/*
|
||||
This could be an fake Format_description_log_event that server
|
||||
(5.0+) automatically sends to a slave on connect, before sending
|
||||
a first event at the requested position. If this is the case,
|
||||
don't increment old_off. Real Format_description_log_event always
|
||||
starts from BIN_LOG_HEADER_SIZE position.
|
||||
*/
|
||||
if (old_off != BIN_LOG_HEADER_SIZE)
|
||||
len= 1; // fake event, don't increment old_off
|
||||
}
|
||||
if ((error= process_event(print_event_info, ev, old_off)))
|
||||
{
|
||||
error= ((error < 0) ? 0 : 1);
|
||||
|
@ -1234,16 +1241,16 @@ could be out of memory");
|
|||
const char *old_fname= le->fname;
|
||||
uint old_len= le->fname_len;
|
||||
File file;
|
||||
|
||||
|
||||
if ((file= load_processor.prepare_new_file_for_old_format(le,fname)) < 0)
|
||||
{
|
||||
error= 1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
if ((error= process_event(print_event_info, ev, old_off)))
|
||||
{
|
||||
my_close(file,MYF(MY_WME));
|
||||
my_close(file,MYF(MY_WME));
|
||||
error= ((error < 0) ? 0 : 1);
|
||||
goto err;
|
||||
}
|
||||
|
@ -1256,8 +1263,8 @@ could be out of memory");
|
|||
}
|
||||
}
|
||||
/*
|
||||
Let's adjust offset for remote log as for local log to produce
|
||||
similar text.
|
||||
Let's adjust offset for remote log as for local log to produce
|
||||
similar text and to have --stop-position to work identically.
|
||||
*/
|
||||
old_off+= len-1;
|
||||
}
|
||||
|
|
|
@ -315,15 +315,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
break;
|
||||
case 'V': print_version(); exit(0);
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,8 @@ static char *opt_password=0,*current_user=0,
|
|||
*lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0,
|
||||
*where=0, *order_by=0,
|
||||
*opt_compatible_mode_str= 0,
|
||||
*err_ptr= 0;
|
||||
*err_ptr= 0,
|
||||
*log_error_file= NULL;
|
||||
static char **defaults_argv= 0;
|
||||
static char compatible_mode_normal_str[255];
|
||||
static ulong opt_compatible_mode= 0;
|
||||
|
@ -120,7 +121,9 @@ static my_string opt_mysql_unix_port=0;
|
|||
static int first_error=0;
|
||||
static DYNAMIC_STRING extended_row;
|
||||
#include <sslopt-vars.h>
|
||||
FILE *md_result_file= 0;
|
||||
FILE *md_result_file= 0;
|
||||
FILE *stderror_file=0;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name=0;
|
||||
#endif
|
||||
|
@ -320,6 +323,9 @@ static struct my_option my_long_options[] =
|
|||
0, 0, 0, 0, 0, 0},
|
||||
{"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables,
|
||||
(gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.",
|
||||
(gptr*) &log_error_file, (gptr*) &log_error_file, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"master-data", OPT_MASTER_DATA,
|
||||
"This causes the binary log position and filename to be appended to the "
|
||||
"output. If equal to 1, will print it as a CHANGE MASTER command; if equal"
|
||||
|
@ -801,14 +807,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
break;
|
||||
}
|
||||
case (int) OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -4210,6 +4211,16 @@ int main(int argc, char **argv)
|
|||
free_resources(0);
|
||||
exit(exit_code);
|
||||
}
|
||||
|
||||
if (log_error_file)
|
||||
{
|
||||
if(!(stderror_file= freopen(log_error_file, "a+", stderr)))
|
||||
{
|
||||
free_resources(0);
|
||||
exit(EX_MYSQLERR);
|
||||
}
|
||||
}
|
||||
|
||||
if (connect_to_db(current_host, current_user, opt_password))
|
||||
{
|
||||
free_resources(0);
|
||||
|
@ -4273,5 +4284,9 @@ err:
|
|||
if (!path)
|
||||
write_footer(md_result_file);
|
||||
free_resources();
|
||||
|
||||
if (stderror_file)
|
||||
fclose(stderror_file);
|
||||
|
||||
return(first_error);
|
||||
} /* main */
|
||||
|
|
|
@ -231,14 +231,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
break;
|
||||
#endif
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : "d:t:o");
|
||||
break;
|
||||
|
|
|
@ -287,14 +287,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
#endif
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
}
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : "d:t:o");
|
||||
break;
|
||||
|
|
|
@ -689,14 +689,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
#endif
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
{
|
||||
if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0)
|
||||
{
|
||||
fprintf(stderr, "Unknown option to protocol: %s\n", argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
|
|
|
@ -33,18 +33,12 @@
|
|||
|
||||
#define MTEST_VERSION "3.2"
|
||||
|
||||
#include <my_global.h>
|
||||
#include <mysql_embed.h>
|
||||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <mysql.h>
|
||||
#include "client_priv.h"
|
||||
#include <mysql_version.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <errmsg.h>
|
||||
#include <m_ctype.h>
|
||||
#include <my_dir.h>
|
||||
#include <hash.h>
|
||||
#include <my_getopt.h>
|
||||
#include <stdarg.h>
|
||||
#include <violite.h>
|
||||
#include "my_regex.h" /* Our own version of regex */
|
||||
|
@ -52,14 +46,6 @@
|
|||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifndef WEXITSTATUS
|
||||
# ifdef __WIN__
|
||||
# define WEXITSTATUS(stat_val) (stat_val)
|
||||
# else
|
||||
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Use cygwin for --exec and --system before 5.0 */
|
||||
#if MYSQL_VERSION_ID < 50000
|
||||
#define USE_CYGWIN
|
||||
|
@ -81,11 +67,9 @@
|
|||
};
|
||||
|
||||
enum {
|
||||
OPT_SKIP_SAFEMALLOC=256, OPT_SSL_SSL, OPT_SSL_KEY, OPT_SSL_CERT,
|
||||
OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_PS_PROTOCOL,
|
||||
OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||
OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CONNECT_RETRIES,
|
||||
OPT_MARK_PROGRESS, OPT_CHARSETS_DIR, OPT_LOG_DIR
|
||||
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
|
||||
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||
OPT_MAX_CONNECT_RETRIES, OPT_MARK_PROGRESS, OPT_LOG_DIR
|
||||
};
|
||||
|
||||
static int record= 0, opt_sleep= -1;
|
||||
|
@ -1329,23 +1313,31 @@ void var_set(const char *var_name, const char *var_name_end,
|
|||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
void var_set_string(const char* name, const char* value)
|
||||
{
|
||||
var_set(name, name + strlen(name), value, value + strlen(value));
|
||||
}
|
||||
|
||||
|
||||
void var_set_int(const char* name, int value)
|
||||
{
|
||||
char buf[21];
|
||||
my_snprintf(buf, sizeof(buf), "%d", value);
|
||||
var_set_string(name, buf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Store an integer (typically the returncode of the last SQL)
|
||||
statement in the mysqltest builtin variable $mysql_errno, by
|
||||
simulating of a user statement "let $mysql_errno= <integer>"
|
||||
statement in the mysqltest builtin variable $mysql_errno
|
||||
*/
|
||||
|
||||
void var_set_errno(int sql_errno)
|
||||
{
|
||||
/* TODO MASV make easier */
|
||||
const char *var_name= "$mysql_errno";
|
||||
char var_val[21];
|
||||
uint length= my_sprintf(var_val, (var_val, "%d", sql_errno));
|
||||
var_set(var_name, var_name + 12, var_val, var_val + length);
|
||||
return;
|
||||
var_set_int("$mysql_errno", sql_errno);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Set variable from the result of a query
|
||||
|
||||
|
@ -2527,17 +2519,20 @@ wait_for_position:
|
|||
if (!(res= mysql_store_result(mysql)))
|
||||
die("mysql_store_result() returned NULL for '%s'", query_buf);
|
||||
if (!(row= mysql_fetch_row(res)))
|
||||
{
|
||||
mysql_free_result(res);
|
||||
die("empty result in %s", query_buf);
|
||||
}
|
||||
if (!row[0])
|
||||
{
|
||||
/*
|
||||
It may be that the slave SQL thread has not started yet, though START
|
||||
SLAVE has been issued ?
|
||||
*/
|
||||
mysql_free_result(res);
|
||||
if (tries++ == 30)
|
||||
die("could not sync with master ('%s' returned NULL)", query_buf);
|
||||
sleep(1); /* So at most we will wait 30 seconds and make 31 tries */
|
||||
mysql_free_result(res);
|
||||
goto wait_for_position;
|
||||
}
|
||||
mysql_free_result(res);
|
||||
|
@ -2578,6 +2573,7 @@ int do_save_master_pos()
|
|||
MYSQL *mysql = &cur_con->mysql;
|
||||
const char *query;
|
||||
int rpl_parse;
|
||||
DBUG_ENTER("do_save_master_pos");
|
||||
|
||||
rpl_parse = mysql_rpl_parse_enabled(mysql);
|
||||
mysql_disable_rpl_parse(mysql);
|
||||
|
@ -2735,7 +2731,7 @@ int do_save_master_pos()
|
|||
if (rpl_parse)
|
||||
mysql_enable_rpl_parse(mysql);
|
||||
|
||||
return 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3190,7 +3186,7 @@ struct st_connection * find_connection_by_name(const char *name)
|
|||
|
||||
int select_connection_name(const char *name)
|
||||
{
|
||||
DBUG_ENTER("select_connection2");
|
||||
DBUG_ENTER("select_connection_name");
|
||||
DBUG_PRINT("enter",("name: '%s'", name));
|
||||
|
||||
if (!(cur_con= find_connection_by_name(name)))
|
||||
|
@ -3213,7 +3209,7 @@ int select_connection(struct st_command *command)
|
|||
if (*p)
|
||||
*p++= 0;
|
||||
command->last_argument= p;
|
||||
return select_connection_name(name);
|
||||
DBUG_RETURN(select_connection_name(name));
|
||||
}
|
||||
|
||||
|
||||
|
@ -6011,6 +6007,8 @@ int main(int argc, char **argv)
|
|||
1024, 0, 0, get_var_key, var_free, MYF(0)))
|
||||
die("Variable hash initialization failed");
|
||||
|
||||
var_set_string("$MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
||||
|
||||
memset(&master_pos, 0, sizeof(master_pos));
|
||||
|
||||
parser.current_line= parser.read_lines= 0;
|
||||
|
|
|
@ -23,6 +23,9 @@ MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
|
|||
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
|
||||
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION | sed -e 's|[[^0-9.]].*$||;s|$|.|' | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
|
||||
|
||||
# Add previous major version for debian package upgrade path
|
||||
MYSQL_PREVIOUS_BASE_VERSION=4.1
|
||||
|
||||
# The port should be constant for a LONG time
|
||||
MYSQL_TCP_PORT_DEFAULT=3306
|
||||
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
|
||||
|
@ -52,6 +55,7 @@ romanian russian serbian slovak spanish swedish ukrainian"
|
|||
AC_SUBST(MYSQL_NO_DASH_VERSION)
|
||||
AC_SUBST(MYSQL_BASE_VERSION)
|
||||
AC_SUBST(MYSQL_VERSION_ID)
|
||||
AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION)
|
||||
AC_SUBST(PROTOCOL_VERSION)
|
||||
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
|
||||
[mysql client protocol version])
|
||||
|
@ -2548,7 +2552,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
|||
tests/Makefile Docs/Makefile support-files/Makefile dnl
|
||||
support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
|
||||
mysql-test/Makefile dnl
|
||||
debian/Makefile dnl
|
||||
debian/Makefile debian/defs.mk debian/control dnl
|
||||
mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
|
||||
include/mysql_version.h plugin/Makefile win/Makefile)
|
||||
|
||||
|
|
99
debian/Makefile.am
vendored
99
debian/Makefile.am
vendored
|
@ -14,7 +14,104 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
## Process this file with automake to create Makefile.in
|
||||
EXTRA_DIST = mysql-test-MYVER.files.in libndbclientNDBSOVER-dev.files.in mysql-server-MYVER.config.in libndbclientNDBSOVER.README.Debian.in mysql-server-MYVER.postrm.in mysql-server-MYVER.NEWS.in libndbclientNDBSOVER.postinst.in mysql-server-MYVER.links.in libndbclientNDBSOVER.files.in source.lintian-overrides.in mysql-server-MYVER.docs.in libmysqlclientMYSOVER.files.in mysql-server-MYVER.files.in libndbclientNDBSOVER-dev.links.in libmysqlclientMYSOVER.postinst.in mysql-extra-MYVER.dirs.in libmysqlclientMYSOVER-dev.links.in mysql-server-MYVER.dirs.in libmysqlclientMYSOVER-dev.examples.in mysql-client-MYVER.lintian-overrides.in copyright.more libndbclientNDBSOVER-dev.dirs.in mysql-server-MYVER.README.Debian.in libmysqlclientMYSOVER.docs.in compat mysql-test-MYVER.dirs.in libmysqlclientMYSOVER-dev.files.in libmysqlclientMYSOVER.dirs.in mysql-server-MYVER.logcheck.ignore.server.in mysql-storage-MYVER.mysql-storage.init.in libmysqlclientMYSOVER.README.Debian.in mysql-client-MYVER.README.Debian.in Makefile.am mysql-server-MYVER.prerm.in mysql-common.dirs.in defs.mk mysql-server-MYVER.mysql-server.logrotate.in mysql-common.README.Debian.in copyright mysql-storage-MYVER.dirs.in mysql-common.preinst.in mysql-client-MYVER.files.in mysql-server-MYVER.templates.in mysql-tools-MYVER.dirs.in mysql-management-MYVER.mysql-management.init.in watch mysql-common.postrm.in mysql-server-MYVER.preinst.in README.Maintainer mysql-tools-MYVER.files.in mysql-client-MYVER.NEWS.in mysql-server-MYVER.lintian-overrides.in changelog mysql-server-MYVER.logcheck.ignore.paranoid.in mysql-common.files.in mysql-server-MYVER.logcheck.ignore.workstation.in mysql-extra-MYVER.files.in mysql-management-MYVER.files.in mysql-client-MYVER.docs.in libmysqlclientMYSOVER-dev.README.Maintainer.in mysql-storage-MYVER.files.in additions additions/ndb_mgmd.cnf additions/mysql-server.lintian-overrides additions/my.cnf mysql-server-MYVER.postinst.in libndbclientNDBSOVER.dirs.in po po/fr.po po/sv.po po/da.po po/es.po po/ja.po po/tr.po po/nb.po po/POTFILES.in.in po/cs.po po/pt.po po/gl.po po/pt_BR.po po/nl.po po/templates.pot po/de.po po/eu.po po/ro.po po/ru.po po/it.po po/ca.po mysql-client-MYVER.dirs.in control.in libmysqlclientMYSOVER-dev.dirs.in mysql-server-MYOLDVER.preinst.in mysql-server.preinst.in mysql-management-MYVER.dirs.in rules libmysqlclientMYSOVER-dev.docs.in
|
||||
EXTRA_DIST = \
|
||||
mysql-test-BASE.files.in \
|
||||
libndbclientNLIB-dev.files.in \
|
||||
mysql-server-BASE.config.in \
|
||||
libndbclientNLIB.README.Debian.in \
|
||||
mysql-server-BASE.postrm.in \
|
||||
mysql-server-BASE.NEWS.in \
|
||||
libndbclientNLIB.postinst.in \
|
||||
mysql-server-BASE.links.in \
|
||||
libndbclientNLIB.files.in \
|
||||
source.lintian-overrides.in \
|
||||
mysql-server-BASE.docs.in \
|
||||
libmysqlclientSLIB.files.in \
|
||||
mysql-server-BASE.files.in \
|
||||
libndbclientNLIB-dev.links.in \
|
||||
libmysqlclientSLIB.postinst.in \
|
||||
mysql-extra-BASE.dirs.in \
|
||||
libmysqlclientSLIB-dev.links.in \
|
||||
mysql-server-BASE.dirs.in \
|
||||
libmysqlclientSLIB-dev.examples.in \
|
||||
mysql-client-BASE.lintian-overrides.in \
|
||||
copyright.more \
|
||||
libndbclientNLIB-dev.dirs.in \
|
||||
mysql-server-BASE.README.Debian.in \
|
||||
libmysqlclientSLIB.docs.in \
|
||||
compat \
|
||||
mysql-test-BASE.dirs.in \
|
||||
libmysqlclientSLIB-dev.files.in \
|
||||
libmysqlclientSLIB.dirs.in \
|
||||
mysql-server-BASE.logcheck.ignore.server.in \
|
||||
mysql-storage-BASE.mysql-storage.init.in \
|
||||
libmysqlclientSLIB.README.Debian.in \
|
||||
mysql-client-BASE.README.Debian.in \
|
||||
Makefile.am \
|
||||
mysql-server-BASE.prerm.in \
|
||||
mysql-common.dirs.in \
|
||||
defs.mk \
|
||||
defs.mk.in \
|
||||
mysql-server-BASE.mysql-server.logrotate.in \
|
||||
mysql-common.README.Debian.in \
|
||||
copyright \
|
||||
mysql-storage-BASE.dirs.in \
|
||||
mysql-common.preinst.in \
|
||||
mysql-client-BASE.files.in \
|
||||
mysql-server-BASE.templates.in \
|
||||
mysql-tools-BASE.dirs.in \
|
||||
mysql-management-BASE.mysql-management.init.in \
|
||||
watch \
|
||||
mysql-common.postrm.in \
|
||||
mysql-server-BASE.preinst.in \
|
||||
README.Maintainer \
|
||||
mysql-tools-BASE.files.in \
|
||||
mysql-client-BASE.NEWS.in \
|
||||
mysql-server-BASE.lintian-overrides.in \
|
||||
changelog \
|
||||
mysql-server-BASE.logcheck.ignore.paranoid.in \
|
||||
mysql-common.files.in \
|
||||
mysql-server-BASE.logcheck.ignore.workstation.in \
|
||||
mysql-extra-BASE.files.in \
|
||||
mysql-management-BASE.files.in \
|
||||
mysql-client-BASE.docs.in \
|
||||
libmysqlclientSLIB-dev.README.Maintainer.in \
|
||||
mysql-storage-BASE.files.in \
|
||||
additions \
|
||||
additions/ndb_mgmd.cnf \
|
||||
additions/mysql-server.lintian-overrides \
|
||||
additions/my.cnf \
|
||||
mysql-server-BASE.postinst.in \
|
||||
libndbclientNLIB.dirs.in \
|
||||
po \
|
||||
po/fr.po \
|
||||
po/sv.po \
|
||||
po/da.po \
|
||||
po/es.po \
|
||||
po/ja.po \
|
||||
po/tr.po \
|
||||
po/nb.po \
|
||||
po/POTFILES.in.in \
|
||||
po/cs.po \
|
||||
po/pt.po \
|
||||
po/gl.po \
|
||||
po/pt_BR.po \
|
||||
po/nl.po \
|
||||
po/templates.pot \
|
||||
po/de.po \
|
||||
po/eu.po \
|
||||
po/ro.po \
|
||||
po/ru.po \
|
||||
po/it.po \
|
||||
po/ca.po \
|
||||
mysql-client-BASE.dirs.in \
|
||||
control.in \
|
||||
libmysqlclientSLIB-dev.dirs.in \
|
||||
mysql-server-PREV.preinst.in \
|
||||
mysql-server.preinst.in \
|
||||
mysql-management-BASE.dirs.in \
|
||||
rules \
|
||||
libmysqlclientSLIB-dev.docs.in
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
|
72
debian/control.in
vendored
72
debian/control.in
vendored
|
@ -1,4 +1,4 @@
|
|||
Source: mysql-@MYSRCVER@
|
||||
Source: mysql-@MYSQL_BASE_VERSION@
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: Monty Taylor <mtaylor@mysql.com>
|
||||
|
@ -6,12 +6,12 @@ Uploaders: Mads Martin Joergensen <mads@mysql.com>, MySQL Build Team <build-priv
|
|||
Build-Depends: libtool (>= 1.4.2-7), g++ (>= 4:3.3.5-3), procps | hurd, debhelper (>= 4.1.16), file (>= 3.28-1), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline5-dev | libreadline-dev, psmisc, po-debconf, chrpath, automake1.8, doxygen, gs, dpatch, gawk, bison
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: libmysqlclient@MYSOVER@
|
||||
Package: libmysqlclient@SHARED_LIB_MAJOR_VERSION@
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Depends: mysql-common (>= ${Source-Version}), ${shlibs:Depends}
|
||||
Conflicts: libmysqlclient@MYSOVER@off
|
||||
Replaces: libmysqlclient@MYSOVER@off
|
||||
Conflicts: libmysqlclient@SHARED_LIB_MAJOR_VERSION@off
|
||||
Replaces: libmysqlclient@SHARED_LIB_MAJOR_VERSION@off
|
||||
Description: mysql database client library
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -33,10 +33,10 @@ Description: mysql database client library
|
|||
This package contains the shared libraries (*.so*) which certain
|
||||
languages and applications need to dynamically load and use MySQL.
|
||||
|
||||
Package: libmysqlclient@MYSOVER@-dev
|
||||
Package: libmysqlclient@SHARED_LIB_MAJOR_VERSION@-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: libmysqlclient@MYSOVER@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
|
||||
Depends: libmysqlclient@SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
|
||||
Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev
|
||||
Provides: libmysqlclient-dev
|
||||
Description: mysql database development files
|
||||
|
@ -60,10 +60,10 @@ Description: mysql database development files
|
|||
This package contains the development header files and libraries
|
||||
necessary to develop MySQL client applications.
|
||||
|
||||
Package: libndbclient@NDBSOVER@
|
||||
Package: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@
|
||||
Section: libs
|
||||
Architecture: any
|
||||
Depends: mysql-common (>= ${Source-Version}), libmysqlclient@MYSOVER@, ${shlibs:Depends}
|
||||
Depends: mysql-common (>= ${Source-Version}), libmysqlclient@SHARED_LIB_MAJOR_VERSION@, ${shlibs:Depends}
|
||||
Description: mysql cluster NdbApi library
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -85,10 +85,10 @@ Description: mysql cluster NdbApi library
|
|||
This package contains the shared libraries (*.so*) which certain
|
||||
languages and applications need to dynamically load and use MySQL NdbApi.
|
||||
|
||||
Package: libndbclient@NDBSOVER@-dev
|
||||
Package: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: libndbclient@NDBSOVER@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
|
||||
Depends: libndbclient@NDB_SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), zlib1g-dev, ${shlibs:Depends}
|
||||
Provides: libndbclient-dev
|
||||
Description: mysql cluster NdbApi development files
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
|
@ -115,9 +115,9 @@ Package: mysql-common
|
|||
Section: misc
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Conflicts: mysql-common-@MYOLDVER@
|
||||
Provides: mysql-common-@MYOLDVER@
|
||||
Replaces: mysql-common-@MYOLDVER@
|
||||
Conflicts: mysql-common-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Provides: mysql-common-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Replaces: mysql-common-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Description: mysql database common files (e.g. /etc/mysql/my.cnf)
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -138,12 +138,12 @@ Description: mysql database common files (e.g. /etc/mysql/my.cnf)
|
|||
.
|
||||
This package includes files needed by all versions of the client library.
|
||||
|
||||
Package: mysql-client-@MYVER@
|
||||
Package: mysql-client-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${Source-Version}), libmysqlclient@MYSOVER@ (>= ${Source-Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: virtual-mysql-client, mysql-client, mysql-client-@MYOLDVER@
|
||||
Conflicts: mysql-client (<< ${Source-Version}), mysql-client-@MYOLDVER@
|
||||
Replaces: mysql-client (<< ${Source-Version}), mysql-server, mysql-client-@MYOLDVER@
|
||||
Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${Source-Version}), libmysqlclient@SHARED_LIB_MAJOR_VERSION@ (>= ${Source-Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: virtual-mysql-client, mysql-client, mysql-client-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Conflicts: mysql-client (<< ${Source-Version}), mysql-client-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Replaces: mysql-client (<< ${Source-Version}), mysql-server, mysql-client-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Description: mysql database client binaries
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -164,15 +164,15 @@ Description: mysql database client binaries
|
|||
.
|
||||
This package contains the standard MySQL clients and administration tools.
|
||||
|
||||
Package: mysql-server-@MYVER@
|
||||
Package: mysql-server-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Suggests: tinyca
|
||||
Recommends: mailx
|
||||
Pre-Depends: mysql-common (>= ${Source-Version}), adduser (>= 3.40)
|
||||
Depends: mysql-client-@MYVER@ (>= ${Source-Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10)
|
||||
Conflicts: mysql-server (<< ${Source-Version}), mysql-server-@MYOLDVER@ (<< 5.0.26-3)
|
||||
Provides: mysql-server, virtual-mysql-server, mysql-server-@MYOLDVER@
|
||||
Replaces: mysql-server (<< ${Source-Version}), mysql-server-@MYOLDVER@
|
||||
Depends: mysql-client-@MYSQL_BASE_VERSION@ (>= ${Source-Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10)
|
||||
Conflicts: mysql-server (<< ${Source-Version}), mysql-server-@MYSQL_PREVIOUS_BASE_VERSION@ (<< 5.0.26-3)
|
||||
Provides: mysql-server, virtual-mysql-server, mysql-server-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Replaces: mysql-server (<< ${Source-Version}), mysql-server-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Description: mysql database server binaries
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -195,12 +195,12 @@ Description: mysql database server binaries
|
|||
as related utilities to run and administrate a MySQL server.
|
||||
.
|
||||
If you want to access and work with the database, you have to install
|
||||
package mysql-client-@MYVER@ as well!
|
||||
package mysql-client-@MYSQL_BASE_VERSION@ as well!
|
||||
|
||||
Package: mysql-test-@MYVER@
|
||||
Package: mysql-test-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Pre-Depends: mysql-common (>= ${Source-Version})
|
||||
Depends: mysql-client-@MYVER@ (>= ${Source-Version}), libdbd-mysql-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}
|
||||
Depends: mysql-client-@MYSQL_BASE_VERSION@ (>= ${Source-Version}), libdbd-mysql-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MySQL - test suite
|
||||
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
|
||||
and robust SQL (Structured Query Language) database server. MySQL Server
|
||||
|
@ -221,7 +221,7 @@ Description: MySQL - test suite
|
|||
.
|
||||
This package contains the MySQL regression test suite.
|
||||
|
||||
Package: mysql-storage-@MYVER@
|
||||
Package: mysql-storage-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MySQL - ndbcluster storage engine
|
||||
|
@ -248,7 +248,7 @@ Description: MySQL - ndbcluster storage engine
|
|||
Note that this storage engine can only be used in conjunction
|
||||
with the MySQL Max server.
|
||||
|
||||
Package: mysql-management-@MYVER@
|
||||
Package: mysql-management-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MySQL - ndbcluster storage engine management
|
||||
|
@ -273,7 +273,7 @@ Description: MySQL - ndbcluster storage engine management
|
|||
It is necessary to have this package installed on at least
|
||||
one computer in the cluster.
|
||||
|
||||
Package: mysql-tools-@MYVER@
|
||||
Package: mysql-tools-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MySQL - ndbcluster storage engine basic tools
|
||||
|
@ -296,7 +296,7 @@ Description: MySQL - ndbcluster storage engine basic tools
|
|||
.
|
||||
This package contains ndbcluster storage engine basic tools.
|
||||
|
||||
Package: mysql-extra-@MYVER@
|
||||
Package: mysql-extra-@MYSQL_BASE_VERSION@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: MySQL - ndbcluster storage engine extra tools
|
||||
|
@ -323,11 +323,11 @@ Description: MySQL - ndbcluster storage engine extra tools
|
|||
They should be used with caution
|
||||
|
||||
|
||||
Package: mysql-server-@MYOLDVER@
|
||||
Package: mysql-server-@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
Architecture: any
|
||||
Section: oldlibs
|
||||
Priority: extra
|
||||
Depends: mysql-server-@MYVER@
|
||||
Depends: mysql-server-@MYSQL_BASE_VERSION@
|
||||
Description: mysql database server (transitional package)
|
||||
MySQL is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
|
@ -338,18 +338,18 @@ Description: mysql database server (transitional package)
|
|||
|
||||
Package: mysql-server
|
||||
Architecture: all
|
||||
Depends: mysql-server-@MYVER@
|
||||
Depends: mysql-server-@MYSQL_BASE_VERSION@
|
||||
Description: mysql database server (meta package depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mysql-server (currently mysql-server-@MYVER@), as determined by the MySQL
|
||||
mysql-server (currently mysql-server-@MYSQL_BASE_VERSION@), as determined by the MySQL
|
||||
maintainers. Install this package if in doubt about which MySQL version
|
||||
you want, as this is the one we consider to be in the best shape.
|
||||
|
||||
Package: mysql-client
|
||||
Architecture: all
|
||||
Depends: mysql-client-@MYVER@
|
||||
Depends: mysql-client-@MYSQL_BASE_VERSION@
|
||||
Description: mysql database client (meta package depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mysql-client (currently mysql-client-@MYVER@), as determined by the MySQL
|
||||
mysql-client (currently mysql-client-@MYSQL_BASE_VERSION@), as determined by the MySQL
|
||||
maintainers. Install this package if in doubt about which MySQL version
|
||||
you want, as this is the one we consider to be in the best shape.
|
||||
|
|
5
debian/defs.mk
vendored
5
debian/defs.mk
vendored
|
@ -1,5 +0,0 @@
|
|||
MYSQL_BUILD_OPTS=--with-comment='MySQL Server (custom)' --with-server-suffix='-custom'
|
||||
MYSQL_BUILD_CXXFLAGS=-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2
|
||||
MYSQL_BUILD_CFLAGS=-DBIG_JOINS=1 -O2
|
||||
MYSQL_BUILD_CC=gcc
|
||||
MYSQL_BUILD_CXX=gcc
|
14
debian/defs.mk.in
vendored
Normal file
14
debian/defs.mk.in
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
MYSQL_BUILD_OPTS=--with-comment='MySQL Server (custom)' --with-server-suffix='-custom'
|
||||
MYSQL_BUILD_CXXFLAGS=-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2
|
||||
MYSQL_BUILD_CFLAGS=-DBIG_JOINS=1 -O2
|
||||
MYSQL_BUILD_CC=gcc
|
||||
MYSQL_BUILD_CXX=gcc
|
||||
# we re-write state into this file. MYSQL_BASE_VERSION might get a suffix added
|
||||
# by debian/rules which could result in a nasty loop. VER is there to hold the
|
||||
# original unadorned version from autoconf
|
||||
VER=@MYSQL_BASE_VERSION@
|
||||
OLDVER=@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
MYSQL_BASE_VERSION=@MYSQL_BASE_VERSION@
|
||||
MYSQL_PREVIOUS_BASE_VERSION=@MYSQL_PREVIOUS_BASE_VERSION@
|
||||
SHARED_LIB_MAJOR_VERSION=@SHARED_LIB_MAJOR_VERSION@
|
||||
NDB_SHARED_LIB_MAJOR_VERSION=@NDB_SHARED_LIB_MAJOR_VERSION@
|
|
@ -10,7 +10,7 @@ usr/bin/mysqlcheck
|
|||
usr/bin/mysqldump
|
||||
usr/bin/mysqlimport
|
||||
usr/bin/mysqlshow
|
||||
usr/share/lintian/overrides/mysql-client-@MYVER@
|
||||
usr/share/lintian/overrides/mysql-client-@MYSQL_BASE_VERSION@
|
||||
usr/share/man/man1/mysql.1
|
||||
usr/share/man/man1/mysqlaccess.1
|
||||
usr/share/man/man1/mysqladmin.1
|
1
debian/mysql-client-BASE.lintian-overrides.in
vendored
Normal file
1
debian/mysql-client-BASE.lintian-overrides.in
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
mysql-client-@MYSQL_BASE_VERSION@: package-has-a-duplicate-relation
|
|
@ -1 +0,0 @@
|
|||
mysql-client-@MYVER@: package-has-a-duplicate-relation
|
|
@ -9,7 +9,7 @@ CNF=/etc/mysql/my.cnf
|
|||
|
||||
# Beware that there are two ypwhich one of them needs the 2>/dev/null!
|
||||
if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
|
||||
db_input high mysql-server-@MYVER@/nis_warning || true
|
||||
db_input high mysql-server-@MYSQL_BASE_VERSION@/nis_warning || true
|
||||
db_go
|
||||
fi
|
||||
|
||||
|
@ -34,6 +34,6 @@ if [ "$1" = "configure" ] &&
|
|||
egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF
|
||||
)
|
||||
then
|
||||
db_input medium mysql-server-@MYVER@/need_sarge_compat || true
|
||||
db_input medium mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat || true
|
||||
db_go
|
||||
fi
|
|
@ -26,7 +26,7 @@ usr/bin/resolveip
|
|||
usr/sbin/mysqld
|
||||
usr/sbin/mysqlmanager
|
||||
usr/lib/mysql/mysqld.sym
|
||||
usr/share/lintian/overrides/mysql-server-@MYVER@
|
||||
usr/share/lintian/overrides/mysql-server-@MYSQL_BASE_VERSION@
|
||||
usr/share/info/mysql.info
|
||||
usr/share/man/man1/mysqlman.1
|
||||
usr/share/man/man1/my_print_defaults.1
|
4
debian/mysql-server-BASE.lintian-overrides.in
vendored
Normal file
4
debian/mysql-server-BASE.lintian-overrides.in
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
mysql-server-@MYSQL_BASE_VERSION@: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'
|
||||
mysql-server-@MYSQL_BASE_VERSION@: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}'
|
||||
mysql-server-@MYSQL_BASE_VERSION@: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql
|
||||
mysql-server-@MYSQL_BASE_VERSION@: statically-linked-binary ./usr/sbin/mysqld
|
|
@ -137,12 +137,12 @@ EOF
|
|||
|
||||
# On dist-upgrades, we ensure that the old_password setting is updated
|
||||
# before passwords are changed. Except for that config files are taboo!
|
||||
db_get mysql-server-@MYVER@/need_sarge_compat_done || true
|
||||
db_get mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat_done || true
|
||||
if [ "$RET" = "false" ]; then
|
||||
db_get mysql-server-@MYVER@/need_sarge_compat
|
||||
db_get mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat
|
||||
echo -e "# created by debconf but save to be edited\n[mysqld]\nold_passwords = $RET" > /etc/mysql/conf.d/old_passwords.cnf
|
||||
fi
|
||||
db_set mysql-server-@MYVER@/need_sarge_compat_done true
|
||||
db_set mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat_done true
|
||||
|
||||
# initiate databases. Output is not allowed by debconf :-(
|
||||
# Debian: beware of the bashisms...
|
|
@ -49,9 +49,9 @@ if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; the
|
|||
rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
|
||||
rm -rf /var/log/mysql
|
||||
|
||||
db_input high mysql-server-@MYVER@/postrm_remove_databases || true
|
||||
db_input high mysql-server-@MYSQL_BASE_VERSION@/postrm_remove_databases || true
|
||||
db_go
|
||||
db_get mysql-server-@MYVER@/postrm_remove_databases || true
|
||||
db_get mysql-server-@MYSQL_BASE_VERSION@/postrm_remove_databases || true
|
||||
if [ "$RET" = "true" ]; then
|
||||
# never remove the debian.cnf when the databases are still existing
|
||||
# else we ran into big trouble on the next install!
|
||||
|
@ -87,6 +87,6 @@ if [ "$1" = "purge" ] ; then
|
|||
fi
|
||||
# (normally) End automatically added section
|
||||
|
||||
# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-@MYVER@ is installed
|
||||
# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-@MYSQL_BASE_VERSION@ is installed
|
||||
|
||||
exit 0
|
|
@ -1,4 +1,4 @@
|
|||
Template: mysql-server-@MYVER@/really_downgrade
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/really_downgrade
|
||||
Type: boolean
|
||||
Default: false
|
||||
_Description: Do you really want to downgrade?
|
||||
|
@ -6,7 +6,7 @@ _Description: Do you really want to downgrade?
|
|||
mysql-server package with a higher version has been installed before.
|
||||
It can not be guaranteed that this version can use its data.
|
||||
|
||||
Template: mysql-server-@MYVER@/nis_warning
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/nis_warning
|
||||
Type: note
|
||||
_Description: Important note for NIS/YP users!
|
||||
To use mysql you must install an equivalent user and group to the
|
||||
|
@ -19,7 +19,7 @@ _Description: Important note for NIS/YP users!
|
|||
.
|
||||
/var/lib/mysql: drwxr-xr-x mysql mysql
|
||||
|
||||
Template: mysql-server-@MYVER@/postrm_remove_databases
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/postrm_remove_databases
|
||||
Type: boolean
|
||||
Default: false
|
||||
_Description: Remove the databases used by all MySQL versions?
|
||||
|
@ -27,7 +27,7 @@ _Description: Remove the databases used by all MySQL versions?
|
|||
If it is planned to just install a higher MySQL version or if a different
|
||||
mysql-server package is already using it, the data should be kept.
|
||||
|
||||
Template: mysql-server-@MYVER@/start_on_boot
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/start_on_boot
|
||||
Type: boolean
|
||||
Default: true
|
||||
_Description: Should MySQL start on boot?
|
||||
|
@ -54,16 +54,16 @@ _Description: Unable to set password for MySQL "root" user
|
|||
is properly protected with a password (see README.Debian for more
|
||||
information).
|
||||
|
||||
Template: mysql-server-@MYVER@/need_sarge_compat
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat
|
||||
Type: boolean
|
||||
Default: false
|
||||
_Description: Support MySQL connections from hosts running Debian "sarge" or older?
|
||||
The way passwords were stored was not very secure. This has been improved
|
||||
with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 Sarge
|
||||
will not be able to connect to account which are new or whose password have
|
||||
been changed. See /usr/share/doc/mysql-server-@MYVER@/README.Debian.
|
||||
been changed. See /usr/share/doc/mysql-server-@MYSQL_BASE_VERSION@/README.Debian.
|
||||
|
||||
Template: mysql-server-@MYVER@/need_sarge_compat_done
|
||||
Template: mysql-server-@MYSQL_BASE_VERSION@/need_sarge_compat_done
|
||||
Type: boolean
|
||||
Default: false
|
||||
Description: for internal use
|
|
@ -1,4 +0,0 @@
|
|||
mysql-server-@MYVER@: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'
|
||||
mysql-server-@MYVER@: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}'
|
||||
mysql-server-@MYVER@: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql
|
||||
mysql-server-@MYVER@: statically-linked-binary ./usr/sbin/mysqld
|
2
debian/po/POTFILES.in.in
vendored
2
debian/po/POTFILES.in.in
vendored
|
@ -1 +1 @@
|
|||
[type: gettext/rfc822deb] mysql-server-@MYVER@.templates
|
||||
[type: gettext/rfc822deb] mysql-server-@MYSQL_BASE_VERSION@.templates
|
||||
|
|
114
debian/rules
vendored
114
debian/rules
vendored
|
@ -4,9 +4,6 @@ export SHELL = /bin/bash
|
|||
|
||||
export DH_VERBOSE=1
|
||||
|
||||
export VER=5.0
|
||||
export OLDVER=4.1
|
||||
|
||||
include debian/defs.mk
|
||||
|
||||
changelog_values := $(shell dpkg-parsechangelog \
|
||||
|
@ -14,28 +11,18 @@ changelog_values := $(shell dpkg-parsechangelog \
|
|||
PKGSOURCE := $(word 1, $(changelog_values))
|
||||
PKGVERSION := $(word 2, $(changelog_values))
|
||||
PKGDISTRO := $(word 3, $(changelog_values))
|
||||
PKGFLAVOR := $(shell echo $(PKGSOURCE) | perl -nle 's/mysql-(.*?)-$(PKGDISTRO).*/$$1/ && print ')
|
||||
|
||||
soversions := $(shell awk -F= '/SHARED_LIB_MAJOR_VERSION=/ {print $$2}' configure.in)
|
||||
|
||||
export MYSOVER=$(word 1, $(soversions))
|
||||
export NDBSOVER=$(word 2, $(soversions))
|
||||
PKGFLAVOR := $(shell echo $(PKGSOURCE) | perl -nle 's/mysql-(.*?)-\d+.*/$$1/ && print ')
|
||||
|
||||
ifeq ("x$(MYSQL_FLAVOR)","x")
|
||||
export MYSQL_FLAVOR=$(PKGFLAVOR)
|
||||
endif
|
||||
|
||||
ifeq ("x$(MYSQL_FLAVOR)","x")
|
||||
export MYVER=$(VER)
|
||||
export MYOLDVER=$(OLDVER)
|
||||
export MYSRCVER=$(MYVER)
|
||||
else
|
||||
export MYVER=$(MYSQL_FLAVOR)-$(VER)
|
||||
export MYOLDVER=$(MYSQL_FLAVOR)-$(OLDVER)
|
||||
export MYSRCVER=$(MYSQL_FLAVOR)-$(PKGDISTRO)-$(VER)
|
||||
ifneq ("x$(MYSQL_FLAVOR)","x")
|
||||
MYSQL_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_BASE_VERSION)
|
||||
MYSQL_PREVIOUS_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_PREVIOUS_BASE_VERSION)
|
||||
endif
|
||||
|
||||
PACKAGE=mysql-$(MYVER)
|
||||
PACKAGE=mysql-$(MYSQL_BASE_VERSION)
|
||||
|
||||
PWD=$(shell pwd)
|
||||
TMP=$(PWD)/debian/tmp/
|
||||
|
@ -71,17 +58,19 @@ ifeq ($(STATIC_MYSQLD), 1)
|
|||
USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static
|
||||
endif
|
||||
|
||||
|
||||
ifneq ("$(MYSQL_BUILD_TEST)","yes")
|
||||
MYSQL_BUILD_TEST=no
|
||||
endif
|
||||
|
||||
control-file:
|
||||
@echo "## This file is autogenerated you want to edit control.in instead" > debian/control.tmp
|
||||
sed -e "s/@MYVER@/$(MYVER)/g" \
|
||||
sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
|
||||
-e "s/@VER@/$(VER)/g" \
|
||||
-e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
|
||||
-e "s/@MYOLDVER@/$(MYOLDVER)/g" \
|
||||
-e "s/@MYSRCVER@/$(MYSRCVER)/g" \
|
||||
-e "s/@MYSOVER@/$(MYSOVER)/g" \
|
||||
-e "s/@NDBSOVER@/$(NDBSOVER)/g" \
|
||||
-e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
|
||||
-e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
|
||||
-e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
|
||||
-e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
|
||||
debian/control.in >> debian/control.tmp
|
||||
[ -e debian/control ] \
|
||||
&& cmp -s debian/control debian/control.tmp \
|
||||
|
@ -187,20 +176,19 @@ stamp-control:
|
|||
|
||||
# We have some naming inconsistencies here...
|
||||
for f in debian/*.in debian/po/POTFILES.in.in ; do \
|
||||
f2=`echo $$f | sed "s,MYVER,$(MYVER),g;\
|
||||
s,MYSRCVER,$(MYSRCVER),g;\
|
||||
s,MYOLDVER,$(MYOLDVER),g;\
|
||||
s,NDBSOVER,$(NDBSOVER),g;\
|
||||
s,MYSOVER,$(MYSOVER),g;s,\.in$$,,"`; \
|
||||
if [ $$f2 != debian/control ]; then \
|
||||
sed -e "s/@MYVER@/$(MYVER)/g" \
|
||||
f2=`echo $$f | sed "s,BASE,$(MYSQL_BASE_VERSION),g;\
|
||||
s,PREV,$(MYSQL_PREVIOUS_BASE_VERSION),g;\
|
||||
s,NLIB,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
|
||||
s,SLIB,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
|
||||
if [ $$f2 != debian/control -a $$f2 != debian/Makefile ]; then \
|
||||
sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
|
||||
-e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
|
||||
-e "s/@VER@/$(VER)/g" \
|
||||
-e "s/@PRIORITY@/$(PRIORITY)/g" \
|
||||
-e "s/@MYOLDVER@/$(MYOLDVER)/g" \
|
||||
-e "s/@MYSRCVER@/$(MYSRCVER)/g" \
|
||||
-e "s/@MYSOVER@/$(MYSOVER)/g" \
|
||||
-e "s/@NDBSOVER@/$(NDBSOVER)/g" \
|
||||
-e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
|
||||
-e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
|
||||
-e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
|
||||
-e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
|
||||
-e "s,@SCRIPTDIR@,/$(scriptdir),g" \
|
||||
-e "s,@INFO@,$(findstring info, $(doc_dependencies)),g" \
|
||||
<$$f >$$f2; \
|
||||
|
@ -212,7 +200,7 @@ stamp-control:
|
|||
# files somewhere else.
|
||||
clean: configure.in Makefile.am control-file
|
||||
|
||||
rm -f debian/mysql-server-$(MYVER).mysql.init
|
||||
rm -f debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init
|
||||
|
||||
# We depend on this later, and delete the results in the mean time
|
||||
$(MAKE) -f debian/rules stamp-control
|
||||
|
@ -221,23 +209,28 @@ clean: configure.in Makefile.am control-file
|
|||
rm -f configure-stamp
|
||||
rm -f build-stamp
|
||||
|
||||
cp debian/defs.mk debian/defs.mk.sav
|
||||
cp debian/control debian/control.sav
|
||||
-make distclean
|
||||
mv debian/defs.mk.sav debian/defs.mk
|
||||
mv debian/control.sav debian/control
|
||||
|
||||
debconf-updatepo
|
||||
|
||||
for f in debian/*.in; do \
|
||||
f2=`echo $$f | sed "s,MYVER,$(MYVER),g;\
|
||||
s,MYOLDVER,$(MYOLDVER),g;\
|
||||
s,MYSRCVER,$(MYSRCVER),g;\
|
||||
s,NDBSOVER,$(NDBSOVER),g;\
|
||||
s,MYSOVER,$(MYSOVER),g;s,\.in$$,,"`; \
|
||||
if [ $$f2 != debian/control ]; then \
|
||||
f2=`echo $$f | sed "s,MYSQL_BASE_VERSION,$(MYSQL_BASE_VERSION),g;\
|
||||
s,MYSQL_PREVIOUS_BASE_VERSION,$(MYSQL_PREVIOUS_BASE_VERSION),g;\
|
||||
s,MYSQL_SOURCE_BASE_VERSION,$(MYSQL_SOURCE_BASE_VERSION),g;\
|
||||
s,NDB_SHARED_LIB_MAJOR_VERSION,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
|
||||
s,SHARED_LIB_MAJOR_VERSION,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
|
||||
if [ $$f2 != debian/control -a $$f2 != debian/Makefile -a $$f2 != debian/defs.mk ]; then \
|
||||
rm -f $$f2; \
|
||||
fi; \
|
||||
done
|
||||
rm -f po/POTFILES.in
|
||||
|
||||
dh_clean -v
|
||||
|
||||
|
||||
|
||||
install:
|
||||
|
@ -250,21 +243,14 @@ install: build stamp-control
|
|||
|
||||
# Sort of hackish way to make sure we have a init script
|
||||
# for dh_installinit
|
||||
cp support-files/mysql.server debian/mysql-server-$(MYVER).mysql.init
|
||||
cp support-files/mysql.server debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init
|
||||
|
||||
# some self written manpages which hopefully
|
||||
# gets overwritten sooner or later with upstreams
|
||||
mkdir -p $(TMP)/usr/share/man/man1/
|
||||
mkdir -p $(TMP)/usr/share/man/man8/
|
||||
mkdir -p $(TMP)/usr/lib/mysql/mysqld.sym
|
||||
cp debian/additions/*.1 $(TMP)/usr/share/man/man1/
|
||||
ln -s mysqlmanager.1 $(TMP)/usr/share/man/man1/mysqlmanager-pwgen.1
|
||||
ln -s mysqlmanager.1 $(TMP)/usr/share/man/man1/mysqlmanagerc.1
|
||||
cp sql/mysqld.sym $(TMP)/usr/lib/mysql/mysqld.sym
|
||||
|
||||
# TODO: need real man pages!
|
||||
for f in mysql mysqldump mysqlaccess mysqladmin mysqlshow myisam_ftdump myisamlog myisampack mysql_explain_log mysqld_multi mysqld_safe mysql_fix_privilege_tables mysql_upgrade mysql_tzinfo_to_sql mysql_zap perror replace safe_mysqld ; do touch $(TMP)/usr/share/man/man1/$$f.1 ; done
|
||||
for f in mysqld mysqlmanager ; do touch $(TMP)/usr/share/man/man8/$$f.8 ; done
|
||||
#for f in mysql mysqldump mysqlaccess mysqladmin mysqlshow myisam_ftdump myisamlog myisampack mysql_explain_log mysqld_multi mysqld_safe mysql_fix_privilege_tables mysql_upgrade mysql_tzinfo_to_sql mysql_zap perror replace safe_mysqld ; do touch $(TMP)/usr/share/man/man1/$$f.1 ; done
|
||||
#for f in mysqld mysqlmanager ; do touch $(TMP)/usr/share/man/man8/$$f.8 ; done
|
||||
# make install (trailing slash needed for innobase)
|
||||
$(MAKE) install DESTDIR=$(TMP)/
|
||||
|
||||
|
@ -285,11 +271,11 @@ install: build stamp-control
|
|||
perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libndbclient.la
|
||||
|
||||
# Check if our beloved versioned symbols are really there
|
||||
if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.15.0.0 | grep -c libmysqlclient_15`" -lt 500 ]; then \
|
||||
if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.$(SHARED_LIB_MAJOR_VERSION).0.0 | grep -c libmysqlclient_$(SHARED_LIB_MAJOR_VERSION)`" -lt 500 ]; then \
|
||||
echo "ERROR: versioned symbols are absent"; \
|
||||
exit 1; \
|
||||
fi
|
||||
if [ "`objdump -T $(TMP)/usr/lib/libndbclient.so.2.0.0 | grep -c libndbclient_2`" -lt 500 ]; then \
|
||||
if [ "`objdump -T $(TMP)/usr/lib/libndbclient.so.$(NDB_SHARED_LIB_MAJOR_VERSION).0.0 | grep -c libndbclient_$(NDB_SHARED_LIB_MAJOR_VERSION)`" -lt 500 ]; then \
|
||||
echo "ERROR: versioned symbols are absent from libndbclient"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
@ -306,8 +292,8 @@ install: build stamp-control
|
|||
|
||||
# mysql-server
|
||||
install -m 0755 scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
|
||||
mkdir -p $(TMP)/usr/share/doc/mysql-server-$(MYVER)/examples
|
||||
mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-$(MYVER)/examples/
|
||||
mkdir -p $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BASE_VERSION)/examples
|
||||
mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BASE_VERSION)/examples/
|
||||
rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
|
||||
$(TMP)/usr/share/mysql/mysql-log-rotate \
|
||||
$(TMP)/usr/share/mysql/mysql.server \
|
||||
|
@ -319,14 +305,14 @@ install: build stamp-control
|
|||
cp -a sql-bench $(TMP)/usr/share/mysql/
|
||||
# lintian overrides
|
||||
mkdir -p $(TMP)/usr/share/lintian/overrides/
|
||||
cp debian/mysql-server-$(MYVER).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-$(MYVER)
|
||||
cp debian/mysql-client-$(MYVER).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-$(MYVER)
|
||||
cp debian/mysql-server-$(MYSQL_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-$(MYSQL_BASE_VERSION)
|
||||
cp debian/mysql-client-$(MYSQL_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-$(MYSQL_BASE_VERSION)
|
||||
|
||||
# For 4.1 -> 5.0 transition
|
||||
d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
|
||||
mkdir -p $$d; \
|
||||
cp debian/mysql-server-$(MYVER).mysql.init $$d/_etc_init.d_mysql; \
|
||||
cp debian/mysql-server-$(MYVER).mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
|
||||
cp debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init $$d/_etc_init.d_mysql; \
|
||||
cp debian/mysql-server-$(MYSQL_BASE_VERSION).mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
|
||||
|
||||
dh_movefiles
|
||||
|
||||
|
@ -381,12 +367,12 @@ binary-arch: build install
|
|||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
dh_makeshlibs -a
|
||||
dh_makeshlibs -plibmysqlclient$(MYSOVER) -V"libmysqlclient$(MYSOVER) (>= $(PKGVERSION))"
|
||||
dh_makeshlibs -plibndbclient$(NDBSOVER) -V"libndbclient2 (>= $(PKGVERSION))"
|
||||
dh_makeshlibs -plibmysqlclient$(SHARED_LIB_MAJOR_VERSION) -V"libmysqlclient$(SHARED_LIB_MAJOR_VERSION) (>= $(PKGVERSION))"
|
||||
dh_makeshlibs -plibndbclient$(NDB_SHARED_LIB_MAJOR_VERSION) -V"libndbclient2 (>= $(PKGVERSION))"
|
||||
dh_installdeb -a
|
||||
dh_perl -a
|
||||
dh_shlibdeps -a -l debian/libmysqlclient$(MYSOVER)/usr/lib -L libmysqlclient$(MYSOVER)
|
||||
dh_shlibdeps -a -l debian/libndbclient$(NDBSOVER)/usr/lib -L libndbclient$(NDBSOVER)
|
||||
dh_shlibdeps -a -l debian/libmysqlclient$(SHARED_LIB_MAJOR_VERSION)/usr/lib -L libmysqlclient$(SHARED_LIB_MAJOR_VERSION)
|
||||
dh_shlibdeps -a -l debian/libndbclient$(NDB_SHARED_LIB_MAJOR_VERSION)/usr/lib -L libndbclient$(NDB_SHARED_LIB_MAJOR_VERSION)
|
||||
dh_gencontrol -a
|
||||
dh_md5sums -a
|
||||
dh_builddeb -a
|
||||
|
|
4
debian/source.lintian-overrides.in
vendored
4
debian/source.lintian-overrides.in
vendored
|
@ -1,5 +1,5 @@
|
|||
maintainer-script-lacks-debhelper-token debian/mysql-server-@MYVER@.postinst
|
||||
maintainer-script-lacks-debhelper-token debian/mysql-server-@MYVER@.postrm
|
||||
maintainer-script-lacks-debhelper-token debian/mysql-server-@MYSQL_BASE_VERSION@.postinst
|
||||
maintainer-script-lacks-debhelper-token debian/mysql-server-@MYSQL_BASE_VERSION@.postrm
|
||||
outdated-autotools-helper-file bdb/dist/config.sub 2002-07-03
|
||||
outdated-autotools-helper-file bdb/dist/config.guess 2002-07-23
|
||||
bad-distribution-in-changes-file sarge
|
||||
|
|
|
@ -95,6 +95,7 @@ extern const char *client_errors[]; /* Error messages */
|
|||
#define CR_NO_RESULT_SET 2053
|
||||
#define CR_NOT_IMPLEMENTED 2054
|
||||
#define CR_SERVER_LOST_EXTENDED 2055
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2055
|
||||
#define CR_STMT_CLOSED 2056
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2056
|
||||
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
|
||||
|
||||
|
|
|
@ -77,6 +77,13 @@
|
|||
#endif
|
||||
#endif /* _WIN32... */
|
||||
|
||||
/* Make it easier to add conditionl code for windows */
|
||||
#ifdef __WIN__
|
||||
#define IF_WIN(A,B) (A)
|
||||
#else
|
||||
#define IF_WIN(A,B) (B)
|
||||
#endif
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifdef WITH_NDB_BINLOG
|
||||
#define HAVE_NDB_BINLOG 1
|
||||
|
|
|
@ -51,8 +51,6 @@ typedef long my_time_t;
|
|||
|
||||
/* two-digit years < this are 20..; >= this are 19.. */
|
||||
#define YY_PART_YEAR 70
|
||||
/* apply above magic to years < this */
|
||||
#define YY_MAGIC_BELOW 200
|
||||
|
||||
/* Flags to str_to_datetime */
|
||||
#define TIME_FUZZY_DATE 1
|
||||
|
@ -95,6 +93,7 @@ int check_time_range(struct st_mysql_time *, int *warning);
|
|||
|
||||
long calc_daynr(uint year,uint month,uint day);
|
||||
uint calc_days_in_year(uint year);
|
||||
uint year_2000_handling(uint year);
|
||||
|
||||
void init_time(void);
|
||||
|
||||
|
|
|
@ -26,8 +26,9 @@ typedef struct st_typelib { /* Different types saved here */
|
|||
unsigned int *type_lengths;
|
||||
} TYPELIB;
|
||||
|
||||
extern int find_type(char *x, const TYPELIB *typelib,
|
||||
unsigned int full_name);
|
||||
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
|
||||
const char *option);
|
||||
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
|
||||
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
|
||||
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
|
||||
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
|
||||
|
|
|
@ -41,7 +41,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename);
|
|||
|
||||
void mysql_read_default_options(struct st_mysql_options *options,
|
||||
const char *filename,const char *group);
|
||||
void mysql_detach_stmt_list(LIST **stmt_list);
|
||||
void mysql_detach_stmt_list(LIST **stmt_list, const char *func_name);
|
||||
MYSQL *
|
||||
cli_mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
||||
const char *passwd, const char *db,
|
||||
|
|
|
@ -83,6 +83,7 @@ const char *client_errors[]=
|
|||
"Attempt to read a row while there is no result set associated with the statement",
|
||||
"This feature is not implemented yet",
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
""
|
||||
};
|
||||
|
||||
|
@ -147,6 +148,7 @@ const char *client_errors[]=
|
|||
"Attempt to read a row while there is no result set associated with the statement",
|
||||
"This feature is not implemented yet",
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
""
|
||||
};
|
||||
|
||||
|
@ -209,6 +211,7 @@ const char *client_errors[]=
|
|||
"Attempt to read a row while there is no result set associated with the statement",
|
||||
"This feature is not implemented yet",
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
""
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -715,7 +715,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
|||
The server will close all statements no matter was the attempt
|
||||
to change user successful or not.
|
||||
*/
|
||||
mysql_detach_stmt_list(&mysql->stmts);
|
||||
mysql_detach_stmt_list(&mysql->stmts, "mysql_change_user");
|
||||
if (rc == 0)
|
||||
{
|
||||
/* Free old connect information */
|
||||
|
@ -2872,7 +2872,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
|
|||
|
||||
if (!mysql)
|
||||
{
|
||||
set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate);
|
||||
/* Error is already set in mysql_detatch_stmt_list */
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
# Requires statement logging
|
||||
-- source include/master-slave.inc
|
||||
|
||||
# We have to sync with master, to ensure slave had time to start properly
|
||||
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
stop slave;
|
||||
connection master;
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
-- source include/master-slave.inc
|
||||
|
||||
# We have to sync with master, to ensure slave had time to start properly
|
||||
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
stop slave;
|
||||
connection master;
|
||||
|
|
|
@ -5,6 +5,11 @@ source ./include/master-slave.inc;
|
|||
|
||||
# remote table creation
|
||||
|
||||
# We have to sync with master, to ensure slave had time to start properly
|
||||
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
#--replicate-ignore-db=federated
|
||||
stop slave;
|
||||
|
|
|
@ -2,10 +2,8 @@ connection master;
|
|||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
--enable_warnings
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
--enable_warnings
|
||||
|
|
|
@ -415,7 +415,39 @@ DROP TABLE t1;
|
|||
|
||||
--source include/innodb_rollback_on_timeout.inc
|
||||
|
||||
#
|
||||
# Bug #27210: INNODB ON DUPLICATE KEY UPDATE
|
||||
#
|
||||
|
||||
set @save_qcache_size=@@global.query_cache_size;
|
||||
set @save_qcache_type=@@global.query_cache_type;
|
||||
set global query_cache_size=10*1024*1024;
|
||||
set global query_cache_type=1;
|
||||
connect (con1,localhost,root,,);
|
||||
connection con1;
|
||||
drop table if exists `test`;
|
||||
CREATE TABLE `test` (`test1` varchar(3) NOT NULL,
|
||||
`test2` varchar(4) NOT NULL,PRIMARY KEY (`test1`))
|
||||
ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '5678');
|
||||
disconnect con1;
|
||||
connect (con2,localhost,root,,);
|
||||
connection con2;
|
||||
select * from test;
|
||||
INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '1234')
|
||||
ON DUPLICATE KEY UPDATE `test2` = '1234';
|
||||
select * from test;
|
||||
flush tables;
|
||||
select * from test;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
drop table test;
|
||||
set global query_cache_type=@save_qcache_type;
|
||||
set global query_cache_size=@save_qcache_size;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
#
|
||||
# Test of behaviour with CREATE ... SELECT
|
||||
#
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-- require r/not_embedded.require
|
||||
disable_query_log;
|
||||
select version() like N'%embedded%' as 'have_embedded';
|
||||
select version() like '%embedded%' as 'have_embedded';
|
||||
enable_query_log;
|
||||
|
||||
|
|
|
@ -354,6 +354,13 @@ sub collect_one_test_case($$$$$$$) {
|
|||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--slave-num=");
|
||||
if ( defined $value )
|
||||
{
|
||||
$tinfo->{'slave_num'}= $value;
|
||||
next;
|
||||
}
|
||||
|
||||
$value= mtr_match_prefix($opt, "--result-file=");
|
||||
if ( defined $value )
|
||||
{
|
||||
|
@ -534,7 +541,7 @@ sub collect_one_test_case($$$$$$$) {
|
|||
! ( $tinfo->{'binlog_format'} eq $::used_binlog_format ) )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Not running with binlog format '$tinfo->{'binlog_format'}'";
|
||||
$tinfo->{'comment'}= "Requiring binlog format '$tinfo->{'binlog_format'}'";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -599,7 +606,7 @@ our @tags=
|
|||
(
|
||||
["include/have_innodb.inc", "innodb_test", 1],
|
||||
["include/have_binlog_format_row.inc", "binlog_format", "row"],
|
||||
["include/have_binlog_format_statement.inc", "binlog_format", "stmt"],
|
||||
["include/have_binlog_format_statement.inc", "binlog_format", "statement"],
|
||||
["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"],
|
||||
["include/big_test.inc", "big_test", 1],
|
||||
["include/have_debug.inc", "need_debug", 1],
|
||||
|
|
|
@ -3275,9 +3275,9 @@ sub do_after_run_mysqltest($)
|
|||
}
|
||||
|
||||
|
||||
sub run_testcase_mark_logs($)
|
||||
sub run_testcase_mark_logs($$)
|
||||
{
|
||||
my ($log_msg)= @_;
|
||||
my ($tinfo, $log_msg)= @_;
|
||||
|
||||
# Write a marker to all log files
|
||||
|
||||
|
@ -3290,6 +3290,12 @@ sub run_testcase_mark_logs($)
|
|||
mtr_tofile($mysqld->{path_myerr}, $log_msg);
|
||||
}
|
||||
|
||||
if ( $tinfo->{'component_id'} eq 'im')
|
||||
{
|
||||
mtr_tofile($instance_manager->{path_err}, $log_msg);
|
||||
mtr_tofile($instance_manager->{path_log}, $log_msg);
|
||||
}
|
||||
|
||||
# ndbcluster log file
|
||||
mtr_tofile($path_ndb_testrun_log, $log_msg);
|
||||
|
||||
|
@ -3416,7 +3422,7 @@ sub run_testcase ($) {
|
|||
}
|
||||
|
||||
# Write to all log files to indicate start of testcase
|
||||
run_testcase_mark_logs("CURRENT_TEST: $tinfo->{name}\n");
|
||||
run_testcase_mark_logs($tinfo, "CURRENT_TEST: $tinfo->{name}\n");
|
||||
|
||||
my $died= mtr_record_dead_children();
|
||||
if ($died or $master_restart or $slave_restart)
|
||||
|
@ -3490,7 +3496,7 @@ sub run_testcase ($) {
|
|||
# Stop Instance Manager if we are processing an IM-test case.
|
||||
# ----------------------------------------------------------------------
|
||||
if ( $tinfo->{'component_id'} eq 'im' and
|
||||
!mtr_im_stop($instance_manager, $tinfo->{'name'}) )
|
||||
!mtr_im_stop($instance_manager, $tinfo->{'name'}))
|
||||
{
|
||||
mtr_error("Failed to stop Instance Manager.")
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
|||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
show binlog events from 102;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=208
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (300)
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar # # INSERT_ID=208
|
||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300)
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
11 == 11
|
||||
|
|
|
@ -91,6 +91,8 @@ create table t1 (date char(30), format char(30) not null);
|
|||
insert into t1 values
|
||||
('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'),
|
||||
('03-01-02 8:11:2.123456', '%y-%m-%d %H:%i:%S.%#'),
|
||||
('0003-01-02 8:11:2.123456', '%Y-%m-%d %H:%i:%S.%#'),
|
||||
('03-01-02 8:11:2.123456', '%Y-%m-%d %H:%i:%S.%#'),
|
||||
('2003-01-02 10:11:12 PM', '%Y-%m-%d %h:%i:%S %p'),
|
||||
('2003-01-02 01:11:12.12345AM', '%Y-%m-%d %h:%i:%S.%f%p'),
|
||||
('2003-01-02 02:11:12.12345AM', '%Y-%m-%d %h:%i:%S.%f %p'),
|
||||
|
@ -122,6 +124,8 @@ select date,format,str_to_date(date, format) as str_to_date from t1;
|
|||
date format str_to_date
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 01:11:12.123450
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
|
||||
|
@ -153,6 +157,8 @@ select date,format,concat('',str_to_date(date, format)) as con from t1;
|
|||
date format con
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 01:11:12.123450
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
|
||||
|
@ -184,6 +190,8 @@ select date,format,cast(str_to_date(date, format) as datetime) as datetime from
|
|||
date format datetime
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02 08:11:02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02 08:11:02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 01:11:12.123450
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
|
||||
|
@ -215,6 +223,8 @@ select date,format,DATE(str_to_date(date, format)) as date2 from t1;
|
|||
date format date2
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 2003-01-02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 0003-01-02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 2003-01-02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 2003-01-02
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02
|
||||
|
@ -246,6 +256,8 @@ select date,format,TIME(str_to_date(date, format)) as time from t1;
|
|||
date format time
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 22:11:12
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 01:11:12.123450
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
|
||||
|
@ -277,6 +289,8 @@ select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
|
|||
date format time2
|
||||
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12
|
||||
03-01-02 8:11:2.123456 %y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
0003-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
03-01-02 8:11:2.123456 %Y-%m-%d %H:%i:%S.%# 08:11:02
|
||||
2003-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 22:11:12
|
||||
2003-01-02 01:11:12.12345AM %Y-%m-%d %h:%i:%S.%f%p 01:11:12.123450
|
||||
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
|
||||
|
@ -402,14 +416,14 @@ select date,format,str_to_date(date, format) as str_to_date from t1;
|
|||
date format str_to_date
|
||||
10:20:10AM %h:%i:%s 0000-00-00 10:20:10
|
||||
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
|
||||
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
|
||||
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '10:20:10AM'
|
||||
select date,format,concat(str_to_date(date, format),'') as con from t1;
|
||||
date format con
|
||||
10:20:10AM %h:%i:%s 0000-00-00 10:20:10
|
||||
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
|
||||
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
|
||||
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '10:20:10AM'
|
||||
drop table t1;
|
||||
|
|
|
@ -75,6 +75,12 @@ NULL
|
|||
select weekofyear("1997-11-30 23:59:59.000001");
|
||||
weekofyear("1997-11-30 23:59:59.000001")
|
||||
48
|
||||
select makedate(03,1);
|
||||
makedate(03,1)
|
||||
2003-01-01
|
||||
select makedate('0003',1);
|
||||
makedate('0003',1)
|
||||
2003-01-01
|
||||
select makedate(1997,1);
|
||||
makedate(1997,1)
|
||||
1997-01-01
|
||||
|
|
|
@ -1225,13 +1225,13 @@ TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s")
|
|||
End of 5.0 tests
|
||||
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
NULL
|
||||
0049-12-31 23:59:59
|
||||
select date_sub("0199-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0199-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
NULL
|
||||
0198-12-31 23:59:59
|
||||
select date_add("0199-12-31 23:59:59",INTERVAL 2 SECOND);
|
||||
date_add("0199-12-31 23:59:59",INTERVAL 2 SECOND)
|
||||
NULL
|
||||
0200-01-01 00:00:01
|
||||
select date_sub("0200-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0200-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
0199-12-31 23:59:59
|
||||
|
@ -1252,8 +1252,8 @@ date_sub("90-01-01 00:00:01",INTERVAL 2 SECOND)
|
|||
1989-12-31 23:59:59
|
||||
select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
NULL
|
||||
0068-12-31 23:59:59
|
||||
select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND);
|
||||
date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND)
|
||||
NULL
|
||||
0168-12-31 23:59:59
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||
drop table if exists t1;
|
||||
drop database if exists mysqltest;
|
||||
SET NAMES binary;
|
||||
|
@ -1059,6 +1060,128 @@ DROP DATABASE bug23556;
|
|||
DROP USER bug23556@localhost;
|
||||
GRANT PROCESS ON * TO user@localhost;
|
||||
ERROR 3D000: No database selected
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
DROP DATABASE IF EXISTS mysqltest2;
|
||||
DROP DATABASE IF EXISTS mysqltest3;
|
||||
DROP DATABASE IF EXISTS mysqltest4;
|
||||
CREATE DATABASE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
CREATE DATABASE mysqltest3;
|
||||
CREATE DATABASE mysqltest4;
|
||||
CREATE PROCEDURE mysqltest1.p_def() SQL SECURITY DEFINER
|
||||
SELECT 1;
|
||||
CREATE PROCEDURE mysqltest2.p_inv() SQL SECURITY INVOKER
|
||||
SELECT 1;
|
||||
CREATE FUNCTION mysqltest3.f_def() RETURNS INT SQL SECURITY DEFINER
|
||||
RETURN 1;
|
||||
CREATE FUNCTION mysqltest4.f_inv() RETURNS INT SQL SECURITY INVOKER
|
||||
RETURN 1;
|
||||
GRANT EXECUTE ON PROCEDURE mysqltest1.p_def TO mysqltest_1@localhost;
|
||||
GRANT EXECUTE ON PROCEDURE mysqltest2.p_inv TO mysqltest_1@localhost;
|
||||
GRANT EXECUTE ON FUNCTION mysqltest3.f_def TO mysqltest_1@localhost;
|
||||
GRANT EXECUTE ON FUNCTION mysqltest4.f_inv TO mysqltest_1@localhost;
|
||||
GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
|
||||
|
||||
---> connection: bug9504_con1
|
||||
use mysqltest1;
|
||||
use mysqltest2;
|
||||
use mysqltest3;
|
||||
use mysqltest4;
|
||||
use test;
|
||||
CALL mysqltest1.p_def();
|
||||
1
|
||||
1
|
||||
CALL mysqltest2.p_inv();
|
||||
1
|
||||
1
|
||||
SELECT mysqltest3.f_def();
|
||||
mysqltest3.f_def()
|
||||
1
|
||||
SELECT mysqltest4.f_inv();
|
||||
mysqltest4.f_inv()
|
||||
1
|
||||
|
||||
---> connection: default
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
DROP DATABASE mysqltest3;
|
||||
DROP DATABASE mysqltest4;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
DROP DATABASE IF EXISTS mysqltest2;
|
||||
CREATE DATABASE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
GRANT ALL PRIVILEGES ON mysqltest1.* TO mysqltest_1@localhost;
|
||||
GRANT SELECT ON mysqltest2.* TO mysqltest_1@localhost;
|
||||
CREATE PROCEDURE mysqltest1.p1() SQL SECURITY INVOKER
|
||||
SELECT 1;
|
||||
|
||||
---> connection: bug27337_con1
|
||||
CREATE TABLE t1(c INT);
|
||||
ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
|
||||
CALL mysqltest1.p1();
|
||||
1
|
||||
1
|
||||
CREATE TABLE t1(c INT);
|
||||
ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
|
||||
|
||||
---> connection: bug27337_con2
|
||||
CREATE TABLE t1(c INT);
|
||||
ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
|
||||
SHOW TABLES;
|
||||
Tables_in_mysqltest2
|
||||
|
||||
---> connection: default
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
DROP DATABASE IF EXISTS mysqltest2;
|
||||
CREATE DATABASE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
CREATE TABLE mysqltest1.t1(c INT);
|
||||
CREATE TABLE mysqltest2.t2(c INT);
|
||||
GRANT SELECT ON mysqltest1.t1 TO mysqltest_1@localhost;
|
||||
GRANT SELECT ON mysqltest2.t2 TO mysqltest_2@localhost;
|
||||
|
||||
---> connection: bug27337_con1
|
||||
SHOW TABLES FROM mysqltest1;
|
||||
Tables_in_mysqltest1
|
||||
t1
|
||||
PREPARE stmt1 FROM 'SHOW TABLES FROM mysqltest1';
|
||||
EXECUTE stmt1;
|
||||
Tables_in_mysqltest1
|
||||
t1
|
||||
|
||||
---> connection: bug27337_con2
|
||||
SHOW COLUMNS FROM mysqltest2.t2;
|
||||
Field Type Null Key Default Extra
|
||||
c int(11) YES NULL
|
||||
PREPARE stmt2 FROM 'SHOW COLUMNS FROM mysqltest2.t2';
|
||||
EXECUTE stmt2;
|
||||
Field Type Null Key Default Extra
|
||||
c int(11) YES NULL
|
||||
|
||||
---> connection: default
|
||||
REVOKE SELECT ON mysqltest1.t1 FROM mysqltest_1@localhost;
|
||||
REVOKE SELECT ON mysqltest2.t2 FROM mysqltest_2@localhost;
|
||||
|
||||
---> connection: bug27337_con1
|
||||
SHOW TABLES FROM mysqltest1;
|
||||
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest1'
|
||||
EXECUTE stmt1;
|
||||
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest1'
|
||||
|
||||
---> connection: bug27337_con2
|
||||
SHOW COLUMNS FROM mysqltest2.t2;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
|
||||
EXECUTE stmt2;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2'
|
||||
|
||||
---> connection: default
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
End of 5.0 tests
|
||||
set names utf8;
|
||||
grant select on test.* to юзер_юзер@localhost;
|
||||
|
|
|
@ -117,16 +117,82 @@ use testdb_1;
|
|||
create table t1 (f1 char(4));
|
||||
create view v1 as select f1 from t1;
|
||||
grant insert on v1 to testdb_2@localhost;
|
||||
create view v5 as select f1 from t1;
|
||||
grant show view on v5 to testdb_2@localhost;
|
||||
create definer=`no_such_user`@`no_such_host` view v6 as select f1 from t1;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use testdb_1;
|
||||
create view v6 as select f1 from t1;
|
||||
grant show view on v6 to testdb_2@localhost;
|
||||
create table t2 (f1 char(4));
|
||||
create definer=`no_such_user`@`no_such_host` view v7 as select * from t2;
|
||||
Warnings:
|
||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
||||
show fields from testdb_1.v6;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(4) YES NULL
|
||||
show create view testdb_1.v6;
|
||||
View Create View
|
||||
v6 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v6` AS select `t1`.`f1` AS `f1` from `t1`
|
||||
show create view testdb_1.v7;
|
||||
View Create View
|
||||
v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2`
|
||||
Warnings:
|
||||
Warning 1356 View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
show fields from testdb_1.v7;
|
||||
Field Type Null Key Default Extra
|
||||
f1 null YES NULL
|
||||
Warnings:
|
||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
||||
create table t3 (f1 char(4), f2 char(4));
|
||||
create view v3 as select f1,f2 from t3;
|
||||
grant insert(f1), insert(f2) on v3 to testdb_2@localhost;
|
||||
create view v2 as select f1 from testdb_1.v1;
|
||||
create view v4 as select f1,f2 from testdb_1.v3;
|
||||
show fields from testdb_1.v5;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(4) YES NULL
|
||||
show create view testdb_1.v5;
|
||||
View Create View
|
||||
v5 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_1`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v5` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1`
|
||||
show fields from testdb_1.v6;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(4) YES NULL
|
||||
show create view testdb_1.v6;
|
||||
View Create View
|
||||
v6 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v6` AS select `testdb_1`.`t1`.`f1` AS `f1` from `testdb_1`.`t1`
|
||||
show fields from testdb_1.v7;
|
||||
Field Type Null Key Default Extra
|
||||
f1 null YES NULL
|
||||
Warnings:
|
||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
||||
show create view testdb_1.v7;
|
||||
View Create View
|
||||
v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2`
|
||||
Warnings:
|
||||
Warning 1356 View 'testdb_1.v7' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
revoke insert(f1) on v3 from testdb_2@localhost;
|
||||
revoke show view on v5 from testdb_2@localhost;
|
||||
use testdb_1;
|
||||
revoke show view on v6 from testdb_2@localhost;
|
||||
show fields from testdb_1.v5;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
|
||||
show create view testdb_1.v5;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5'
|
||||
show fields from testdb_1.v6;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
|
||||
show create view testdb_1.v6;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6'
|
||||
show fields from testdb_1.v7;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
|
||||
show create view testdb_1.v7;
|
||||
ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7'
|
||||
show create view v4;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
show fields from v4;
|
||||
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
|
||||
Field Type Null Key Default Extra
|
||||
f1 null YES NULL
|
||||
f2 char(4) YES NULL
|
||||
show fields from v2;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(4) YES NULL
|
||||
|
@ -151,7 +217,8 @@ where a.table_name = 'testdb_1.v1';
|
|||
view_definition
|
||||
select * from v2;
|
||||
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
drop view testdb_1.v1,v2, testdb_1.v3, v4;
|
||||
use test;
|
||||
drop view testdb_1.v1, v2, testdb_1.v3, v4;
|
||||
drop database testdb_1;
|
||||
drop user testdb_1@localhost;
|
||||
drop user testdb_2@localhost;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue