Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
753959cd
Commit
753959cd
authored
May 05, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge
parents
25f44eab
15dbab1c
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
313 additions
and
53 deletions
+313
-53
BUILD/compile-darwin-mwcc
BUILD/compile-darwin-mwcc
+54
-0
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+2
-0
cmd-line-utils/libedit/config.h
cmd-line-utils/libedit/config.h
+2
-0
cmd-line-utils/readline/terminal.c
cmd-line-utils/readline/terminal.c
+1
-1
configure.in
configure.in
+21
-2
include/my_sys.h
include/my_sys.h
+4
-0
mysql-test/r/ndb_restore.result
mysql-test/r/ndb_restore.result
+1
-0
mysql-test/r/ps.result
mysql-test/r/ps.result
+38
-0
mysql-test/t/ndb_restore.test
mysql-test/t/ndb_restore.test
+6
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+83
-36
ndb/test/src/NDBT_ResultRow.cpp
ndb/test/src/NDBT_ResultRow.cpp
+6
-2
sql/ha_innodb.cc
sql/ha_innodb.cc
+5
-5
sql/item.cc
sql/item.cc
+23
-1
sql/item.h
sql/item.h
+2
-5
sql/sql_bitmap.h
sql/sql_bitmap.h
+1
-1
support-files/MacOSX/mwar-wrapper
support-files/MacOSX/mwar-wrapper
+16
-0
support-files/MacOSX/mwcc-wrapper
support-files/MacOSX/mwcc-wrapper
+48
-0
No files found.
BUILD/compile-darwin-mwcc
0 → 100755
View file @
753959cd
#! /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"
BitKeeper/etc/logging_ok
View file @
753959cd
...
@@ -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
...
...
cmd-line-utils/libedit/config.h
View file @
753959cd
...
@@ -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)
...
...
cmd-line-utils/readline/terminal.c
View file @
753959cd
...
@@ -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
++
)
# if
def __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
);
...
...
configure.in
View file @
753959cd
...
@@ -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
...
...
include/my_sys.h
View file @
753959cd
...
@@ -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 */
...
...
mysql-test/r/ndb_restore.result
View file @
753959cd
...
@@ -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
mysql-test/r/ps.result
View file @
753959cd
...
@@ -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;
mysql-test/t/ndb_restore.test
View file @
753959cd
...
@@ -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
mysql-test/t/ps.test
View file @
753959cd
...
@@ -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
;
...
@@ -181,8 +181,8 @@ drop table t1;
...
@@ -181,8 +181,8 @@ drop table t1;
# eq() for parameters
# eq() for parameters
#
#
create
table
t1
(
id
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
create
table
t1
(
id
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
name
varchar
(
64
)
NOT
NULL
default
''
,
name
varchar
(
64
)
NOT
NULL
default
''
,
PRIMARY
KEY
(
id
),
UNIQUE
KEY
`name`
(
`name`
));
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'
);
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=?'
;
prepare
stmt1
from
'select name from t1 where id=? or id=?'
;
set
@
id1
=
1
,
@
id2
=
6
;
set
@
id1
=
1
,
@
id2
=
6
;
...
@@ -368,13 +368,13 @@ insert into t1 (a) values (1), (2), (3), (4);
...
@@ -368,13 +368,13 @@ insert into t1 (a) values (1), (2), (3), (4);
set
@
precision
=
10000000000
;
set
@
precision
=
10000000000
;
--
replace_column
1
-
3
-
--
replace_column
1
-
3
-
select
rand
(),
select
rand
(),
cast
(
rand
(
10
)
*@
precision
as
unsigned
integer
),
cast
(
rand
(
10
)
*@
precision
as
unsigned
integer
),
cast
(
rand
(
a
)
*@
precision
as
unsigned
integer
)
from
t1
;
cast
(
rand
(
a
)
*@
precision
as
unsigned
integer
)
from
t1
;
prepare
stmt
from
prepare
stmt
from
"select rand(),
"select rand(),
cast(rand(10)*@precision as unsigned integer),
cast(rand(10)*@precision as unsigned integer),
cast(rand(a)*@precision as unsigned integer),
cast(rand(a)*@precision as unsigned integer),
cast(rand(?)*@precision as unsigned integer) from t1"
;
cast(rand(?)*@precision as unsigned integer) from t1"
;
set
@
var
=
1
;
set
@
var
=
1
;
--
replace_column
1
-
3
-
--
replace_column
1
-
3
-
execute
stmt
using
@
var
;
execute
stmt
using
@
var
;
...
@@ -513,13 +513,13 @@ deallocate prepare stmt;
...
@@ -513,13 +513,13 @@ deallocate prepare stmt;
#
#
create
table
t1
(
a
char
(
3
)
not
null
,
b
char
(
3
)
not
null
,
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
;
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
;
...
@@ -546,19 +546,19 @@ drop table t1,t2;
...
@@ -546,19 +546,19 @@ drop table t1,t2;
#
#
eval
SET
@
aux
=
"SELECT COUNT(*)
eval
SET
@
aux
=
"SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS A,
FROM INFORMATION_SCHEMA.COLUMNS A,
INFORMATION_SCHEMA.COLUMNS B
INFORMATION_SCHEMA.COLUMNS B
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
AND A.TABLE_NAME = B.TABLE_NAME
AND A.TABLE_NAME = B.TABLE_NAME
AND A.COLUMN_NAME = B.COLUMN_NAME AND
AND A.COLUMN_NAME = B.COLUMN_NAME AND
A.TABLE_NAME = 'user'"
;
A.TABLE_NAME = 'user'"
;
let
$exec_loop_count
=
3
;
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(?, ?)"
|
...
@@ -597,7 +597,7 @@ delimiter ;|
...
@@ -597,7 +597,7 @@ delimiter ;|
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
create
table
t1
(
c1
int
(
11
)
not
null
,
c2
int
(
11
)
not
null
,
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
,
860
);
insert
into
t1
values
(
200887
,
200887
);
insert
into
t1
values
(
200887
,
200887
);
...
@@ -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
;
ndb/test/src/NDBT_ResultRow.cpp
View file @
753959cd
...
@@ -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
;
}
}
...
...
sql/ha_innodb.cc
View file @
753959cd
...
@@ -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
;
...
...
sql/item.cc
View file @
753959cd
...
@@ -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
);
...
...
sql/item.h
View file @
753959cd
...
@@ -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 @@ public:
...
@@ -1397,11 +1398,7 @@ public:
{
{
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
);
}
};
};
...
...
sql/sql_bitmap.h
View file @
753959cd
...
@@ -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
...
...
support-files/MacOSX/mwar-wrapper
0 → 100755
View file @
753959cd
#!/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
$*
support-files/MacOSX/mwcc-wrapper
0 → 100755
View file @
753959cd
#!/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"
$*
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment