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
d8a4aafe
Commit
d8a4aafe
authored
Jan 06, 2006
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-5.0-14212
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
be8f21e8
d07a57c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
7 deletions
+24
-7
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+5
-0
mysql-test/t/bdb.test
mysql-test/t/bdb.test
+9
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+8
-6
sql/handler.cc
sql/handler.cc
+2
-1
No files found.
mysql-test/r/bdb.result
View file @
d8a4aafe
...
@@ -1923,4 +1923,9 @@ d varchar(255) character set utf8,
...
@@ -1923,4 +1923,9 @@ d varchar(255) character set utf8,
e varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=bdb;
key (a,b,c,d,e)) engine=bdb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
ERROR 42000: Specified key was too long; max key length is 3072 bytes
set autocommit=0;
create table t1 (a int) engine=bdb;
commit;
alter table t1 add primary key(a);
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/bdb.test
View file @
d8a4aafe
...
@@ -1010,4 +1010,13 @@ create table t1 (a varchar(255) character set utf8,
...
@@ -1010,4 +1010,13 @@ create table t1 (a varchar(255) character set utf8,
e
varchar
(
255
)
character
set
utf8
,
e
varchar
(
255
)
character
set
utf8
,
key
(
a
,
b
,
c
,
d
,
e
))
engine
=
bdb
;
key
(
a
,
b
,
c
,
d
,
e
))
engine
=
bdb
;
#
# Bug #14212: Server crash after COMMIT + ALTER TABLE
#
set
autocommit
=
0
;
create
table
t1
(
a
int
)
engine
=
bdb
;
commit
;
alter
table
t1
add
primary
key
(
a
);
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
sql/ha_ndbcluster.cc
View file @
d8a4aafe
...
@@ -3256,6 +3256,10 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3256,6 +3256,10 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
if
(
lock_type
!=
F_UNLCK
)
if
(
lock_type
!=
F_UNLCK
)
{
{
DBUG_PRINT
(
"info"
,
(
"lock_type != F_UNLCK"
));
DBUG_PRINT
(
"info"
,
(
"lock_type != F_UNLCK"
));
if
(
!
thd
->
transaction
.
on
)
m_transaction_on
=
FALSE
;
else
m_transaction_on
=
thd
->
variables
.
ndb_use_transactions
;
if
(
!
thd_ndb
->
lock_count
++
)
if
(
!
thd_ndb
->
lock_count
++
)
{
{
PRINT_OPTION_FLAGS
(
thd
);
PRINT_OPTION_FLAGS
(
thd
);
...
@@ -3270,7 +3274,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3270,7 +3274,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
ERR_RETURN
(
ndb
->
getNdbError
());
ERR_RETURN
(
ndb
->
getNdbError
());
no_uncommitted_rows_reset
(
thd
);
no_uncommitted_rows_reset
(
thd
);
thd_ndb
->
stmt
=
trans
;
thd_ndb
->
stmt
=
trans
;
trans_register_ha
(
thd
,
FALSE
,
&
ndbcluster_hton
);
if
(
m_transaction_on
)
trans_register_ha
(
thd
,
FALSE
,
&
ndbcluster_hton
);
}
}
else
else
{
{
...
@@ -3285,7 +3290,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3285,7 +3290,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
ERR_RETURN
(
ndb
->
getNdbError
());
ERR_RETURN
(
ndb
->
getNdbError
());
no_uncommitted_rows_reset
(
thd
);
no_uncommitted_rows_reset
(
thd
);
thd_ndb
->
all
=
trans
;
thd_ndb
->
all
=
trans
;
trans_register_ha
(
thd
,
TRUE
,
&
ndbcluster_hton
);
if
(
m_transaction_on
)
trans_register_ha
(
thd
,
TRUE
,
&
ndbcluster_hton
);
/*
/*
If this is the start of a LOCK TABLE, a table look
If this is the start of a LOCK TABLE, a table look
...
@@ -3319,10 +3325,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -3319,10 +3325,6 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
m_ha_not_exact_count
=
!
thd
->
variables
.
ndb_use_exact_count
;
m_ha_not_exact_count
=
!
thd
->
variables
.
ndb_use_exact_count
;
m_autoincrement_prefetch
=
m_autoincrement_prefetch
=
(
ha_rows
)
thd
->
variables
.
ndb_autoincrement_prefetch_sz
;
(
ha_rows
)
thd
->
variables
.
ndb_autoincrement_prefetch_sz
;
if
(
!
thd
->
transaction
.
on
)
m_transaction_on
=
FALSE
;
else
m_transaction_on
=
thd
->
variables
.
ndb_use_transactions
;
m_active_trans
=
thd_ndb
->
all
?
thd_ndb
->
all
:
thd_ndb
->
stmt
;
m_active_trans
=
thd_ndb
->
all
?
thd_ndb
->
all
:
thd_ndb
->
stmt
;
DBUG_ASSERT
(
m_active_trans
);
DBUG_ASSERT
(
m_active_trans
);
...
...
sql/handler.cc
View file @
d8a4aafe
...
@@ -1926,7 +1926,8 @@ int ha_enable_transaction(THD *thd, bool on)
...
@@ -1926,7 +1926,8 @@ int ha_enable_transaction(THD *thd, bool on)
is an optimization hint that storage engine is free to ignore.
is an optimization hint that storage engine is free to ignore.
So, let's commit an open transaction (if any) now.
So, let's commit an open transaction (if any) now.
*/
*/
error
=
end_trans
(
thd
,
COMMIT
);
if
(
!
(
error
=
ha_commit_stmt
(
thd
)))
error
=
end_trans
(
thd
,
COMMIT
);
}
}
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
...
...
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