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
910d5c3b
Commit
910d5c3b
authored
Jun 16, 2001
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
bk resolve changes
parents
96984728
6f5c7070
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
mysql-test/t/multi_update.test
mysql-test/t/multi_update.test
+20
-11
sql/sql_delete.cc
sql/sql_delete.cc
+5
-2
sql/sql_parse.cc
sql/sql_parse.cc
+6
-0
No files found.
mysql-test/t/multi_update.test
View file @
910d5c3b
...
...
@@ -2,25 +2,34 @@ drop table if exists t1,t2,t3;
create
table
t1
(
id1
int
not
null
auto_increment
primary
key
,
t
char
(
12
));
create
table
t2
(
id2
int
not
null
,
t
char
(
12
),
index
(
id2
));
create
table
t3
(
id3
int
not
null
,
t
char
(
12
),
index
(
id3
));
let
$
1
=
3
;
let
$
1
=
10000
;
while
(
$
1
)
{
let
$
2
=
3
;
let
$
2
=
5
;
eval
insert
into
t1
(
t
)
values
(
'$1'
);
while
(
$
2
)
{
eval
insert
into
t2
(
id2
,
t
)
values
(
$
1
,
'$2'
);
eval
insert
into
t3
(
id3
,
t
)
values
(
$
1
,
'$2'
);
let
$
3
=
10
;
while
(
$
3
)
{
eval
insert
into
t3
(
id3
,
t
)
values
(
$
1
,
'$2'
);
dec
$
3
;
}
dec
$
2
;
}
dec
$
1
;
}
delete
t1
.*
,
t2
.*
from
t1
,
t2
where
t1
.
id1
=
t2
.
id2
and
t1
.
id1
=
3
;
delete
t3
from
t3
left
join
t1
on
(
id1
=
id3
)
where
t1
.
id1
is
null
;
delete
t2
from
t1
,
t2
,
t3
where
id1
=
id2
and
id2
=
id3
and
id1
=
2
;
select
*
from
t1
;
select
*
from
t2
;
select
*
from
t3
;
delete
t1
,
t2
from
t1
,
t2
where
1
;
drop
table
t1
,
t2
,
t3
;
delete
t1
.*
,
t2
.*
,
t3
.*
from
t1
,
t2
,
t3
where
t1
.
id1
=
t2
.
id2
and
t2
.
id2
=
t3
.
id3
and
t1
.
id1
>
9500
;
check
table
t1
,
t2
,
t3
;
select
*
from
t1
where
id1
>
9500
;
select
*
from
t2
where
id2
>
9500
;
select
*
from
t3
where
id3
>
9500
;
delete
t1
,
t2
,
t3
from
t1
,
t2
,
t3
where
t1
.
id1
=
t2
.
id2
and
t2
.
id2
=
t3
.
id3
and
t1
.
id1
>
500
;
select
*
from
t1
where
id1
>
500
;
select
*
from
t2
where
id2
>
500
;
select
*
from
t3
where
id3
>
500
;
sql/sql_delete.cc
View file @
910d5c3b
...
...
@@ -383,7 +383,7 @@ multi_delete::~multi_delete()
if
(
tempfiles
[
counter
])
{
#ifdef SINISAS_STRIP
//
end_io_cache(tempfiles[counter]);
end_io_cache
(
tempfiles
[
counter
]);
#else
delete
tempfiles
[
counter
];
#endif
...
...
@@ -594,12 +594,15 @@ static IO_CACHE *strip_duplicates_from_temp (byte *memory_lane, IO_CACHE *ptr, u
int
read_error
,
write_error
,
how_many_to_read
,
total_to_read
=
*
written
,
pieces_in_memory
=
0
,
mem_count
,
written_rows
;
int
offset
=
written_rows
=*
written
=
0
;
int
mem_pool_size
=
MEM_STRIP_BUF_SIZE
*
MAX_REFLENGTH
/
ref_length
;
IO_CACHE
*
tempptr
=
(
IO_CACHE
*
)
sql_alloc
(
sizeof
(
IO_CACHE
));
byte
dup_record
[
MAX_REFLENGTH
];
memset
(
dup_record
,
'\xFF'
,
MAX_REFLENGTH
);
if
(
reinit_io_cache
(
ptr
,
READ_CACHE
,
0L
,
0
,
0
))
return
ptr
;
IO_CACHE
*
tempptr
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
MYF
(
MY_FAE
|
MY_ZEROFILL
));
if
(
open_cached_file
(
tempptr
,
mysql_tmpdir
,
TEMP_PREFIX
,
DISK_BUFFER_SIZE
,
MYF
(
MY_WME
)))
{
my_free
((
gptr
)
tempptr
,
MYF
(
0
));
return
ptr
;
}
DYNAMIC_ARRAY
written_blocks
;
VOID
(
init_dynamic_array
(
&
written_blocks
,
sizeof
(
struct
written_block
),
20
,
50
));
for
(;
pieces_in_memory
<
total_to_read
;)
...
...
sql/sql_parse.cc
View file @
910d5c3b
...
...
@@ -2438,6 +2438,12 @@ mysql_new_select(LEX *lex)
SELECT_LEX
*
select_lex
=
(
SELECT_LEX
*
)
sql_calloc
(
sizeof
(
SELECT_LEX
));
lex
->
select
->
next
=
select_lex
;
lex
->
select
=
select_lex
;
lex
->
select
->
select_number
=
++
select_no
;
lex
->
select
->
item_list
=
lex
->
select_lex
.
item_list
;
lex
->
select
->
item_list
.
empty
();
lex
->
select
->
table_list
=
lex
->
select_lex
.
table_list
;
lex
->
select
->
table_list
.
elements
=
0
;
lex
->
select
->
table_list
.
first
=
0
;
lex
->
select
->
table_list
.
next
=
(
byte
**
)
&
lex
->
select
->
table_list
.
first
;
}
void
...
...
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