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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f5f92ce1
Commit
f5f92ce1
authored
May 20, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
parents
d3833fa4
2229d9a9
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
24 deletions
+48
-24
myisam/rt_split.c
myisam/rt_split.c
+9
-11
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+13
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+2
-1
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+2
-1
sql/field_conv.cc
sql/field_conv.cc
+5
-1
sql/item_sum.cc
sql/item_sum.cc
+2
-7
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-2
strings/my_vsnprintf.c
strings/my_vsnprintf.c
+10
-0
No files found.
myisam/rt_split.c
View file @
f5f92ce1
...
@@ -257,17 +257,16 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
...
@@ -257,17 +257,16 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
int
n_dim
;
int
n_dim
;
uchar
*
source_cur
,
*
cur1
,
*
cur2
;
uchar
*
source_cur
,
*
cur1
,
*
cur2
;
uchar
*
new_page
;
uchar
*
new_page
;
int
err_code
=
0
;
int
err_code
=
0
;
uint
nod_flag
=
mi_test_if_nod
(
page
);
uint
nod_flag
=
mi_test_if_nod
(
page
);
uint
full_length
=
key_length
+
(
nod_flag
?
nod_flag
:
uint
full_length
=
key_length
+
(
nod_flag
?
nod_flag
:
info
->
s
->
base
.
rec_reflength
);
info
->
s
->
base
.
rec_reflength
);
int
max_keys
=
(
mi_getint
(
page
)
-
2
)
/
(
full_length
);
int
max_keys
=
(
mi_getint
(
page
)
-
2
)
/
(
full_length
);
n_dim
=
keyinfo
->
keysegs
/
2
;
n_dim
=
keyinfo
->
keysegs
/
2
;
if
(
!
(
coord_buf
=
my_alloca
(
n_dim
*
2
*
sizeof
(
double
)
*
(
max_keys
+
1
+
4
)
+
if
(
!
(
coord_buf
=
(
double
*
)
my_alloca
(
n_dim
*
2
*
sizeof
(
double
)
*
(
max_keys
+
1
+
4
)
+
sizeof
(
SplitStruct
)
*
(
max_keys
+
1
))))
sizeof
(
SplitStruct
)
*
(
max_keys
+
1
))))
return
-
1
;
return
-
1
;
...
@@ -311,8 +310,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
...
@@ -311,8 +310,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
cur1
=
rt_PAGE_FIRST_KEY
(
page
,
nod_flag
);
cur1
=
rt_PAGE_FIRST_KEY
(
page
,
nod_flag
);
cur2
=
rt_PAGE_FIRST_KEY
(
new_page
,
nod_flag
);
cur2
=
rt_PAGE_FIRST_KEY
(
new_page
,
nod_flag
);
n1
=
0
;
n1
=
n2
=
0
;
n2
=
0
;
for
(
cur
=
task
;
cur
<
stop
;
++
cur
)
for
(
cur
=
task
;
cur
<
stop
;
++
cur
)
{
{
uchar
*
to
;
uchar
*
to
;
...
...
mysql-test/r/subselect.result
View file @
f5f92ce1
...
@@ -2803,3 +2803,16 @@ SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessioni
...
@@ -2803,3 +2803,16 @@ SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessioni
ip count( e.itemid )
ip count( e.itemid )
10.10.10.1 1
10.10.10.1 1
drop tables t1,t2;
drop tables t1,t2;
CREATE TABLE t1 (EMPNUM CHAR(3));
CREATE TABLE t2 (EMPNUM CHAR(3) );
INSERT INTO t1 VALUES ('E1'),('E2');
INSERT INTO t2 VALUES ('E1');
DELETE FROM t1
WHERE t1.EMPNUM NOT IN
(SELECT t2.EMPNUM
FROM t2
WHERE t1.EMPNUM = t2.EMPNUM);
select * from t1;
EMPNUM
E1
DROP TABLE t1,t2;
mysql-test/t/subselect.test
View file @
f5f92ce1
...
@@ -1828,11 +1828,12 @@ drop tables t1,t2;
...
@@ -1828,11 +1828,12 @@ drop tables t1,t2;
#
#
CREATE
TABLE
t1
(
EMPNUM
CHAR
(
3
));
CREATE
TABLE
t1
(
EMPNUM
CHAR
(
3
));
CREATE
TABLE
t2
(
EMPNUM
CHAR
(
3
)
);
CREATE
TABLE
t2
(
EMPNUM
CHAR
(
3
)
);
INSERT
INTO
t1
VALUES
(
'E1'
);
INSERT
INTO
t1
VALUES
(
'E1'
)
,(
'E2'
)
;
INSERT
INTO
t2
VALUES
(
'E1'
);
INSERT
INTO
t2
VALUES
(
'E1'
);
DELETE
FROM
t1
DELETE
FROM
t1
WHERE
t1
.
EMPNUM
NOT
IN
WHERE
t1
.
EMPNUM
NOT
IN
(
SELECT
t2
.
EMPNUM
(
SELECT
t2
.
EMPNUM
FROM
t2
FROM
t2
WHERE
t1
.
EMPNUM
=
t2
.
EMPNUM
);
WHERE
t1
.
EMPNUM
=
t2
.
EMPNUM
);
select
*
from
t1
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
ndb/src/ndbapi/Ndb.cpp
View file @
f5f92ce1
...
@@ -230,9 +230,10 @@ Remark: Disconnect all connections to the database.
...
@@ -230,9 +230,10 @@ Remark: Disconnect all connections to the database.
void
void
Ndb
::
doDisconnect
()
Ndb
::
doDisconnect
()
{
{
DBUG_ENTER
(
"Ndb::doDisconnect"
);
NdbTransaction
*
tNdbCon
;
NdbTransaction
*
tNdbCon
;
CHECK_STATUS_MACRO_VOID
;
CHECK_STATUS_MACRO_VOID
;
/* DBUG_ENTER must be after CHECK_STATUS_MACRO_VOID because of 'return' */
DBUG_ENTER
(
"Ndb::doDisconnect"
);
Uint32
tNoOfDbNodes
=
theImpl
->
theNoOfDBnodes
;
Uint32
tNoOfDbNodes
=
theImpl
->
theNoOfDBnodes
;
Uint8
*
theDBnodes
=
theImpl
->
theDBnodes
;
Uint8
*
theDBnodes
=
theImpl
->
theDBnodes
;
...
...
sql/field_conv.cc
View file @
f5f92ce1
...
@@ -605,6 +605,10 @@ void field_conv(Field *to,Field *from)
...
@@ -605,6 +605,10 @@ void field_conv(Field *to,Field *from)
to
->
type
()
!=
FIELD_TYPE_DATE
&&
to
->
type
()
!=
FIELD_TYPE_DATE
&&
to
->
type
()
!=
FIELD_TYPE_DATETIME
))
to
->
type
()
!=
FIELD_TYPE_DATETIME
))
{
// Identical fields
{
// Identical fields
#ifdef HAVE_purify
/* This may happen if one does 'UPDATE ... SET x=x' */
if
(
to
->
ptr
!=
from
->
ptr
)
#endif
memcpy
(
to
->
ptr
,
from
->
ptr
,
to
->
pack_length
());
memcpy
(
to
->
ptr
,
from
->
ptr
,
to
->
pack_length
());
return
;
return
;
}
}
...
...
sql/item_sum.cc
View file @
f5f92ce1
...
@@ -584,13 +584,8 @@ bool Item_sum_distinct::setup(THD *thd)
...
@@ -584,13 +584,8 @@ bool Item_sum_distinct::setup(THD *thd)
{
{
List
<
create_field
>
field_list
;
List
<
create_field
>
field_list
;
create_field
field_def
;
/* field definition */
create_field
field_def
;
/* field definition */
DBUG_ENTER
(
"Item_sum_distinct::setup"
);
DBUG_ENTER
(
"Item_sum_distinct::setup"
);
DBUG_ASSERT
(
tree
==
0
);
/*
Setup can be called twice for ROLLUP items. This is a bug.
Please add DBUG_ASSERT(tree == 0) here when it's fixed.
*/
/*
/*
Virtual table and the tree are created anew on each re-execution of
Virtual table and the tree are created anew on each re-execution of
...
...
sql/sql_delete.cc
View file @
f5f92ce1
...
@@ -48,7 +48,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
...
@@ -48,7 +48,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
{
my_error
(
ER_VIEW_DELETE_MERGE_VIEW
,
MYF
(
0
),
my_error
(
ER_VIEW_DELETE_MERGE_VIEW
,
MYF
(
0
),
table_list
->
view_db
.
str
,
table_list
->
view_name
.
str
);
table_list
->
view_db
.
str
,
table_list
->
view_name
.
str
);
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
TRUE
);
}
}
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
);
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
);
thd
->
proc_info
=
"init"
;
thd
->
proc_info
=
"init"
;
...
...
sql/sql_parse.cc
View file @
f5f92ce1
...
@@ -1270,8 +1270,10 @@ void free_items(Item *item)
...
@@ -1270,8 +1270,10 @@ void free_items(Item *item)
void
cleanup_items
(
Item
*
item
)
void
cleanup_items
(
Item
*
item
)
{
{
DBUG_ENTER
(
"cleanup_items"
);
for
(;
item
;
item
=
item
->
next
)
for
(;
item
;
item
=
item
->
next
)
item
->
cleanup
();
item
->
cleanup
();
DBUG_VOID_RETURN
;
}
}
int
mysql_table_dump
(
THD
*
thd
,
char
*
db
,
char
*
tbl_name
,
int
fd
)
int
mysql_table_dump
(
THD
*
thd
,
char
*
db
,
char
*
tbl_name
,
int
fd
)
...
...
sql/sql_select.cc
View file @
f5f92ce1
...
@@ -12659,8 +12659,10 @@ static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr)
...
@@ -12659,8 +12659,10 @@ static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr)
Item_sum
*
func
;
Item_sum
*
func
;
DBUG_ENTER
(
"setup_sum_funcs"
);
DBUG_ENTER
(
"setup_sum_funcs"
);
while
((
func
=
*
(
func_ptr
++
)))
while
((
func
=
*
(
func_ptr
++
)))
{
if
(
func
->
setup
(
thd
))
if
(
func
->
setup
(
thd
))
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
...
@@ -12947,8 +12949,6 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
...
@@ -12947,8 +12949,6 @@ bool JOIN::rollup_make_fields(List<Item> &fields_arg, List<Item> &sel_fields,
*/
*/
item
=
item
->
copy_or_same
(
thd
);
item
=
item
->
copy_or_same
(
thd
);
((
Item_sum
*
)
item
)
->
make_unique
();
((
Item_sum
*
)
item
)
->
make_unique
();
if
(((
Item_sum
*
)
item
)
->
setup
(
thd
))
return
1
;
*
(
*
func
)
=
(
Item_sum
*
)
item
;
*
(
*
func
)
=
(
Item_sum
*
)
item
;
(
*
func
)
++
;
(
*
func
)
++
;
}
}
...
...
strings/my_vsnprintf.c
View file @
f5f92ce1
...
@@ -135,6 +135,16 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
...
@@ -135,6 +135,16 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
to
+=
res_length
;
to
+=
res_length
;
continue
;
continue
;
}
}
else
if
(
*
fmt
==
'c'
)
/* Character parameter */
{
register
int
larg
;
if
(
to
==
end
)
break
;
larg
=
va_arg
(
ap
,
int
);
*
to
++=
(
char
)
larg
;
continue
;
}
/* We come here on '%%', unknown code or too long parameter */
/* We come here on '%%', unknown code or too long parameter */
if
(
to
==
end
)
if
(
to
==
end
)
break
;
break
;
...
...
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