Commit a49c12f5 authored by unknown's avatar unknown

manually merged


BitKeeper/etc/logging_ok:
  auto-union
mysql-test/r/binary.result:
  Auto merged
mysql-test/r/truncate.result:
  Auto merged
mysql-test/t/binary.test:
  Auto merged
mysql-test/t/truncate.test:
  Auto merged
mysys/my_lib.c:
  Auto merged
strings/my_vsnprintf.c:
  Auto merged
support-files/Makefile.am:
  Auto merged
parents 62a63815 9d1a9d72
......@@ -204,7 +204,7 @@ sub trim_the_fat
open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n";
print CONFIGURE $configure;
close(CONFIGURE);
`autoconf`;
`aclocal && autoheader && aclocal && automake && autoconf`;
die "'./configure' was not produced!" unless (-f "configure");
chdir("$cwd");
}
......
......@@ -367,10 +367,12 @@ while test $# -gt 0; do
VALGRIND=`which valgrind` # this will print an error if not found
# Give good warning to the user and stop
if [ -z "$VALGRIND" ] ; then
$ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://developer.kde.org/~sewardj ."
$ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ."
exit 1
fi
VALGRIND="$VALGRIND --tool=memcheck --alignment=8 --leak-check=yes --num-callers=16"
# >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16"
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
SLEEP_TIME_AFTER_RESTART=10
......
......@@ -56,3 +56,12 @@ id elt(two.val,'one','two')
2 one
4 two
drop table t1,t2;
select find_in_set(binary 'a',binary 'A,B,C');
find_in_set(binary 'a',binary 'A,B,C')
0
select find_in_set('a',binary 'A,B,C');
find_in_set('a',binary 'A,B,C')
0
select find_in_set(binary 'a', 'A,B,C');
find_in_set(binary 'a', 'A,B,C')
0
......@@ -31,4 +31,25 @@ SELECT * from t1;
a
1
2
delete from t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
a
3
4
drop table t1;
create temporary table t1 (a integer auto_increment primary key);
insert into t1 (a) values (NULL),(NULL);
truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
a
1
2
delete from t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
a
3
4
drop table t1;
......@@ -436,3 +436,19 @@ SELECT @@global.session.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
SELECT @@global.local.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
set @tstlw = @@log_warnings;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 1
set global log_warnings = 0;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 0
set global log_warnings = 42;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 42
set global log_warnings = @tstlw;
show global variables like 'log_warnings';
Variable_name Value
log_warnings 1
......@@ -31,11 +31,19 @@ drop table if exists t1,t2;
--enable_warnings
create table t1 (id int(10) not null unique);
create table t2 (id int(10) not null primary key,
val int(10) not null);
create table t2 (id int(10) not null primary key, val int(10) not null);
insert into t1 values (1),(2),(4);
insert into t2 values (1,1),(2,1),(3,1),(4,2);
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
drop table t1,t2;
#
# Bug4340: find_in_set is case insensitive even on binary operators
#
select find_in_set(binary 'a',binary 'A,B,C');
select find_in_set('a',binary 'A,B,C');
select find_in_set(binary 'a', 'A,B,C');
......@@ -26,7 +26,7 @@ drop table t1;
truncate non_existing_table;
#
# test autoincrement with TRUNCATE
# test autoincrement with TRUNCATE; verifying difference with DELETE
#
create table t1 (a integer auto_increment primary key);
......@@ -34,5 +34,19 @@ insert into t1 (a) values (NULL),(NULL);
truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
delete from t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
drop table t1;
# Verifying that temp tables are handled the same way
create temporary table t1 (a integer auto_increment primary key);
insert into t1 (a) values (NULL),(NULL);
truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
delete from t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
drop table t1;
......@@ -324,3 +324,14 @@ SELECT @@global.global.key_buffer_size;
SELECT @@global.session.key_buffer_size;
--error 1064
SELECT @@global.local.key_buffer_size;
# BUG#5135: cannot turn on log_warnings with SET in 4.1 (and 4.0)
set @tstlw = @@log_warnings;
show global variables like 'log_warnings';
set global log_warnings = 0;
show global variables like 'log_warnings';
set global log_warnings = 42;
show global variables like 'log_warnings';
set global log_warnings = @tstlw;
show global variables like 'log_warnings';
......@@ -4241,7 +4241,7 @@ Disable with --skip-isam.",
OPT_ARG, 0, 0, 0, 0, 0, 0},
{"log-warnings", 'W', "Log some non-critical warnings to the error log file. Use this option twice or --log-warnings=2 if you also want 'Aborted connections' warnings.",
(gptr*) &global_system_variables.log_warnings,
(gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
(gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, ~0L,
0, 0, 0},
{"low-priority-updates", OPT_LOW_PRIORITY_UPDATES,
"INSERT/DELETE/UPDATE has lower priority than selects.",
......@@ -4551,7 +4551,7 @@ replicating a LOAD DATA INFILE command.",
NO_ARG, 0, 0, 0, 0, 0, 0},
{"warnings", 'W', "Deprecated; use --log-warnings instead.",
(gptr*) &global_system_variables.log_warnings,
(gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
(gptr*) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, ~0L,
0, 0, 0},
{ "back_log", OPT_BACK_LOG,
"The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
......
......@@ -607,17 +607,13 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
int error;
DBUG_ENTER("mysql_truncate");
bzero((char*) &create_info,sizeof(create_info));
/* If it is a temporary table, close and regenerate it */
if (!dont_send_ok && (table_ptr=find_temporary_table(thd,table_list->db,
table_list->real_name)))
{
TABLE *table= *table_ptr;
HA_CREATE_INFO create_info;
table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
bzero((char*) &create_info,sizeof(create_info));
create_info.auto_increment_value= table->file->auto_increment_value;
create_info.default_table_charset= table->table_charset;
db_type table_type=table->db_type;
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
......@@ -659,8 +655,6 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
DBUG_RETURN(-1);
}
bzero((char*) &create_info,sizeof(create_info));
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1) ? -1 : 0;
query_cache_invalidate3(thd, table_list, 0);
......
......@@ -33,17 +33,6 @@
length of result string
*/
int my_snprintf(char* to, size_t n, const char* fmt, ...)
{
int result;
va_list args;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
}
int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
{
char *start=to, *end=to+n-1;
......@@ -141,6 +130,15 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
return (uint) (to - start);
}
int my_snprintf(char* to, size_t n, const char* fmt, ...)
{
int result;
va_list args;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
}
#ifdef MAIN
#define OVERRUN_SENTRY 250
......
......@@ -22,6 +22,7 @@ EXTRA_DIST = mysql.spec.sh \
my-medium.cnf.sh \
my-large.cnf.sh \
my-huge.cnf.sh \
my-innodb-heavy-4G \
mysql-log-rotate.sh \
mysql.server.sh \
binary-configure.sh \
......@@ -34,6 +35,7 @@ pkgdata_DATA = my-small.cnf \
my-medium.cnf \
my-large.cnf \
my-huge.cnf \
my-innodb-heavy-4G.cnf \
mysql-log-rotate \
mysql-@VERSION@.spec \
MySQL-shared-compat.spec
......@@ -44,6 +46,7 @@ CLEANFILES = my-small.cnf \
my-medium.cnf \
my-large.cnf \
my-huge.cnf \
my-innodb-heavy-4G.cnf \
mysql.spec \
mysql-@VERSION@.spec \
mysql-log-rotate \
......
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