Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1914 05/05/05 13:47:09 konstantin@stripped +10 -0
Manual merge
mysql-test/t/ps.test
1.37 05/05/05 13:47:03 konstantin@stripped +83 -83
Manual merge
sql/item.h
1.120 05/05/05 13:24:28 konstantin@stripped +0 -0
Auto merged
sql/item.cc
1.116 05/05/05 13:24:28 konstantin@stripped +0 -0
Auto merged
sql/ha_innodb.cc
1.204 05/05/05 13:24:28 konstantin@stripped +0 -16
Auto merged
ndb/test/src/NDBT_ResultRow.cpp
1.12 05/05/05 13:24:28 konstantin@stripped +0 -0
Auto merged
mysql-test/t/ndb_restore.test
1.6 05/05/05 13:24:28 konstantin@stripped +0 -0
Auto merged
mysql-test/r/ps.result
1.39 05/05/05 13:24:28 konstantin@stripped +38 -38
Auto merged
include/my_sys.h
1.151 05/05/05 13:24:27 konstantin@stripped +0 -0
Auto merged
configure.in
1.304 05/05/05 13:24:27 konstantin@stripped +0 -0
Auto merged
BitKeeper/etc/logging_ok
1.308 05/05/05 13:23:47 konstantin@stripped +0 -0
auto-union
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: konstantin
# Host: dragonfly.local
# Root: /opt/local/work/mysql-5.0-root/RESYNC
--- 1.303/configure.in 2005-05-02 21:01:30 +04:00
+++ 1.304/configure.in 2005-05-05 13:24:27 +04:00
@@ -123,8 +123,25 @@
# This is needed is SUBDIRS is 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
cflags_is_set=no
@@ -143,6 +160,8 @@
else
ldflags_is_set=yes
fi
+
+################ End of section to be done before AC_PROG_CC #################
# The following hack should ensure that configure doesn't add optimizing
# or debugging flags to CFLAGS or CXXFLAGS
--- 1.150/include/my_sys.h 2005-05-02 21:20:21 +04:00
+++ 1.151/include/my_sys.h 2005-05-05 13:24:27 +04:00
@@ -179,6 +179,10 @@
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
#pragma alloca
#endif /* _AIX */
+#if defined(__MWERKS__)
+#undef alloca
+#define alloca __alloca
+#endif /* __MWERKS__ */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
#define alloca __builtin_alloca
#endif /* GNUC */
--- 1.115/sql/item.cc 2005-05-04 16:54:34 +04:00
+++ 1.116/sql/item.cc 2005-05-05 13:24:28 +04:00
@@ -1341,6 +1341,13 @@
}
+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)
{
// following assert is redundant, because fixed=1 assigned in constructor
@@ -2234,7 +2241,9 @@
case NULL_VALUE:
return new Item_null(name);
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:
return new Item_float(name, value.real, decimals, max_length);
case STRING_VALUE:
@@ -3514,6 +3523,19 @@
return item->val_int() == value && item->unsigned_flag == unsigned_flag;
}
return FALSE;
+}
+
+
+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));
}
--- 1.119/sql/item.h 2005-05-04 16:54:34 +04:00
+++ 1.120/sql/item.h 2005-05-05 13:24:28 +04:00
@@ -991,6 +991,7 @@
{
public:
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)
{ unsigned_flag= 1; }
double val_real()
@@ -1397,11 +1398,7 @@
{
return ref->save_in_field(field, no_conversions);
}
- Item *new_item()
- {
- return (ref->unsigned_flag)? new Item_uint(ref->name, ref->max_length) :
- new Item_int(ref->name, ref->max_length);
- }
+ Item *new_item();
};
--- 1.307/BitKeeper/etc/logging_ok 2005-05-03 19:47:51 +04:00
+++ 1.308/BitKeeper/etc/logging_ok 2005-05-05 13:23:47 +04:00
@@ -186,6 +186,7 @@
mysqldev@stripped
mysqldev@stripped
mysqldev@stripped
+ndbdev@stripped
ndbdev@stripped
ndbdev@stripped
ndbdev@shark.
@@ -268,6 +269,7 @@
tonu@stripped
tsmith@stripped
tulin@stripped
+tulin@stripped
tulin@stripped
ulli@morbus.(none)
venu@stripped
--- 1.11/ndb/test/src/NDBT_ResultRow.cpp 2005-03-07 20:47:38 +03:00
+++ 1.12/ndb/test/src/NDBT_ResultRow.cpp 2005-05-05 13:24:28 +04:00
@@ -116,8 +116,12 @@
NdbOut &
operator << (NdbOut& ndbout, const NDBT_ResultRow & res) {
- for(int i = 0; i<res.cols; i++)
- ndbout << *(res.data[i]) << "\t";
+ if (res.cols != 0)
+ {
+ ndbout << *(res.data[0]);
+ for(int i = 1; i<res.cols; i++)
+ ndbout << res.ad << *(res.data[i]);
+ }
return ndbout;
}
--- 1.203/sql/ha_innodb.cc 2005-05-03 09:40:19 +04:00
+++ 1.204/sql/ha_innodb.cc 2005-05-05 13:24:28 +04:00
@@ -6429,15 +6429,15 @@
(lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) &&
thd->lex->sql_command != SQLCOM_SELECT &&
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
option set and isolation level of the transaction
is not set to serializable and MySQL is doing
- INSERT INTO...SELECT without FOR UPDATE or IN
- SHARE MODE we use consistent read for select.
- Similarly, in case of DELETE...SELECT and
- UPDATE...SELECT when these are not multi table.*/
+ INSERT INTO...SELECT or UPDATE ... = (SELECT ...)
+ without FOR UPDATE or IN SHARE MODE in select, then
+ we use consistent read for select. */
prebuilt->select_lock_type = LOCK_NONE;
prebuilt->stored_select_lock_type = LOCK_NONE;
--- 1.38/mysql-test/r/ps.result 2005-05-04 16:53:05 +04:00
+++ 1.39/mysql-test/r/ps.result 2005-05-05 13:24:28 +04:00
@@ -595,3 +595,41 @@
200887 860
200887 200887
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;
--- 1.36/mysql-test/t/ps.test 2005-05-03 19:32:25 +04:00
+++ 1.37/mysql-test/t/ps.test 2005-05-05 13:47:03 +04:00
@@ -7,8 +7,8 @@
create table t1
(
- a int primary key,
- b char(10)
+a int primary key,
+b char(10)
);
insert into t1 values (1,'one');
insert into t1 values (2,'two');
@@ -88,7 +88,7 @@
create table t2
(
- a int
+a int
);
insert into t2 values (0);
@@ -143,15 +143,15 @@
#
create table t1
(
- 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')
+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')
) engine = MYISAM ;
create table t2 like t1;
@@ -181,8 +181,8 @@
# eq() for parameters
#
create table t1 (id int(10) unsigned NOT NULL default '0',
- name varchar(64) NOT NULL default '',
- PRIMARY KEY (id), UNIQUE KEY `name` (`name`));
+ name varchar(64) NOT NULL default '',
+ PRIMARY KEY (id), UNIQUE KEY `name` (`name`));
insert into t1 values (1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7');
prepare stmt1 from 'select name from t1 where id=? or id=?';
set @id1=1,@id2=6;
@@ -368,13 +368,13 @@
set @precision=10000000000;
--replace_column 1 - 3 -
select rand(),
- cast(rand(10)*@precision as unsigned integer),
- cast(rand(a)*@precision as unsigned integer) from t1;
+ cast(rand(10)*@precision as unsigned integer),
+ cast(rand(a)*@precision as unsigned integer) from t1;
prepare stmt from
"select rand(),
- cast(rand(10)*@precision as unsigned integer),
- cast(rand(a)*@precision as unsigned integer),
- cast(rand(?)*@precision as unsigned integer) from t1";
+ cast(rand(10)*@precision as unsigned integer),
+ cast(rand(a)*@precision as unsigned integer),
+ cast(rand(?)*@precision as unsigned integer) from t1";
set @var=1;
--replace_column 1 - 3 -
execute stmt using @var;
@@ -513,13 +513,13 @@
#
create table t1 (a char(3) not null, b char(3) not null,
- c char(3) not null, primary key (a, b, c));
+ c char(3) not null, primary key (a, b, c));
create table t2 like t1;
# reduced query
prepare stmt from
- "select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
- where t1.a=1";
+"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
+where t1.a=1";
execute stmt;
execute stmt;
execute stmt;
@@ -546,19 +546,19 @@
#
eval SET @aux= "SELECT COUNT(*)
- FROM INFORMATION_SCHEMA.COLUMNS A,
- INFORMATION_SCHEMA.COLUMNS B
- WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
- AND A.TABLE_NAME = B.TABLE_NAME
- AND A.COLUMN_NAME = B.COLUMN_NAME AND
- A.TABLE_NAME = 'user'";
+ FROM INFORMATION_SCHEMA.COLUMNS A,
+ INFORMATION_SCHEMA.COLUMNS B
+ WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
+ AND A.TABLE_NAME = B.TABLE_NAME
+ AND A.COLUMN_NAME = B.COLUMN_NAME AND
+ A.TABLE_NAME = 'user'";
let $exec_loop_count= 3;
eval prepare my_stmt from @aux;
while ($exec_loop_count)
{
- eval execute my_stmt;
- dec $exec_loop_count;
+eval execute my_stmt;
+dec $exec_loop_count;
}
deallocate prepare my_stmt;
@@ -572,11 +572,11 @@
insert into t1 values(1)|
create procedure p1(a int, b int)
begin
- declare c int;
- 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-c;
+declare c int;
+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-c;
end|
set @a= 3, @b= 4|
prepare stmt from "call p1(?, ?)"|
@@ -597,7 +597,7 @@
drop table if exists t1;
create table t1 (c1 int(11) not null, c2 int(11) not null,
- primary key (c1,c2), key c2 (c2), key c1 (c1));
+ primary key (c1,c2), key c2 (c2), key c1 (c1));
insert into t1 values (200887, 860);
insert into t1 values (200887, 200887);
@@ -614,3 +614,50 @@
execute stmt using @a, @b;
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;
--- 1.5/mysql-test/t/ndb_restore.test 2005-04-21 12:26:10 +04:00
+++ 1.6/mysql-test/t/ndb_restore.test 2005-05-05 13:24:28 +04:00
@@ -209,3 +209,9 @@
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;
--enable_warnings
+
+#
+# Test BUG#10287
+#
+
+--exec $NDB_TOOLS_DIR/ndb_select_all -d sys -D , SYSTAB_0 | grep 520093696
| Thread |
|---|
| • bk commit into 5.0 tree (konstantin:1.1914) | konstantin | 5 May |