Commit d0a9676b authored by unknown's avatar unknown

Merge mysql.com:/home/jonas/src/mysql-4.1

into mysql.com:/home/jonas/src/mysql-4.1-ndb


mysql-test/ndb/ndbcluster.sh:
  Auto merged
parents 913424a8 1d57e419
...@@ -40,6 +40,7 @@ georg@beethoven.local ...@@ -40,6 +40,7 @@ georg@beethoven.local
gerberb@ou800.zenez.com gerberb@ou800.zenez.com
gluh@gluh.(none) gluh@gluh.(none)
gluh@gluh.mysql.r18.ru gluh@gluh.mysql.r18.ru
gordon@zero.local.lan
greg@gcw.ath.cx greg@gcw.ath.cx
greg@mysql.com greg@mysql.com
guilhem@mysql.com guilhem@mysql.com
...@@ -122,6 +123,7 @@ mwagner@work.mysql.com ...@@ -122,6 +123,7 @@ mwagner@work.mysql.com
mydev@mysql.com mydev@mysql.com
mysql@home.(none) mysql@home.(none)
mysqldev@build.mysql2.com mysqldev@build.mysql2.com
mysqldev@melody.local
mysqldev@mysql.com mysqldev@mysql.com
ndbdev@ndbmaster.mysql.com ndbdev@ndbmaster.mysql.com
nick@mysql.com nick@mysql.com
......
...@@ -162,7 +162,23 @@ sub trim_the_fat ...@@ -162,7 +162,23 @@ sub trim_the_fat
undef $/; undef $/;
my $configure= <CONFIGURE>; my $configure= <CONFIGURE>;
close(CONFIGURE); close(CONFIGURE);
$configure=~ s|${the_fat}/Makefile dnl\n?||g;
#
# If $the_fat Makefile line closes the parenthesis, then
# replace that line with just the closing parenthesis.
#
if ($configure=~ m|${the_fat}/Makefile\)\n?|)
{
$configure=~ s|${the_fat}/Makefile(\)\n?)|$1|;
}
#
# Else just delete the line
#
else
{
$configure=~ s|${the_fat}/Makefile dnl\n?||;
}
open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n"; open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n";
print CONFIGURE $configure; print CONFIGURE $configure;
close(CONFIGURE); close(CONFIGURE);
......
...@@ -435,6 +435,10 @@ SOURCE=..\mysys\my_tempnam.c ...@@ -435,6 +435,10 @@ SOURCE=..\mysys\my_tempnam.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\libmysql\my_time.c
# End Source File
# Begin Source File
SOURCE=..\mysys\my_thr_init.c SOURCE=..\mysys\my_thr_init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. ...@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc) AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line! # The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 4.1.3-beta) AM_INIT_AUTOMAKE(mysql, 4.1.4-beta)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
...@@ -521,7 +521,7 @@ fi ...@@ -521,7 +521,7 @@ fi
AC_SUBST(CHECK_PID) AC_SUBST(CHECK_PID)
AC_MSG_RESULT("$CHECK_PID") AC_MSG_RESULT("$CHECK_PID")
# We need a ANSI C compiler # We need an ANSI C compiler
AM_PROG_CC_STDC AM_PROG_CC_STDC
# We need an assembler, too # We need an assembler, too
...@@ -529,7 +529,7 @@ AM_PROG_AS ...@@ -529,7 +529,7 @@ AM_PROG_AS
if test "$am_cv_prog_cc_stdc" = "no" if test "$am_cv_prog_cc_stdc" = "no"
then then
AC_MSG_ERROR([MySQL requires a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.]) AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
fi fi
NOINST_LDFLAGS= NOINST_LDFLAGS=
...@@ -796,7 +796,7 @@ AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init)) ...@@ -796,7 +796,7 @@ AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init))
# For compress in zlib # For compress in zlib
case $SYSTEM_TYPE in case $SYSTEM_TYPE in
*netware*) *netware* | *modesto*)
AC_DEFINE(HAVE_COMPRESS) AC_DEFINE(HAVE_COMPRESS)
;; ;;
*) *)
...@@ -2525,7 +2525,7 @@ done ...@@ -2525,7 +2525,7 @@ done
case $default_charset in case $default_charset in
armscii8) armscii8)
default_charset_default_collation="armscii8_general_ci" default_charset_default_collation="armscii8_general_ci"
default_charset_collations="armscii8_general_ci armscii_bin" default_charset_collations="armscii8_general_ci armscii8_bin"
;; ;;
ascii) ascii)
default_charset_default_collation="ascii_general_ci" default_charset_default_collation="ascii_general_ci"
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Error messages for mysql clients */ /* Error messages for MySQL clients */
/* error messages for the demon is in share/language/errmsg.sys */ /* (Error messages for the daemon are in share/language/errmsg.sys) */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -83,10 +83,10 @@ extern const char *client_errors[]; /* Error messages */ ...@@ -83,10 +83,10 @@ extern const char *client_errors[]; /* Error messages */
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042 #define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
#define CR_SHARED_MEMORY_MAP_ERROR 2043 #define CR_SHARED_MEMORY_MAP_ERROR 2043
#define CR_SHARED_MEMORY_EVENT_ERROR 2044 #define CR_SHARED_MEMORY_EVENT_ERROR 2044
#define CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR 2045 #define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046 #define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
#define CR_CONN_UNKNOW_PROTOCOL 2047 #define CR_CONN_UNKNOW_PROTOCOL 2047
#define CR_INVALID_CONN_HANDLE 2048 #define CR_INVALID_CONN_HANDLE 2048
#define CR_SECURE_AUTH 2049 #define CR_SECURE_AUTH 2049
#define CR_FETCH_CANCELLED 2050 #define CR_FETCH_CANCELED 2050
#define CR_NO_DATA 2051 #define CR_NO_DATA 2051
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
#ifndef _dbug_h #ifndef _dbug_h
#define _dbug_h #define _dbug_h
#ifdef DBUG_OFF
#define NDEBUG /* for assert.h */
#endif
#include <assert.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
......
...@@ -313,6 +313,13 @@ C_MODE_END ...@@ -313,6 +313,13 @@ C_MODE_END
#include <crypt.h> #include <crypt.h>
#endif #endif
/*
A lot of our programs uses asserts, so better to always include it
This also fixes a problem when people uses DBUG_ASSERT without including
assert.h
*/
#include <assert.h>
/* Go around some bugs in different OS and compilers */ /* Go around some bugs in different OS and compilers */
#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H) #if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
#include <sys/stream.h> /* HPUX 10.20 defines ulong here. UGLY !!! */ #include <sys/stream.h> /* HPUX 10.20 defines ulong here. UGLY !!! */
...@@ -1020,22 +1027,22 @@ do { doubleget_union _tmp; \ ...@@ -1020,22 +1027,22 @@ do { doubleget_union _tmp; \
32)) 32))
#define int2store(T,A) do { uint def_temp= (uint) (A) ;\ #define int2store(T,A) do { uint def_temp= (uint) (A) ;\
*((uchar*) (T))= (uchar)(def_temp); \ *((uchar*) (T))= (uchar)(def_temp); \
*((uchar*) (T+1))=(uchar)((def_temp >> 8)); \ *((uchar*) (T)+1)=(uchar)((def_temp >> 8)); \
} while(0) } while(0)
#define int3store(T,A) do { /*lint -save -e734 */\ #define int3store(T,A) do { /*lint -save -e734 */\
*((uchar*)(T))=(uchar) ((A));\ *((uchar*)(T))=(uchar) ((A));\
*((uchar*) (T)+1)=(uchar) (((A) >> 8));\ *((uchar*) (T)+1)=(uchar) (((A) >> 8));\
*((uchar*)(T)+2)=(uchar) (((A) >> 16)); \ *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \
/*lint -restore */} while(0) /*lint -restore */} while(0)
#define int4store(T,A) do { *(T)=(char) ((A));\ #define int4store(T,A) do { *((char *)(T))=(char) ((A));\
*((T)+1)=(char) (((A) >> 8));\ *(((char *)(T))+1)=(char) (((A) >> 8));\
*((T)+2)=(char) (((A) >> 16));\ *(((char *)(T))+2)=(char) (((A) >> 16));\
*((T)+3)=(char) (((A) >> 24)); } while(0) *(((char *)(T))+3)=(char) (((A) >> 24)); } while(0)
#define int5store(T,A) do { *(T)=((A));\ #define int5store(T,A) do { *((char *)(T))=((A));\
*((T)+1)=(((A) >> 8));\ *(((char *)(T))+1)=(((A) >> 8));\
*((T)+2)=(((A) >> 16));\ *(((char *)(T))+2)=(((A) >> 16));\
*((T)+3)=(((A) >> 24)); \ *(((char *)(T))+3)=(((A) >> 24)); \
*((T)+4)=(((A) >> 32)); } while(0) *(((char *)(T))+4)=(((A) >> 32)); } while(0)
#define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \ #define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
int4store((T),def_temp); \ int4store((T),def_temp); \
int4store((T+4),def_temp2); } while(0) int4store((T+4),def_temp2); } while(0)
......
This diff is collapsed.
...@@ -2522,7 +2522,7 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row) ...@@ -2522,7 +2522,7 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
if (mysql->status != MYSQL_STATUS_GET_RESULT) if (mysql->status != MYSQL_STATUS_GET_RESULT)
{ {
set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ? set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
CR_FETCH_CANCELLED : CR_COMMANDS_OUT_OF_SYNC, CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
unknown_sqlstate); unknown_sqlstate);
goto error; goto error;
} }
......
############### include/ps_create.inc ##################
# #
# drop + create the tables used in most PS test cases #
# t/ps_*.test #
# #
########################################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TABLES HERE !!!
#
# Please be aware, that this file will be sourced by several
# test case files stored within the subdirectory 't'.
# So every change here will affect several test cases.
#----------- Please insert your table definitions here ----------#
#---- Please do not alter the following table definitions -------#
--disable_warnings
drop table if exists t1, t_many_col_types ;
--enable_warnings
eval create table t1
(
a int, b varchar(30),
primary key(a)
) engine = $type ;
eval create table t_many_col_types
(
c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp(14), c16 time,
c17 year, c18 bit, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday'),
primary key(c1)
) engine = $type ;
###################### ps_modify.inc #########################
# #
# Tests for prepared statements: INSERT/DELETE/UPDATE... #
# #
##############################################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
#
# Please be aware, that this file will be sourced by several test case files
# stored within the subdirectory 't'. So every change here will affect
# several test cases.
#
# Please do not modify the structure (DROP/ALTER..) of the tables
# 't1' and 't_many_col_types'.
#
# But you are encouraged to use these two tables within your statements
# whenever possible.
# t1 - very simple table
# t_many_col_types - table with nearly all available column types
#
# The structure and the content of these tables can be found in
# include/ps_create.inc CREATE TABLE ...
# include/ps_renew.inc DELETE all rows and INSERT some rows
#
# Both tables are managed by the same storage engine.
# The type of the storage engine is stored in the variable '$type' .
#------------------- Please insert your test cases here -------------------#
#-------- Please be very carefull when editing behind this line ----------#
--disable_query_log
select '------ delete tests ------' as test_sequence ;
--enable_query_log
--source include/ps_renew.inc
## delete without parameter
prepare stmt1 from 'delete from t1 where a=2' ;
execute stmt1;
select a,b from t1 where a=2;
# delete with row not found
execute stmt1;
## delete with one parameter in the where clause
insert into t1 values(0,NULL);
set @arg00=NULL;
prepare stmt1 from 'delete from t1 where b=?' ;
execute stmt1 using @arg00;
select a,b from t1 where b is NULL ;
set @arg00='one';
execute stmt1 using @arg00;
select a,b from t1 where b=@arg00;
## truncate a table
--error 1295
prepare stmt1 from 'truncate table t1' ;
--disable_query_log
select '------ update tests ------' as test_sequence ;
--enable_query_log
--source include/ps_renew.inc
## update without parameter
prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ;
execute stmt1;
select a,b from t1 where a=2;
# dummy update
execute stmt1;
select a,b from t1 where a=2;
## update with one parameter in the set clause
set @arg00=NULL;
prepare stmt1 from 'update t1 set b=? where a=2' ;
execute stmt1 using @arg00;
select a,b from t1 where a=2;
set @arg00='two';
execute stmt1 using @arg00;
select a,b from t1 where a=2;
## update with one parameter in the where cause
set @arg00=2;
prepare stmt1 from 'update t1 set b=NULL where a=?' ;
execute stmt1 using @arg00;
select a,b from t1 where a=@arg00;
update t1 set b='two' where a=@arg00;
# row not found in update
set @arg00=2000;
execute stmt1 using @arg00;
select a,b from t1 where a=@arg00;
## update on primary key column (two parameters)
set @arg00=2;
set @arg01=22;
prepare stmt1 from 'update t1 set a=? where a=?' ;
# dummy update
execute stmt1 using @arg00, @arg00;
select a,b from t1 where a=@arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1 where a=@arg01;
execute stmt1 using @arg00, @arg01;
select a,b from t1 where a=@arg00;
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
select a,b from t1;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
## update with subquery and several parameters
set @arg00=23;
set @arg01='two';
set @arg02=2;
set @arg03='two';
set @arg04=2;
--disable_warnings
drop table if exists t2;
--enable_warnings
create table t2 as select a,b from t1 ;
prepare stmt1 from 'update t1 set a=? where b=?
and a in (select ? from t2
where b = ? or a = ?)';
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
select a,b from t1 where a = @arg00 ;
prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
drop table t2 ;
## update with parameters in limit
set @arg00=1;
prepare stmt1 from 'update t1 set b=''bla''
where a=2
limit 1';
execute stmt1 ;
select a,b from t1 where b = 'bla' ;
# currently (May 2004, Version 4.1) it is impossible
-- error 1064
prepare stmt1 from 'update t1 set b=''bla''
where a=2
limit ?';
--disable_query_log
select '------ insert tests ------' as test_sequence ;
--enable_query_log
--source include/ps_renew.inc
## insert without parameter
prepare stmt1 from 'insert into t1 values(5, ''five'' )';
execute stmt1;
select a,b from t1 where a = 5;
## insert with one parameter in values part
set @arg00='six' ;
prepare stmt1 from 'insert into t1 values(6, ? )';
execute stmt1 using @arg00;
select a,b from t1 where b = @arg00;
# the second insert fails, because the first column is primary key
--error 1062
execute stmt1 using @arg00;
set @arg00=NULL ;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
select a,b from t1 where b is NULL;
## insert with two parameter in values part
set @arg00=8 ;
set @arg01='eight' ;
prepare stmt1 from 'insert into t1 values(?, ? )';
execute stmt1 using @arg00, @arg01 ;
select a,b from t1 where b = @arg01;
## insert with two rows in values part
set @arg00=81 ;
set @arg01='8-1' ;
set @arg02=82 ;
set @arg03='8-2' ;
prepare stmt1 from 'insert into t1 values(?,?),(?,?)';
execute stmt1 using @arg00, @arg01, @arg02, @arg03 ;
select a,b from t1 where a in (@arg00,@arg02) ;
## insert with two parameter in the set part
set @arg00=9 ;
set @arg01='nine' ;
prepare stmt1 from 'insert into t1 set a=?, b=? ';
execute stmt1 using @arg00, @arg01 ;
select a,b from t1 where a = @arg00 ;
## insert with parameters in the ON DUPLICATE KEY part
set @arg00=6 ;
set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
select * from t1;
set @arg00=81 ;
set @arg01=1 ;
--error 1062
execute stmt1 using @arg00, @arg01;
## many parameters
set @1000=1000 ;
set @x1000_2="x1000_2" ;
set @x1000_3="x1000_3" ;
set @x1000="x1000" ;
set @1100=1100 ;
set @x1100="x1100" ;
set @100=100 ;
set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
## replace
--error 1295
prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' ';
###################### ps_modify1.inc ########################
# #
# Tests for prepared statements: big INSERT .. SELECTs #
# #
##############################################################
#
# NOTE: THESE TESTS CANNOT BE APPLIED TO TABLES OF TYPE MERGE.
# Test which can be applied to MERGE tables should be stored in
# include/ps_modify.inc .
#
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
#
# Please be aware, that this file will be sourced by several test case files
# stored within the subdirectory 't'. So every change here will affect
# several test cases.
#
# Please do not modify the structure (DROP/ALTER..) of the tables
# 't1' and 't_many_col_types'.
#
# But you are encouraged to use these two tables within your statements
# (DELETE/UPDATE/...) whenever possible.
# t1 - very simple table
# t_many_col_types - table with nearly all available column types
#
# The structure and the content of these tables can be found in
# include/ps_create.inc CREATE TABLE ...
# include/ps_renew.inc DELETE all rows and INSERT some rows
#
# Both tables are managed by the same storage engine.
# The type of the storage engine is stored in the variable '$type' .
#------------------- Please insert your test cases here -------------------#
#-------- Please be very carefull when editing behind this line ----------#
## big insert select statements
set @duplicate='duplicate ' ;
set @1000=1000 ;
set @5=5 ;
select a,b from t1 where a < 5 ;
--enable_info
insert into t1 select a + @1000, concat(@duplicate,b) from t1
where a < @5 ;
--disable_info
select a,b from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
where a < ? ' ;
--enable_info
execute stmt1 using @1000, @duplicate, @5;
--disable_info
select a,b from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
set @float=1.00;
set @five='five' ;
--disable_warnings
drop table if exists t2;
--enable_warnings
create table t2 like t1 ;
--enable_info
insert into t2 (b,a)
select @duplicate, sum(first.a) from t1 first, t1 second
where first.a <> @5 and second.b = first.b
and second.b <> @five
group by second.b
having sum(second.a) > @2
union
select b, a + @100 from t1
where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
from t1);
--disable_info
select a,b from t2;
delete from t2 ;
prepare stmt1 from ' insert into t2 (b,a)
select ?, sum(first.a)
from t1 first, t1 second
where first.a <> ? and second.b = first.b and second.b <> ?
group by second.b
having sum(second.a) > ?
union
select b, a + ? from t1
where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b
from t1 ) ' ;
--enable_info
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
--disable_info
select a,b from t2;
drop table t2;
This diff is collapsed.
################ include/ps_renew.inc #################
# #
# renew the content of t1 and t_many_col_types #
# #
#######################################################
# truncate could not be used, because it is not supported
# in tables of type MERGE
delete from t1 ;
insert into t1 values (1,'one');
insert into t1 values (2,'two');
insert into t1 values (3,'three');
insert into t1 values (4,'four');
commit ;
delete from t_many_col_types ;
insert into t_many_col_types
set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
c10= 1, c11= 1, c12 = 1,
c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
c16= '11:11:11', c17= '2004',
c18= 1, c19=true, c20= 'a', c21= '123456789a',
c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
insert into t_many_col_types
set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
c10= 9, c11= 9, c12 = 9,
c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
c16= '11:11:11', c17= '2004',
c18= 1, c19=false, c20= 'a', c21= '123456789a',
c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
...@@ -95,7 +95,7 @@ if [ ! -x $exec_ndb ]; then ...@@ -95,7 +95,7 @@ if [ ! -x $exec_ndb ]; then
echo "$exec_ndb missing" echo "$exec_ndb missing"
exit 1 exit 1
fi fi
if [ ! -x $exec_mgmtsrv ]; then if [ ! -x $exec_mgmtsrvr ]; then
echo "$exec_mgmtsrvr missing" echo "$exec_mgmtsrvr missing"
exit 1 exit 1
fi fi
......
...@@ -1244,3 +1244,10 @@ a b ...@@ -1244,3 +1244,10 @@ a b
3 three 3 three
4 four 4 four
drop table t1, t2; drop table t1, t2;
create table t1 (a int, b varchar(30), primary key(a)) engine = bdb;
insert into t1 values (1,'one');
commit;
truncate t1;
select * from t1;
a b
drop table t1;
...@@ -6,5 +6,5 @@ drop table t1; ...@@ -6,5 +6,5 @@ drop table t1;
flush tables; flush tables;
CREATE TABLE t1 (a int) ENGINE=INNODB; CREATE TABLE t1 (a int) ENGINE=INNODB;
SELECT * from T1; SELECT * from T1;
ERROR HY000: Can't open file: 'T1.InnoDB'. (errno: 1) ERROR HY000: Can't open file: 'T1.InnoDB' (errno: 1)
drop table t1; drop table t1;
...@@ -175,10 +175,10 @@ insert into t1 values (19,4, 0); ...@@ -175,10 +175,10 @@ insert into t1 values (19,4, 0);
select * from t1 where b<=5 and c=0; select * from t1 where b<=5 and c=0;
a b c a b c
19 4 0 19 4 0
select * from t1 where b=4 and c<=5; select * from t1 where b=4 and c<=5 order by a;
a b c a b c
19 4 0
17 4 4 17 4 4
19 4 0
select * from t1 where b<=4 and c<=5 order by a; select * from t1 where b<=4 and c<=5 order by a;
a b c a b c
7 2 1 7 2 1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -9,7 +9,7 @@ drop database if exists test1; ...@@ -9,7 +9,7 @@ drop database if exists test1;
Warnings: Warnings:
Note 1008 Can't drop database 'test1'; database doesn't exist Note 1008 Can't drop database 'test1'; database doesn't exist
show tables from test1; show tables from test1;
ERROR HY000: Can't read dir of './test1/' (Errcode: 2) ERROR HY000: Can't read dir of './test1/' (Errcode: X)
create table t1 (a int); create table t1 (a int);
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
......
...@@ -400,3 +400,10 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; ...@@ -400,3 +400,10 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
delete from mysql.db delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges; flush privileges;
set names latin1;
create database ``;
create table ``.`` (a int) engine=heap;
show table status from `` LIKE '';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
HEAP 9 Fixed 0 5 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
drop database ``;
...@@ -886,3 +886,14 @@ insert into t2 (a, b) ...@@ -886,3 +886,14 @@ insert into t2 (a, b)
select a, b from t1 where (a, b) in (select a, b from t1); select a, b from t1 where (a, b) in (select a, b from t1);
select * from t2; select * from t2;
drop table t1, t2; drop table t1, t2;
#
# Bug #4304: TRUNCATE <table of type BDB> , wrong result
#
create table t1 (a int, b varchar(30), primary key(a)) engine = bdb;
insert into t1 values (1,'one');
commit;
truncate t1;
select * from t1;
drop table t1;
...@@ -106,7 +106,7 @@ select * from t1 where b<=5 order by a; ...@@ -106,7 +106,7 @@ select * from t1 where b<=5 order by a;
select * from t1 where b<=5 and c=0; select * from t1 where b<=5 and c=0;
insert into t1 values (19,4, 0); insert into t1 values (19,4, 0);
select * from t1 where b<=5 and c=0; select * from t1 where b<=5 and c=0;
select * from t1 where b=4 and c<=5; select * from t1 where b=4 and c<=5 order by a;
select * from t1 where b<=4 and c<=5 order by a; select * from t1 where b<=4 and c<=5 order by a;
select * from t1 where b<=5 and c=0 or b<=5 and c=2; select * from t1 where b<=5 and c=0 or b<=5 and c=2;
drop table t1; drop table t1;
This diff is collapsed.
###############################################
# #
# Prepared Statements test on MYISAM tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
let $type= 'MYISAM' ;
-- source include/ps_create.inc
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
-- source include/ps_modify1.inc
drop table t1, t_many_col_types;
###############################################
# #
# Prepared Statements test on InnoDB tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
let $type= 'InnoDB' ;
-- source include/ps_create.inc
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
-- source include/ps_modify1.inc
drop table t1, t_many_col_types;
###############################################
# #
# Prepared Statements test on HEAP tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
let $type= 'HEAP' ;
--disable_warnings
drop table if exists t1, t_many_col_types ;
--enable_warnings
eval create table t1
(
a int, b varchar(30),
primary key(a)
) engine = $type ;
--disable_warnings
drop table if exists t_many_col_types;
--enable_warnings
# The used table type doesn't support BLOB/TEXT columns.
# (The server would send error 1163 .)
# So we use char(100) instead.
eval create table t_many_col_types
(
c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp(14), c16 time,
c17 year, c18 bit, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 char(100), c24 char(100),
c25 char(100), c26 char(100), c27 char(100), c28 char(100),
c29 char(100), c30 char(100), c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday'),
primary key(c1)
) engine = $type ;
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
-- source include/ps_modify1.inc
drop table t1, t_many_col_types;
###############################################
# #
# Prepared Statements test on MERGE tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
--disable_warnings
drop table if exists t1, t1_1, t1_2,
t_many_col_types, t_many_col_types_1, t_many_col_types_2;
--enable_warnings
let $type= 'MYISAM' ;
-- source include/ps_create.inc
rename table t1 to t1_1, t_many_col_types to t_many_col_types_1 ;
-- source include/ps_create.inc
rename table t1 to t1_2, t_many_col_types to t_many_col_types_2 ;
create table t1
(
a int, b varchar(30),
primary key(a)
) ENGINE = MERGE UNION=(t1_1,t1_2)
INSERT_METHOD=FIRST;
create table t_many_col_types
(
c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp(14), c16 time,
c17 year, c18 bit, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday'),
primary key(c1)
) ENGINE = MERGE UNION=(t_many_col_types_1,t_many_col_types_2)
INSERT_METHOD=FIRST;
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
# no test of ps_modify1, because insert .. select
# is not allowed on MERGE tables
# -- source include/ps_modify1.inc
# Lets's try the same tests with INSERT_METHOD=LAST
drop table t1, t_many_col_types ;
create table t1
(
a int, b varchar(30),
primary key(a)
) ENGINE = MERGE UNION=(t1_1,t1_2)
INSERT_METHOD=LAST;
create table t_many_col_types
(
c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp(14), c16 time,
c17 year, c18 bit, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday'),
primary key(c1)
) ENGINE = MERGE UNION=(t_many_col_types_1,t_many_col_types_2)
INSERT_METHOD=LAST;
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
# no test of ps_modify1, because insert .. select
# is not allowed on MERGE tables
# -- source include/ps_modify1.inc
drop table t1, t1_1, t1_2,
t_many_col_types_1, t_many_col_types_2, t_many_col_types;
###############################################
# #
# Prepared Statements test on BDB tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
-- source include/have_bdb.inc
let $type= 'BDB' ;
-- source include/ps_create.inc
-- source include/ps_renew.inc
-- source include/ps_query.inc
-- source include/ps_modify.inc
-- source include/ps_modify1.inc
drop table t1, t_many_col_types;
...@@ -6,7 +6,8 @@ connection master; ...@@ -6,7 +6,8 @@ connection master;
drop database if exists test1; drop database if exists test1;
sync_slave_with_master; sync_slave_with_master;
# can't read dir # can't read dir
error 12; --replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X"
--error 12
show tables from test1; show tables from test1;
connection slave; connection slave;
...@@ -15,7 +16,7 @@ connection master; ...@@ -15,7 +16,7 @@ connection master;
drop table if exists t1; drop table if exists t1;
sync_slave_with_master; sync_slave_with_master;
# table does not exist # table does not exist
error 1146; --error 1146
select * from t1; select * from t1;
connection master; connection master;
......
...@@ -304,3 +304,11 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; ...@@ -304,3 +304,11 @@ where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
delete from mysql.db delete from mysql.db
where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3';
flush privileges; flush privileges;
#Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection
set names latin1;
create database ``;
create table ``.`` (a int) engine=heap;
--replace_column 7 # 8 # 9 #
show table status from `` LIKE '';
drop database ``;
This diff is collapsed.
This diff is collapsed.
...@@ -63,7 +63,7 @@ Ndbfs::Ndbfs(const Configuration & conf) : ...@@ -63,7 +63,7 @@ Ndbfs::Ndbfs(const Configuration & conf) :
const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator(); const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
ndbrequire(p != 0); ndbrequire(p != 0);
m_maxOpenedFiles = 40; m_maxFiles = 40;
//ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles); //ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles);
// Create idle AsyncFiles // Create idle AsyncFiles
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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