Commit 7f338097 authored by unknown's avatar unknown

Manual merge


BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ndb_restore.test:
  Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
parents a001bb2b c758512a
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
c_warnings=""
cxx_warnings=""
fast_cflags="-O3"
base_cxxflags="-fno-handle-exceptions"
# FIXME do we need to link static, not to depend on CodeWarrior libs?
if [ x$MODE = x ] ; then
echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
exit 1
else
case $MODE in
standard|pro-gpl)
# FIXME pro/pro-gpl different libedit/readline
extra_flags="$ppc_cflags $fast_cflags"
;;
pro)
# FIXME pro/pro-gpl different libedit/readline
extra_flags="$ppc_cflags $fast_cflags"
extra_configs="--with-libedit"
;;
max)
extra_flags="$ppc_cflags $fast_cflags"
extra_configs="$max_configs"
;;
debug)
extra_flags="$ppc_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$debug_configs"
;;
debug-max)
extra_flags="$ppc_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$debug_configs $max_configs"
;;
*)
echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
exit 1
;;
esac
fi
extra_configs="$extra_configs --with-darwin-mwcc"
. "$path/FINISH.sh"
...@@ -186,6 +186,7 @@ mysqldev@build.mysql2.com ...@@ -186,6 +186,7 @@ mysqldev@build.mysql2.com
mysqldev@melody.local mysqldev@melody.local
mysqldev@mysql.com mysqldev@mysql.com
mysqldev@o2k.irixworld.net mysqldev@o2k.irixworld.net
ndbdev@dl145b.mysql.com
ndbdev@eel.hemma.oreland.se ndbdev@eel.hemma.oreland.se
ndbdev@ndbmaster.mysql.com ndbdev@ndbmaster.mysql.com
ndbdev@shark. ndbdev@shark.
...@@ -268,6 +269,7 @@ tonu@x153.internalnet ...@@ -268,6 +269,7 @@ tonu@x153.internalnet
tonu@x3.internalnet tonu@x3.internalnet
tsmith@build.mysql.com tsmith@build.mysql.com
tulin@build.mysql.com tulin@build.mysql.com
tulin@dl145b.mysql.com
tulin@mysql.com tulin@mysql.com
ulli@morbus.(none) ulli@morbus.(none)
venu@hundin.mysql.fi venu@hundin.mysql.fi
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
#include "my_config.h" #include "my_config.h"
#include "sys.h" #include "sys.h"
#if defined(LIBC_SCCS) && !defined(lint)
#define __RCSID(x) #define __RCSID(x)
#define __COPYRIGHT(x) #define __COPYRIGHT(x)
#endif
#define __RENAME(x) #define __RENAME(x)
#define _DIAGASSERT(x) #define _DIAGASSERT(x)
......
...@@ -346,7 +346,7 @@ get_term_capabilities (bp) ...@@ -346,7 +346,7 @@ get_term_capabilities (bp)
register unsigned int i; register unsigned int i;
for (i = 0; i < NUM_TC_STRINGS; i++) for (i = 0; i < NUM_TC_STRINGS; i++)
# ifdef __LCC__ # if defined(__LCC__) || defined(__MWERKS__)
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
# else # else
*(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp); *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp);
......
...@@ -123,8 +123,25 @@ AM_SANITY_CHECK ...@@ -123,8 +123,25 @@ AM_SANITY_CHECK
# This is needed is SUBDIRS is set # This is needed is SUBDIRS is set
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
# This is need before AC_PROG_CC ##############################################################################
# # The below section needs to be done before AC_PROG_CC
##############################################################################
# Hack for OS X/Darwin and Metrowerks CodeWarrior
AC_ARG_WITH(darwin-mwcc,
[ --with-darwin-mwcc Use Metrowerks CodeWarrior wrappers on OS X/Darwin],[
builddir=`pwd`
ccwrapper="$builddir/support-files/MacOSX/mwcc-wrapper"
arwrapper="$builddir/support-files/MacOSX/mwar-wrapper"
CC="$ccwrapper"
CXX="$ccwrapper"
LD="$ccwrapper"
AR="$arwrapper"
RANLIB=:
export CC CXX LD AR RANLIB
AC_SUBST(AR)
AC_SUBST(RANLIB)
])
if test "x${CFLAGS-}" = x ; then if test "x${CFLAGS-}" = x ; then
cflags_is_set=no cflags_is_set=no
...@@ -144,6 +161,8 @@ else ...@@ -144,6 +161,8 @@ else
ldflags_is_set=yes ldflags_is_set=yes
fi fi
################ End of section to be done before AC_PROG_CC #################
# The following hack should ensure that configure doesn't add optimizing # The following hack should ensure that configure doesn't add optimizing
# or debugging flags to CFLAGS or CXXFLAGS # or debugging flags to CFLAGS or CXXFLAGS
# C_EXTRA_FLAGS are flags that are automaticly added to both # C_EXTRA_FLAGS are flags that are automaticly added to both
......
...@@ -179,6 +179,10 @@ extern void my_large_free(gptr ptr, myf my_flags); ...@@ -179,6 +179,10 @@ extern void my_large_free(gptr ptr, myf my_flags);
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
#pragma alloca #pragma alloca
#endif /* _AIX */ #endif /* _AIX */
#if defined(__MWERKS__)
#undef alloca
#define alloca __alloca
#endif /* __MWERKS__ */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
#define alloca __builtin_alloca #define alloca __builtin_alloca
#endif /* GNUC */ #endif /* GNUC */
......
...@@ -247,3 +247,4 @@ count(*) ...@@ -247,3 +247,4 @@ count(*)
3 3
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
520093696,1
...@@ -595,3 +595,41 @@ c1 c2 ...@@ -595,3 +595,41 @@ c1 c2
200887 860 200887 860
200887 200887 200887 200887
deallocate prepare stmt; deallocate prepare stmt;
drop table t1;
create table t1 (
id bigint(20) not null auto_increment,
code varchar(20) character set utf8 collate utf8_bin not null default '',
company_name varchar(250) character set utf8 collate utf8_bin default null,
setup_mode tinyint(4) default null,
start_date datetime default null,
primary key (id), unique key code (code)
);
create table t2 (
id bigint(20) not null auto_increment,
email varchar(250) character set utf8 collate utf8_bin default null,
name varchar(250) character set utf8 collate utf8_bin default null,
t1_id bigint(20) default null,
password varchar(250) character set utf8 collate utf8_bin default null,
primary_contact tinyint(4) not null default '0',
email_opt_in tinyint(4) not null default '1',
primary key (id), unique key email (email), key t1_id (t1_id),
constraint t2_fk1 foreign key (t1_id) references t1 (id)
);
insert into t1 values
(1, 'demo', 'demo s', 0, current_date()),
(2, 'code2', 'name 2', 0, current_date()),
(3, 'code3', 'name 3', 0, current_date());
insert into t2 values
(2, 'email1', 'name1', 3, 'password1', 0, 0),
(3, 'email2', 'name1', 1, 'password2', 1, 0),
(5, 'email3', 'name3', 2, 'password3', 0, 0);
prepare stmt from 'select t2.id from t2, t1 where (t1.id=? and t2.t1_id=t1.id)';
set @a=1;
execute stmt using @a;
id
3
select t2.id from t2, t1 where (t1.id=1 and t2.t1_id=t1.id);
id
3
deallocate prepare stmt;
drop table t1, t2;
...@@ -209,3 +209,9 @@ select count(*) ...@@ -209,3 +209,9 @@ select count(*)
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
--enable_warnings --enable_warnings
#
# Test BUG#10287
#
--exec $NDB_TOOLS_DIR/ndb_select_all -d sys -D , SYSTAB_0 | grep 520093696
...@@ -7,8 +7,8 @@ drop table if exists t1,t2; ...@@ -7,8 +7,8 @@ drop table if exists t1,t2;
create table t1 create table t1
( (
a int primary key, a int primary key,
b char(10) b char(10)
); );
insert into t1 values (1,'one'); insert into t1 values (1,'one');
insert into t1 values (2,'two'); insert into t1 values (2,'two');
...@@ -88,7 +88,7 @@ explain prepare stmt6 from 'insert into t1 values (5,"five"); select2'; ...@@ -88,7 +88,7 @@ explain prepare stmt6 from 'insert into t1 values (5,"five"); select2';
create table t2 create table t2
( (
a int a int
); );
insert into t2 values (0); insert into t2 values (0);
...@@ -143,15 +143,15 @@ drop table t1; ...@@ -143,15 +143,15 @@ drop table t1;
# #
create table t1 create table t1
( (
c1 tinyint, c2 smallint, c3 mediumint, c4 int, c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double, c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp(14), c16 time, c13 date, c14 datetime, c15 timestamp(14), c16 time,
c17 year, c18 bit, c19 bool, c20 char, c17 year, c18 bit, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday') c32 set('monday', 'tuesday', 'wednesday')
) engine = MYISAM ; ) engine = MYISAM ;
create table t2 like t1; create table t2 like t1;
...@@ -518,8 +518,8 @@ create table t2 like t1; ...@@ -518,8 +518,8 @@ create table t2 like t1;
# reduced query # reduced query
prepare stmt from prepare stmt from
"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b) "select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
where t1.a=1"; where t1.a=1";
execute stmt; execute stmt;
execute stmt; execute stmt;
execute stmt; execute stmt;
...@@ -557,8 +557,8 @@ let $exec_loop_count= 3; ...@@ -557,8 +557,8 @@ let $exec_loop_count= 3;
eval prepare my_stmt from @aux; eval prepare my_stmt from @aux;
while ($exec_loop_count) while ($exec_loop_count)
{ {
eval execute my_stmt; eval execute my_stmt;
dec $exec_loop_count; dec $exec_loop_count;
} }
deallocate prepare my_stmt; deallocate prepare my_stmt;
...@@ -572,11 +572,11 @@ create table t1 (id int)| ...@@ -572,11 +572,11 @@ create table t1 (id int)|
insert into t1 values(1)| insert into t1 values(1)|
create procedure p1(a int, b int) create procedure p1(a int, b int)
begin begin
declare c int; declare c int;
select max(id)+1 into c from t1; select max(id)+1 into c from t1;
insert into t1 select a+b; insert into t1 select a+b;
insert into t1 select a-b; insert into t1 select a-b;
insert into t1 select a-c; insert into t1 select a-c;
end| end|
set @a= 3, @b= 4| set @a= 3, @b= 4|
prepare stmt from "call p1(?, ?)"| prepare stmt from "call p1(?, ?)"|
...@@ -614,3 +614,50 @@ set @a=200887, @b=860; ...@@ -614,3 +614,50 @@ set @a=200887, @b=860;
execute stmt using @a, @b; execute stmt using @a, @b;
deallocate prepare stmt; deallocate prepare stmt;
drop table t1;
#
# Bug#9777 - another occurrence of the problem stated in Bug#9096:
# we can not compare basic constants by their names, because a placeholder
# is a basic constant while his name is always '?'
#
create table t1 (
id bigint(20) not null auto_increment,
code varchar(20) character set utf8 collate utf8_bin not null default '',
company_name varchar(250) character set utf8 collate utf8_bin default null,
setup_mode tinyint(4) default null,
start_date datetime default null,
primary key (id), unique key code (code)
);
create table t2 (
id bigint(20) not null auto_increment,
email varchar(250) character set utf8 collate utf8_bin default null,
name varchar(250) character set utf8 collate utf8_bin default null,
t1_id bigint(20) default null,
password varchar(250) character set utf8 collate utf8_bin default null,
primary_contact tinyint(4) not null default '0',
email_opt_in tinyint(4) not null default '1',
primary key (id), unique key email (email), key t1_id (t1_id),
constraint t2_fk1 foreign key (t1_id) references t1 (id)
);
insert into t1 values
(1, 'demo', 'demo s', 0, current_date()),
(2, 'code2', 'name 2', 0, current_date()),
(3, 'code3', 'name 3', 0, current_date());
insert into t2 values
(2, 'email1', 'name1', 3, 'password1', 0, 0),
(3, 'email2', 'name1', 1, 'password2', 1, 0),
(5, 'email3', 'name3', 2, 'password3', 0, 0);
prepare stmt from 'select t2.id from t2, t1 where (t1.id=? and t2.t1_id=t1.id)';
set @a=1;
execute stmt using @a;
select t2.id from t2, t1 where (t1.id=1 and t2.t1_id=t1.id);
deallocate prepare stmt;
drop table t1, t2;
...@@ -116,8 +116,12 @@ BaseString NDBT_ResultRow::c_str() const { ...@@ -116,8 +116,12 @@ BaseString NDBT_ResultRow::c_str() const {
NdbOut & NdbOut &
operator << (NdbOut& ndbout, const NDBT_ResultRow & res) { operator << (NdbOut& ndbout, const NDBT_ResultRow & res) {
for(int i = 0; i<res.cols; i++) if (res.cols != 0)
ndbout << *(res.data[i]) << "\t"; {
ndbout << *(res.data[0]);
for(int i = 1; i<res.cols; i++)
ndbout << res.ad << *(res.data[i]);
}
return ndbout; return ndbout;
} }
......
...@@ -6429,15 +6429,15 @@ ha_innobase::store_lock( ...@@ -6429,15 +6429,15 @@ ha_innobase::store_lock(
(lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) && (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) &&
thd->lex->sql_command != SQLCOM_SELECT && thd->lex->sql_command != SQLCOM_SELECT &&
thd->lex->sql_command != SQLCOM_UPDATE_MULTI && thd->lex->sql_command != SQLCOM_UPDATE_MULTI &&
thd->lex->sql_command != SQLCOM_DELETE_MULTI ) { thd->lex->sql_command != SQLCOM_DELETE_MULTI &&
thd->lex->sql_command != SQLCOM_LOCK_TABLES) {
/* In case we have innobase_locks_unsafe_for_binlog /* In case we have innobase_locks_unsafe_for_binlog
option set and isolation level of the transaction option set and isolation level of the transaction
is not set to serializable and MySQL is doing is not set to serializable and MySQL is doing
INSERT INTO...SELECT without FOR UPDATE or IN INSERT INTO...SELECT or UPDATE ... = (SELECT ...)
SHARE MODE we use consistent read for select. without FOR UPDATE or IN SHARE MODE in select, then
Similarly, in case of DELETE...SELECT and we use consistent read for select. */
UPDATE...SELECT when these are not multi table.*/
prebuilt->select_lock_type = LOCK_NONE; prebuilt->select_lock_type = LOCK_NONE;
prebuilt->stored_select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE;
......
...@@ -1341,6 +1341,13 @@ Item_uint::Item_uint(const char *str_arg, uint length): ...@@ -1341,6 +1341,13 @@ Item_uint::Item_uint(const char *str_arg, uint length):
} }
Item_uint::Item_uint(const char *str_arg, longlong i, uint length):
Item_int(str_arg, i, length)
{
unsigned_flag= 1;
}
String *Item_uint::val_str(String *str) String *Item_uint::val_str(String *str)
{ {
// following assert is redundant, because fixed=1 assigned in constructor // following assert is redundant, because fixed=1 assigned in constructor
...@@ -2234,7 +2241,9 @@ Item_param::new_item() ...@@ -2234,7 +2241,9 @@ Item_param::new_item()
case NULL_VALUE: case NULL_VALUE:
return new Item_null(name); return new Item_null(name);
case INT_VALUE: case INT_VALUE:
return new Item_int(name, value.integer, max_length); return (unsigned_flag ?
new Item_uint(name, value.integer, max_length) :
new Item_int(name, value.integer, max_length));
case REAL_VALUE: case REAL_VALUE:
return new Item_float(name, value.real, decimals, max_length); return new Item_float(name, value.real, decimals, max_length);
case STRING_VALUE: case STRING_VALUE:
...@@ -3517,6 +3526,19 @@ bool Item_int::eq(const Item *arg, bool binary_cmp) const ...@@ -3517,6 +3526,19 @@ bool Item_int::eq(const Item *arg, bool binary_cmp) const
} }
Item *Item_int_with_ref::new_item()
{
DBUG_ASSERT(ref->basic_const_item());
/*
We need to evaluate the constant to make sure it works with
parameter markers.
*/
return (ref->unsigned_flag ?
new Item_uint(ref->name, ref->val_int(), ref->max_length) :
new Item_int(ref->name, ref->val_int(), ref->max_length));
}
Item_num *Item_uint::neg() Item_num *Item_uint::neg()
{ {
Item_decimal *item= new Item_decimal(value, 0); Item_decimal *item= new Item_decimal(value, 0);
......
...@@ -991,6 +991,7 @@ class Item_uint :public Item_int ...@@ -991,6 +991,7 @@ class Item_uint :public Item_int
{ {
public: public:
Item_uint(const char *str_arg, uint length); Item_uint(const char *str_arg, uint length);
Item_uint(const char *str_arg, longlong i, uint length);
Item_uint(uint32 i) :Item_int((longlong) i, 10) Item_uint(uint32 i) :Item_int((longlong) i, 10)
{ unsigned_flag= 1; } { unsigned_flag= 1; }
double val_real() double val_real()
...@@ -1397,11 +1398,7 @@ class Item_int_with_ref :public Item_int ...@@ -1397,11 +1398,7 @@ class Item_int_with_ref :public Item_int
{ {
return ref->save_in_field(field, no_conversions); return ref->save_in_field(field, no_conversions);
} }
Item *new_item() Item *new_item();
{
return (ref->unsigned_flag)? new Item_uint(ref->name, ref->max_length) :
new Item_int(ref->name, ref->max_length);
}
}; };
......
...@@ -91,7 +91,7 @@ template <> class Bitmap<64> ...@@ -91,7 +91,7 @@ template <> class Bitmap<64>
ulonglong map; ulonglong map;
public: public:
Bitmap<64>() { } Bitmap<64>() { }
#if defined(__NETWARE__) #if defined(__NETWARE__) || defined(__MWERKS__)
/* /*
Metwork compiler gives error on Bitmap<64> Metwork compiler gives error on Bitmap<64>
Changed to Bitmap, since in this case also it will proper construct Changed to Bitmap, since in this case also it will proper construct
......
#!/bin/sh
# This script can only create a library, not take it apart
# again to AR files
case $1 in
-d*|-m*|-t*|-p*|-r*|-x*|x)
echo "$0: can't handle arguments $*"
exit 1;
;;
-c|c|cr|cru|cu)
shift;
;;
esac
exec mwld -lib -o $*
#!/bin/sh
if [ -z "$CWINSTALL" ] ; then
echo "ERROR: You need to source 'mwvars' to set CWINSTALL and other variables"
exit 1
fi
if [ `expr "$MWMacOSXPPCLibraryFiles" : ".*BSD.*"` = 0 ] ; then
echo "ERROR: You need to source 'mwvars' with the 'bsd' argument"
exit 1
fi
# ==============================================================================
# Extra options that don't change
PREOPTS="-D__SCHAR_MAX__=127 -D__CHAR_BIT__=8 -ext o -gccinc"
PREOPTS="$PREOPTS -wchar_t on -bool on -relax_pointers -align power_gcc"
PREOPTS="$PREOPTS -stabs all -fno-handle-exceptions -Cpp_exceptions off"
# ==============================================================================
# We want the "PPC Specific" directory to be last, before the source
# file. It is to work around a CodeWarrior/Apple bug, that we need a
# Metrowersk header even though we have configured CodeWarrior to use
# the BSD headers. But not to conflict, the directory has to be last.
# FIXME this will probably break if one path contains space characters
PREARGS=""
for i in $* ; do
case "$i" in
-bind_at_load)
# This is a flag some version of libtool adds, when the host
# is "*darwin*". It doesn't check that it is gcc.
# FIXME add some flag?!
;;
*.c|*.cc|*.cpp)
break
;;
*)
PREARGS="$PREARGS $1"
;;
esac
shift
done
#echo "mwcc $PREOPTS $PREARGS -I\"$CWINSTALL/MacOS X Support/Headers/PPC Specific\" $*"
exec mwcc $PREOPTS $PREARGS -I"$CWINSTALL/MacOS X Support/Headers/PPC Specific" $*
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