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
c3db30b5
Commit
c3db30b5
authored
Apr 11, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Two bug fixes
parent
4644cefd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+10
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+5
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-0
sql/sql_update.cc
sql/sql_update.cc
+7
-0
No files found.
mysql-test/r/innodb.result
View file @
c3db30b5
...
...
@@ -1207,6 +1207,16 @@ SET AUTOCOMMIT=0;
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
ROLLBACK;
Warning: Some non-transactional changed tables couldn't be rolled back
SELECT * FROM t1;
B_ID
drop table t1,t2;
create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) type = innodb;
insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2);
select distinct parent,child from t1 order by parent;
parent child
0 4
1 2
1 3
2 1
drop table t1;
mysql-test/t/innodb.test
View file @
c3db30b5
...
...
@@ -802,6 +802,11 @@ CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) TYPE=InnoDB;
SET
AUTOCOMMIT
=
0
;
INSERT
INTO
t1
(
B_ID
)
VALUES
(
1
);
INSERT
INTO
t2
(
NEXT_T
)
VALUES
(
1
);
--
error
1196
ROLLBACK
;
SELECT
*
FROM
t1
;
drop
table
t1
,
t2
;
create
table
t1
(
pk
int
primary
key
,
parent
int
not
null
,
child
int
not
null
,
index
(
parent
)
)
type
=
innodb
;
insert
into
t1
values
(
1
,
0
,
4
),
(
2
,
1
,
3
),
(
3
,
2
,
1
),
(
4
,
1
,
2
);
select
distinct
parent
,
child
from
t1
order
by
parent
;
drop
table
t1
;
sql/sql_select.cc
View file @
c3db30b5
...
...
@@ -555,6 +555,8 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
/* Change DISTINCT to GROUP BY */
select_distinct
=
0
;
no_order
=
!
order
;
if
(
order
&&
skip_sort_order
)
join
.
tmp_table_param
.
quick_group
=
0
;
if
(
all_order_fields_used
)
order
=
0
;
join
.
group
=
1
;
// For end_write_group
...
...
sql/sql_update.cc
View file @
c3db30b5
...
...
@@ -478,7 +478,14 @@ int multi_update::prepare(List<Item> ¬_used_values)
table
->
used_keys
=
0
;
table
->
pos_in_table_list
=
tl
;
}
else
{
table_ref
->
lock_type
=
TL_READ
;
mysql_unlock_some_tables
(
thd
,
&
table
,
1
);
}
}
table_count
=
update
.
elements
;
update_tables
=
(
TABLE_LIST
*
)
update
.
first
;
...
...
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