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
b1c8e44e
Commit
b1c8e44e
authored
Apr 21, 2005
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
5ed49fbf
e0fe3e75
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
63 additions
and
19 deletions
+63
-19
libmysql/libmysql.c
libmysql/libmysql.c
+1
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+1
-0
mysql-test/t/ndb_autodiscover.test
mysql-test/t/ndb_autodiscover.test
+1
-0
mysql-test/t/ndb_autodiscover2.test
mysql-test/t/ndb_autodiscover2.test
+1
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+1
-0
mysql-test/t/ndb_blob.test
mysql-test/t/ndb_blob.test
+1
-0
mysql-test/t/ndb_cache.test
mysql-test/t/ndb_cache.test
+1
-0
mysql-test/t/ndb_charset.test
mysql-test/t/ndb_charset.test
+1
-0
mysql-test/t/ndb_index.test
mysql-test/t/ndb_index.test
+1
-0
mysql-test/t/ndb_index_ordered.test
mysql-test/t/ndb_index_ordered.test
+1
-0
mysql-test/t/ndb_index_unique.test
mysql-test/t/ndb_index_unique.test
+1
-0
mysql-test/t/ndb_insert.test
mysql-test/t/ndb_insert.test
+1
-0
mysql-test/t/ndb_limit.test
mysql-test/t/ndb_limit.test
+1
-0
mysql-test/t/ndb_lock.test
mysql-test/t/ndb_lock.test
+1
-0
mysql-test/t/ndb_minmax.test
mysql-test/t/ndb_minmax.test
+1
-0
mysql-test/t/ndb_multi.test
mysql-test/t/ndb_multi.test
+1
-0
mysql-test/t/ndb_replace.test
mysql-test/t/ndb_replace.test
+1
-0
mysql-test/t/ndb_restore.test
mysql-test/t/ndb_restore.test
+1
-0
mysql-test/t/ndb_subquery.test
mysql-test/t/ndb_subquery.test
+1
-0
mysql-test/t/ndb_transaction.test
mysql-test/t/ndb_transaction.test
+1
-0
mysql-test/t/ndb_truncate.test
mysql-test/t/ndb_truncate.test
+1
-0
mysql-test/t/ndb_types.test
mysql-test/t/ndb_types.test
+1
-0
mysql-test/t/ndb_update.test
mysql-test/t/ndb_update.test
+13
-3
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+0
-1
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+4
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+24
-15
No files found.
libmysql/libmysql.c
View file @
b1c8e44e
...
@@ -187,6 +187,7 @@ void STDCALL mysql_server_end()
...
@@ -187,6 +187,7 @@ void STDCALL mysql_server_end()
else
else
mysql_thread_end
();
mysql_thread_end
();
finish_client_errs
();
finish_client_errs
();
free_charsets
();
mysql_client_init
=
org_my_init_done
=
0
;
mysql_client_init
=
org_my_init_done
=
0
;
}
}
...
...
mysql-test/t/ndb_alter_table.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_multi_ndb
.
inc
--
source
include
/
have_multi_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
...
...
mysql-test/t/ndb_autodiscover.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
...
...
mysql-test/t/ndb_autodiscover2.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
#
#
# Simple test to show use of discover when the server has been restarted
# Simple test to show use of discover when the server has been restarted
...
...
mysql-test/t/ndb_basic.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
...
...
mysql-test/t/ndb_blob.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysql-test/t/ndb_cache.test
View file @
b1c8e44e
--
source
include
/
have_query_cache
.
inc
--
source
include
/
have_query_cache
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysql-test/t/ndb_charset.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysql-test/t/ndb_index.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysql-test/t/ndb_index_ordered.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
test1
,
test2
;
drop
table
if
exists
t1
,
test1
,
test2
;
...
...
mysql-test/t/ndb_index_unique.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
;
...
...
mysql-test/t/ndb_insert.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
...
...
mysql-test/t/ndb_limit.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t2
;
DROP
TABLE
IF
EXISTS
t2
;
...
...
mysql-test/t/ndb_lock.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
connect
(
con1
,
localhost
,
root
,,);
connect
(
con1
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
connect
(
con2
,
localhost
,
root
,,);
...
...
mysql-test/t/ndb_minmax.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
...
...
mysql-test/t/ndb_multi.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_multi_ndb
.
inc
--
source
include
/
have_multi_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
...
...
mysql-test/t/ndb_replace.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
#
#
# Test of REPLACE with NDB
# Test of REPLACE with NDB
...
...
mysql-test/t/ndb_restore.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
ndb_default_cluster
.
inc
--
source
include
/
ndb_default_cluster
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
use
test
;
use
test
;
...
...
mysql-test/t/ndb_subquery.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysql-test/t/ndb_transaction.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
;
...
...
mysql-test/t/ndb_truncate.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t2
;
DROP
TABLE
IF
EXISTS
t2
;
...
...
mysql-test/t/ndb_types.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
...
...
mysql-test/t/ndb_update.test
View file @
b1c8e44e
--
source
include
/
have_ndb
.
inc
--
source
include
/
have_ndb
.
inc
--
source
include
/
not_embedded
.
inc
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
...
@@ -14,11 +15,20 @@ DROP TABLE IF EXISTS t1;
...
@@ -14,11 +15,20 @@ DROP TABLE IF EXISTS t1;
CREATE
TABLE
t1
(
CREATE
TABLE
t1
(
pk1
INT
NOT
NULL
PRIMARY
KEY
,
pk1
INT
NOT
NULL
PRIMARY
KEY
,
b
INT
NOT
NULL
,
b
INT
NOT
NULL
,
c
INT
NOT
NULL
c
INT
NOT
NULL
UNIQUE
)
ENGINE
=
ndbcluster
;
)
ENGINE
=
ndbcluster
;
INSERT
INTO
t1
VALUES
(
0
,
0
,
1
),(
1
,
1
,
2
),(
2
,
2
,
3
);
INSERT
INTO
t1
VALUES
(
0
,
1
,
0
),(
1
,
2
,
1
),(
2
,
3
,
2
);
UPDATE
t1
set
b
=
c
;
UPDATE
t1
set
b
=
c
;
select
*
from
t1
order
by
pk1
;
select
*
from
t1
order
by
pk1
;
UPDATE
t1
set
pk1
=
4
where
pk1
=
1
;
select
*
from
t1
order
by
pk1
;
--
error
1062
UPDATE
t1
set
pk1
=
1
,
c
=
2
where
pk1
=
4
;
select
*
from
t1
order
by
pk1
;
UPDATE
t1
set
pk1
=
pk1
+
10
;
select
*
from
t1
order
by
pk1
;
drop
table
t1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
b1c8e44e
...
@@ -1879,7 +1879,6 @@ void Dbtc::execKEYINFO(Signal* signal)
...
@@ -1879,7 +1879,6 @@ void Dbtc::execKEYINFO(Signal* signal)
do
{
do
{
if
(
cfirstfreeDatabuf
==
RNIL
)
{
if
(
cfirstfreeDatabuf
==
RNIL
)
{
jam
();
jam
();
abort
();
seizeDatabuferrorLab
(
signal
);
seizeDatabuferrorLab
(
signal
);
return
;
return
;
}
//if
}
//if
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
b1c8e44e
...
@@ -160,6 +160,10 @@ setSignalLog(){
...
@@ -160,6 +160,10 @@ setSignalLog(){
}
else
if
(
tmp
!=
0
){
}
else
if
(
tmp
!=
0
){
if
(
strcmp
(
tmp
,
"-"
)
==
0
)
if
(
strcmp
(
tmp
,
"-"
)
==
0
)
signalLogger
.
setOutputStream
(
stdout
);
signalLogger
.
setOutputStream
(
stdout
);
#ifndef DBUG_OFF
else
if
(
strcmp
(
tmp
,
"+"
)
==
0
)
signalLogger
.
setOutputStream
(
DBUG_FILE
);
#endif
else
else
signalLogger
.
setOutputStream
(
fopen
(
tmp
,
"w"
));
signalLogger
.
setOutputStream
(
fopen
(
tmp
,
"w"
));
apiSignalLog
=
tmp
;
apiSignalLog
=
tmp
;
...
...
sql/ha_ndbcluster.cc
View file @
b1c8e44e
...
@@ -1957,8 +1957,10 @@ int ha_ndbcluster::write_row(byte *record)
...
@@ -1957,8 +1957,10 @@ int ha_ndbcluster::write_row(byte *record)
m_skip_auto_increment
=
!
auto_increment_column_changed
;
m_skip_auto_increment
=
!
auto_increment_column_changed
;
}
}
if
((
res
=
set_primary_key
(
op
)))
if
((
res
=
(
m_primary_key_update
?
return
res
;
set_primary_key_from_old_data
(
op
,
record
)
:
set_primary_key
(
op
))))
return
res
;
}
}
// Set non-key attribute(s)
// Set non-key attribute(s)
...
@@ -2098,7 +2100,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
...
@@ -2098,7 +2100,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
{
{
int
read_res
,
insert_res
,
delete_res
;
int
read_res
,
insert_res
,
delete_res
;
DBUG_PRINT
(
"info"
,
(
"primary key update, doing pk read+
insert+delete
"
));
DBUG_PRINT
(
"info"
,
(
"primary key update, doing pk read+
delete+insert
"
));
// Get all old fields, since we optimize away fields not in query
// Get all old fields, since we optimize away fields not in query
read_res
=
complemented_pk_read
(
old_data
,
new_data
);
read_res
=
complemented_pk_read
(
old_data
,
new_data
);
if
(
read_res
)
if
(
read_res
)
...
@@ -2106,15 +2108,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
...
@@ -2106,15 +2108,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
DBUG_PRINT
(
"info"
,
(
"pk read failed"
));
DBUG_PRINT
(
"info"
,
(
"pk read failed"
));
DBUG_RETURN
(
read_res
);
DBUG_RETURN
(
read_res
);
}
}
// Insert new row
insert_res
=
write_row
(
new_data
);
if
(
insert_res
)
{
DBUG_PRINT
(
"info"
,
(
"insert failed"
));
DBUG_RETURN
(
insert_res
);
}
// Delete old row
// Delete old row
DBUG_PRINT
(
"info"
,
(
"insert succeded"
));
m_primary_key_update
=
TRUE
;
m_primary_key_update
=
TRUE
;
delete_res
=
delete_row
(
old_data
);
delete_res
=
delete_row
(
old_data
);
m_primary_key_update
=
FALSE
;
m_primary_key_update
=
FALSE
;
...
@@ -2122,9 +2116,23 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
...
@@ -2122,9 +2116,23 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
{
{
DBUG_PRINT
(
"info"
,
(
"delete failed"
));
DBUG_PRINT
(
"info"
,
(
"delete failed"
));
// Undo write_row(new_data)
// Undo write_row(new_data)
DBUG_RETURN
(
delete_r
ow
(
new_data
)
);
DBUG_RETURN
(
delete_r
es
);
}
}
DBUG_PRINT
(
"info"
,
(
"insert+delete succeeded"
));
// Insert new row
DBUG_PRINT
(
"info"
,
(
"delete succeded"
));
insert_res
=
write_row
(
new_data
);
if
(
insert_res
)
{
DBUG_PRINT
(
"info"
,
(
"insert failed"
));
if
(
trans
->
commitStatus
()
==
NdbConnection
::
Started
)
{
m_primary_key_update
=
TRUE
;
insert_res
=
write_row
((
byte
*
)
old_data
);
m_primary_key_update
=
FALSE
;
}
DBUG_RETURN
(
insert_res
);
}
DBUG_PRINT
(
"info"
,
(
"delete+insert succeeded"
));
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -2226,8 +2234,9 @@ int ha_ndbcluster::delete_row(const byte *record)
...
@@ -2226,8 +2234,9 @@ int ha_ndbcluster::delete_row(const byte *record)
no_uncommitted_rows_update
(
-
1
);
no_uncommitted_rows_update
(
-
1
);
// If deleting from cursor, NoCommit will be handled in next_result
if
(
!
m_primary_key_update
)
DBUG_RETURN
(
0
);
// If deleting from cursor, NoCommit will be handled in next_result
DBUG_RETURN
(
0
);
}
}
else
else
{
{
...
...
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