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
24dd50e4
Commit
24dd50e4
authored
Nov 09, 2002
by
walrus@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge akishkin@work.mysql.com:/home/bk/mysql
into mysql.com:/home/walrus/bk/323
parents
b5a740d0
5d2f8e96
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
8 deletions
+71
-8
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+19
-4
mysql-test/r/merge.result
mysql-test/r/merge.result
+6
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+19
-0
sql/ha_myisammrg.cc
sql/ha_myisammrg.cc
+22
-1
sql/sql_select.cc
sql/sql_select.cc
+5
-3
No files found.
innobase/row/row0mysql.c
View file @
24dd50e4
...
...
@@ -1000,8 +1000,8 @@ row_update_cascade_for_mysql(
or set null operation */
dict_table_t
*
table
)
/* in: table where we do the operation */
{
ulint
err
;
trx_t
*
trx
;
ulint
err
;
trx_t
*
trx
;
trx
=
thr_get_trx
(
thr
);
run_again:
...
...
@@ -1012,11 +1012,26 @@ run_again:
err
=
trx
->
error_state
;
/* Note that the cascade node is a subnode of another InnoDB
query graph node. We do a normal lock wait in this node, but
all errors are handled by the parent node. */
if
(
err
==
DB_LOCK_WAIT
)
{
que_thr_stop_for_mysql
(
thr
);
/* Handle lock wait here */
row_mysql_handle_errors
(
&
err
,
trx
,
thr
,
NULL
);
que_thr_stop_for_mysql
(
thr
);
srv_suspend_mysql_thread
(
thr
);
/* Note that a lock wait may also end in a lock wait timeout */
if
(
trx
->
error_state
!=
DB_SUCCESS
)
{
return
(
trx
->
error_state
);
}
/* Retry operation after a normal lock wait */
goto
run_again
;
}
...
...
mysql-test/r/merge.result
View file @
24dd50e4
...
...
@@ -130,3 +130,9 @@ a
a b
1 1
1 2
a
1
2
a
1
2
mysql-test/t/merge.test
View file @
24dd50e4
...
...
@@ -114,3 +114,22 @@ insert into t2 values (1,1),(2,2),(0,0),(4,4),(5,5),(6,6);
flush
tables
;
select
*
from
t3
where
a
=
1
order
by
b
limit
2
;
drop
table
t3
,
t1
,
t2
;
#
# temporary merge tables
#
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
;
create
table
t1
(
a
int
not
null
);
create
table
t2
(
a
int
not
null
);
insert
into
t1
values
(
1
);
insert
into
t2
values
(
2
);
create
temporary
table
t3
(
a
int
not
null
)
TYPE
=
MERGE
UNION
=
(
t1
,
t2
);
select
*
from
t3
;
create
temporary
table
t4
(
a
int
not
null
);
create
temporary
table
t5
(
a
int
not
null
);
insert
into
t4
values
(
1
);
insert
into
t5
values
(
2
);
create
temporary
table
t6
(
a
int
not
null
)
TYPE
=
MERGE
UNION
=
(
t4
,
t5
);
select
*
from
t6
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
;
sql/ha_myisammrg.cc
View file @
24dd50e4
...
...
@@ -264,7 +264,28 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
sizeof
(
char
*
))))
DBUG_RETURN
(
1
);
for
(
pos
=
table_names
;
tables
;
tables
=
tables
->
next
)
*
pos
++=
tables
->
real_name
;
{
char
*
table_name
;
if
(
create_info
->
options
&
HA_LEX_CREATE_TMP_TABLE
)
{
TABLE
**
tbl
=
find_temporary_table
(
current_thd
,
tables
->
db
,
tables
->
real_name
);
if
(
!
tbl
)
{
table_name
=
sql_alloc
(
1
+
my_snprintf
(
buff
,
FN_REFLEN
,
"%s/%s/%s"
,
mysql_real_data_home
,
tables
->
db
,
tables
->
real_name
));
if
(
!
table_name
)
DBUG_RETURN
(
1
);
strcpy
(
table_name
,
buff
);
}
else
table_name
=
(
*
tbl
)
->
path
;
}
else
table_name
=
tables
->
real_name
;
*
pos
++=
table_name
;
}
*
pos
=
0
;
DBUG_RETURN
(
myrg_create
(
fn_format
(
buff
,
name
,
""
,
""
,
2
+
4
+
16
),
(
const
char
**
)
table_names
,
(
my_bool
)
0
));
...
...
sql/sql_select.cc
View file @
24dd50e4
...
...
@@ -1371,15 +1371,15 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
*
arg1
=
(
Item_func
*
)(
func
->
arguments
()[
1
]);
if
((
functype
==
Item_func
::
GE_FUNC
||
functype
==
Item_func
::
GT_FUNC
)
&&
arg0
->
type
()
==
Item
::
FUNC_ITEM
&&
arg0
->
type
()
==
Item
::
FUNC_ITEM
&&
arg0
->
functype
()
==
Item_func
::
FT_FUNC
&&
arg1
->
const_item
()
&&
arg1
->
val
()
>
=
0
)
arg1
->
const_item
()
&&
arg1
->
val
()
>
0
)
cond_func
=
(
Item_func_match
*
)
arg0
;
else
if
((
functype
==
Item_func
::
LE_FUNC
||
functype
==
Item_func
::
LT_FUNC
)
&&
arg1
->
type
()
==
Item
::
FUNC_ITEM
&&
arg1
->
functype
()
==
Item_func
::
FT_FUNC
&&
arg0
->
const_item
()
&&
arg0
->
val
()
>
=
0
)
arg0
->
const_item
()
&&
arg0
->
val
()
>
0
)
cond_func
=
(
Item_func_match
*
)
arg1
;
}
}
...
...
@@ -4970,6 +4970,8 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
}
else
{
if
(
end_of_records
)
DBUG_RETURN
(
0
);
join
->
first_record
=
1
;
VOID
(
test_if_group_changed
(
join
->
group_fields
));
}
...
...
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