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
fd420f72
Commit
fd420f72
authored
Oct 04, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents
98fd1c32
16ab4447
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
32 deletions
+60
-32
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+5
-4
mysql-test/r/ndb_blob.result
mysql-test/r/ndb_blob.result
+5
-0
mysql-test/t/ndb_blob.test
mysql-test/t/ndb_blob.test
+5
-0
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+16
-6
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+10
-4
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+16
-13
sql/item.cc
sql/item.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+0
-2
sql/sql_show.cc
sql/sql_show.cc
+2
-2
No files found.
mysql-test/mysql-test-run.sh
View file @
fd420f72
...
...
@@ -942,13 +942,14 @@ start_ndbcluster()
NDBCLUSTER_OPTS
=
"--small"
fi
./ndb/ndbcluster
--port-base
=
$NDBCLUSTER_PORT
$NDBCLUSTER_OPTS
--diskless
--initial
--data-dir
=
$MYSQL_TEST_DIR
/var
||
exit
1
USE_NDBCLUSTER
=
"
$USE_NDBCLUSTER
--ndb-connectstring=
\"
host=localhost:
$NDBCLUSTER_PORT
\"
"
NDB_CONNECTSTRING
=
"host=localhost:
$NDBCLUSTER_PORT
"
else
USE_NDBCLUSTER
=
"
$USE_NDBCLUSTER
--ndb-connectstring=
\"
$USE_RUNNING_NDBCLUSTER
\"
"
echo
"Using ndbcluster at
$
USE_NDBCLUSTER
"
NDB_CONNECTSTRING
=
"
$USE_RUNNING_NDBCLUSTER
"
echo
"Using ndbcluster at
$
NDB_CONNECTSTRING
"
fi
USE_NDBCLUSTER
=
"
$USE_NDBCLUSTER
--ndb-connectstring=
\"
$NDB_CONNECTSTRING
\"
"
export
NDB_CONNECTSTRING
fi
}
stop_ndbcluster
()
...
...
mysql-test/r/ndb_blob.result
View file @
fd420f72
...
...
@@ -397,4 +397,9 @@ select * from t1 order by a;
a b
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
alter table t1 engine=myisam;
select * from t1 order by a;
a b
1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
drop table t1;
mysql-test/t/ndb_blob.test
View file @
fd420f72
...
...
@@ -309,6 +309,7 @@ select count(*) from t1;
drop
table
t1
;
drop
database
mysqltest
;
# bug #5349
set
autocommit
=
1
;
use
test
;
CREATE
TABLE
t1
(
...
...
@@ -325,4 +326,8 @@ INSERT INTO t1 VALUES
select
*
from
t1
order
by
a
;
alter
table
t1
engine
=
ndb
;
select
*
from
t1
order
by
a
;
# bug #5872
alter
table
t1
engine
=
myisam
;
select
*
from
t1
order
by
a
;
drop
table
t1
;
ndb/src/ndbapi/Ndb.cpp
View file @
fd420f72
...
...
@@ -329,7 +329,8 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
}
//if
{
NdbConnection
*
trans
=
startTransactionLocal
(
aPriority
,
nodeId
);
DBUG_PRINT
(
"exit"
,(
"start trans= 0x%x"
,
trans
));
DBUG_PRINT
(
"exit"
,(
"start trans: 0x%x transid: 0x%llx"
,
trans
,
trans
->
getTransactionId
()));
DBUG_RETURN
(
trans
);
}
}
else
{
...
...
@@ -350,6 +351,8 @@ Ndb::hupp(NdbConnection* pBuddyTrans)
{
DBUG_ENTER
(
"Ndb::hupp"
);
DBUG_PRINT
(
"enter"
,
(
"trans: 0x%x"
,
pBuddyTrans
));
Uint32
aPriority
=
0
;
if
(
pBuddyTrans
==
NULL
){
DBUG_RETURN
(
startTransaction
());
...
...
@@ -372,6 +375,8 @@ Ndb::hupp(NdbConnection* pBuddyTrans)
}
pCon
->
setTransactionId
(
pBuddyTrans
->
getTransactionId
());
pCon
->
setBuddyConPtr
((
Uint32
)
pBuddyTrans
->
getTC_ConnectPtr
());
DBUG_PRINT
(
"exit"
,
(
"hupp trans: 0x%x transid: 0x%llx"
,
pCon
,
pCon
?
pCon
->
getTransactionId
()
:
0
));
DBUG_RETURN
(
pCon
);
}
else
{
DBUG_RETURN
(
NULL
);
...
...
@@ -408,7 +413,10 @@ Ndb::startTransactionDGroup(Uint32 aPriority, const char * keyData, int type)
fragmentId
=
getFragmentId
(
hashValue
);
}
//if
Uint32
nodeId
=
guessPrimaryNode
(
fragmentId
);
return
startTransactionLocal
(
aPriority
,
nodeId
);
NdbConnection
*
trans
=
startTransactionLocal
(
aPriority
,
nodeId
);
DBUG_PRINT
(
"exit"
,
(
"start DGroup trans: 0x%x transid: 0x%llx"
,
trans
,
trans
?
trans
->
getTransactionId
()
:
0
));
return
trans
;
}
else
{
return
NULL
;
}
//if
...
...
@@ -455,7 +463,6 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId)
abort
();
}
#endif
DBUG_PRINT
(
"exit"
,
(
"transid= %lld"
,
tConnection
->
getTransactionId
()));
DBUG_RETURN
(
tConnection
);
}
//Ndb::startTransactionLocal()
...
...
@@ -469,9 +476,6 @@ void
Ndb
::
closeTransaction
(
NdbConnection
*
aConnection
)
{
DBUG_ENTER
(
"Ndb::closeTransaction"
);
DBUG_PRINT
(
"enter"
,(
"close trans= 0x%x, transid= %lld"
,
aConnection
,
aConnection
->
getTransactionId
()));
NdbConnection
*
tCon
;
NdbConnection
*
tPreviousCon
;
...
...
@@ -489,6 +493,12 @@ Ndb::closeTransaction(NdbConnection* aConnection)
tCon
=
theTransactionList
;
DBUG_PRINT
(
"info"
,(
"close trans: 0x%x transid: 0x%llx"
,
aConnection
,
aConnection
->
getTransactionId
()));
DBUG_PRINT
(
"info"
,(
"magic number: 0x%x TCConPtr: 0x%x theMyRef: 0x%x 0x%x"
,
aConnection
->
theMagicNumber
,
aConnection
->
theTCConPtr
,
aConnection
->
theMyRef
,
getReference
()));
if
(
aConnection
==
tCon
)
{
// Remove the active connection object
theTransactionList
=
tCon
->
next
();
// from the transaction list.
}
else
{
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
fd420f72
...
...
@@ -1691,6 +1691,8 @@ NdbDictInterface::execALTER_TABLE_REF(NdbApiSignal * signal,
int
NdbDictionaryImpl
::
dropTable
(
const
char
*
name
)
{
DBUG_ENTER
(
"NdbDictionaryImpl::dropTable"
);
DBUG_PRINT
(
"enter"
,(
"name: %s"
,
name
));
NdbTableImpl
*
tab
=
getTable
(
name
);
if
(
tab
==
0
){
return
-
1
;
...
...
@@ -1701,15 +1703,16 @@ NdbDictionaryImpl::dropTable(const char * name)
if
(
ret
==
INCOMPATIBLE_VERSION
)
{
const
char
*
internalTableName
=
m_ndb
.
internalizeTableName
(
name
);
DBUG_PRINT
(
"info"
,(
"INCOMPATIBLE_VERSION internal_name: %s"
,
internalTableName
));
m_localHash
.
drop
(
internalTableName
);
m_globalHash
->
lock
();
m_globalHash
->
drop
(
tab
);
m_globalHash
->
unlock
();
return
dropTable
(
name
);
DBUG_RETURN
(
dropTable
(
name
)
);
}
return
ret
;
DBUG_RETURN
(
ret
)
;
}
int
...
...
@@ -1763,6 +1766,7 @@ NdbDictionaryImpl::dropTable(NdbTableImpl & impl)
int
NdbDictionaryImpl
::
dropBlobTables
(
NdbTableImpl
&
t
)
{
DBUG_ENTER
(
"NdbDictionaryImpl::dropBlobTables"
);
for
(
unsigned
i
=
0
;
i
<
t
.
m_columns
.
size
();
i
++
)
{
NdbColumnImpl
&
c
=
*
t
.
m_columns
[
i
];
if
(
!
c
.
getBlobType
()
||
c
.
getPartSize
()
==
0
)
...
...
@@ -1771,11 +1775,13 @@ NdbDictionaryImpl::dropBlobTables(NdbTableImpl & t)
NdbBlob
::
getBlobTableName
(
btname
,
&
t
,
&
c
);
if
(
dropTable
(
btname
)
!=
0
)
{
if
(
m_error
.
code
!=
709
){
return
-
1
;
DBUG_PRINT
(
"exit"
,(
"error %u - exiting"
,
m_error
.
code
));
DBUG_RETURN
(
-
1
);
}
DBUG_PRINT
(
"info"
,(
"error %u - continuing"
,
m_error
.
code
));
}
}
return
0
;
DBUG_RETURN
(
0
)
;
}
int
...
...
sql/ha_ndbcluster.cc
View file @
fd420f72
...
...
@@ -1195,18 +1195,21 @@ inline int ha_ndbcluster::next_result(byte *buf)
be sent to NDB
*/
DBUG_PRINT
(
"info"
,
(
"ops_pending: %d"
,
ops_pending
));
if
(
ops_pending
)
{
if
(
current_thd
->
transaction
.
on
)
{
if
(
ops_pending
&&
(
execute_no_commit
(
this
,
trans
)
!=
0
)
)
if
(
execute_no_commit
(
this
,
trans
)
!=
0
)
DBUG_RETURN
(
ndb_err
(
trans
));
}
else
{
if
(
ops_pending
&&
(
execute_commit
(
this
,
trans
)
!=
0
)
)
if
(
execute_commit
(
this
,
trans
)
!=
0
)
DBUG_RETURN
(
ndb_err
(
trans
));
trans
->
restart
(
);
DBUG_ASSERT
(
trans
->
restart
()
==
0
);
}
ops_pending
=
0
;
}
contact_ndb
=
(
check
==
2
);
}
...
...
@@ -1641,7 +1644,7 @@ int ha_ndbcluster::write_row(byte *record)
no_uncommitted_rows_execute_failure
();
DBUG_RETURN
(
ndb_err
(
trans
));
}
trans
->
restart
(
);
DBUG_ASSERT
(
trans
->
restart
()
==
0
);
}
}
if
((
has_auto_increment
)
&&
(
skip_auto_increment
))
...
...
@@ -2278,7 +2281,7 @@ int ha_ndbcluster::rnd_init(bool scan)
{
if
(
!
scan
)
DBUG_RETURN
(
1
);
cursor
->
restart
();
DBUG_ASSERT
(
cursor
->
restart
()
==
0
);
}
index_init
(
table
->
primary_key
);
DBUG_RETURN
(
0
);
...
...
sql/item.cc
View file @
fd420f72
...
...
@@ -1999,7 +1999,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
}
else
if
(
tmp
!=
not_found_field
)
{
ref
=
0
;
// To prevent "delete *ref;" on ~Item_
er
f() of this item
ref
=
0
;
// To prevent "delete *ref;" on ~Item_
re
f() of this item
Item_field
*
fld
;
if
(
!
((
*
reference
)
=
fld
=
new
Item_field
(
tmp
)))
return
1
;
...
...
sql/sql_class.h
View file @
fd420f72
...
...
@@ -1264,8 +1264,6 @@ public:
bool
send_fields
(
List
<
Item
>
&
list
,
uint
flag
)
{
return
0
;
};
bool
send_data
(
List
<
Item
>
&
items
)
=
0
;
bool
send_eof
()
{
return
0
;
};
friend
class
Ttem_subselect
;
};
/* Single value subselect interface class */
...
...
sql/sql_show.cc
View file @
fd420f72
...
...
@@ -1140,7 +1140,7 @@ static const char *require_quotes(const char *name, uint name_length)
for
(
;
name
<
end
;
name
++
)
{
uchar
chr
=
(
uchar
)
*
name
;
length
=
my_mbcharlen
(
system_charset_info
,
chr
);
length
=
my_mbcharlen
(
system_charset_info
,
(
uchar
)
chr
);
if
(
length
==
1
&&
!
system_charset_info
->
ident_map
[
chr
])
return
name
;
}
...
...
@@ -1169,7 +1169,7 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
for
(
name_end
=
name
+
length
;
name
<
name_end
;
name
+=
length
)
{
char
chr
=
*
name
;
length
=
my_mbcharlen
(
system_charset_info
,
chr
);
length
=
my_mbcharlen
(
system_charset_info
,
(
uchar
)
chr
);
if
(
length
==
1
&&
chr
==
quote_char
)
packet
->
append
(
&
quote_char
,
1
,
system_charset_info
);
packet
->
append
(
name
,
length
,
packet
->
charset
());
...
...
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