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
d4aea9a4
Commit
d4aea9a4
authored
Jan 11, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-5.0
parents
d4e9719a
45505cb8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
12 deletions
+64
-12
include/hash.h
include/hash.h
+1
-1
mysql-test/r/ndb_index_ordered.result
mysql-test/r/ndb_index_ordered.result
+16
-0
mysql-test/t/ndb_index_ordered.test
mysql-test/t/ndb_index_ordered.test
+18
-0
mysys/hash.c
mysys/hash.c
+3
-3
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+23
-5
sql/net_serv.cc
sql/net_serv.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-2
No files found.
include/hash.h
View file @
d4aea9a4
...
@@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
...
@@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
uint
key_length
,
hash_get_key
get_key
,
uint
key_length
,
hash_get_key
get_key
,
void
(
*
free_element
)(
void
*
),
uint
flags
CALLER_INFO_PROTO
);
void
(
*
free_element
)(
void
*
),
uint
flags
CALLER_INFO_PROTO
);
void
hash_free
(
HASH
*
tree
);
void
hash_free
(
HASH
*
tree
);
void
hash_reset
(
HASH
*
hash
);
void
my_
hash_reset
(
HASH
*
hash
);
byte
*
hash_element
(
HASH
*
hash
,
uint
idx
);
byte
*
hash_element
(
HASH
*
hash
,
uint
idx
);
gptr
hash_search
(
HASH
*
info
,
const
byte
*
key
,
uint
length
);
gptr
hash_search
(
HASH
*
info
,
const
byte
*
key
,
uint
length
);
gptr
hash_next
(
HASH
*
info
,
const
byte
*
key
,
uint
length
);
gptr
hash_next
(
HASH
*
info
,
const
byte
*
key
,
uint
length
);
...
...
mysql-test/r/ndb_index_ordered.result
View file @
d4aea9a4
...
@@ -529,3 +529,19 @@ count(*)-8
...
@@ -529,3 +529,19 @@ count(*)-8
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
count(*)-9
count(*)-9
0
0
drop table t1;
create table t1(a int primary key, b int not null, index(b));
insert into t1 values (1,1), (2,2);
set autocommit=0;
begin;
select count(*) from t1;
count(*)
2
ALTER TABLE t1 ADD COLUMN c int;
select a from t1 where b = 2;
a
2
show tables;
Tables_in_test
t1
drop table t1;
mysql-test/t/ndb_index_ordered.test
View file @
d4aea9a4
...
@@ -267,3 +267,21 @@ select count(*)-5 from t1 use index (ti) where ti < '10:11:11';
...
@@ -267,3 +267,21 @@ select count(*)-5 from t1 use index (ti) where ti < '10:11:11';
select
count
(
*
)
-
6
from
t1
use
index
(ti) where ti <= '10:11:11'
;
select
count
(
*
)
-
6
from
t1
use
index
(ti) where ti <= '10:11:11'
;
select
count
(
*
)
-
8
from
t1
use
index
(ti) where ti < '23:59:59'
;
select
count
(
*
)
-
8
from
t1
use
index
(ti) where ti < '23:59:59'
;
select
count
(
*
)
-
9
from
t1
use
index
(ti) where ti <= '23:59:59'
;
select
count
(
*
)
-
9
from
t1
use
index
(ti) where ti <= '23:59:59'
;
drop
table
t1
;
# bug#7798
create
table
t1
(
a
int
primary
key
,
b
int
not
null
,
index
(
b
));
insert
into
t1
values
(
1
,
1
),
(
2
,
2
);
connect
(
con1
,
localhost
,,,
test
);
connect
(
con2
,
localhost
,,,
test
);
connection
con1
;
set
autocommit
=
0
;
begin
;
select
count
(
*
)
from
t1
;
connection
con2
;
ALTER
TABLE
t1
ADD
COLUMN
c
int
;
connection
con1
;
select
a
from
t1
where
b
=
2
;
show
tables
;
drop
table
t1
;
mysys/hash.c
View file @
d4aea9a4
...
@@ -122,13 +122,13 @@ void hash_free(HASH *hash)
...
@@ -122,13 +122,13 @@ void hash_free(HASH *hash)
Delete all elements from the hash (the hash itself is to be reused).
Delete all elements from the hash (the hash itself is to be reused).
SYNOPSIS
SYNOPSIS
hash_reset()
my_
hash_reset()
hash the hash to delete elements of
hash the hash to delete elements of
*/
*/
void
hash_reset
(
HASH
*
hash
)
void
my_
hash_reset
(
HASH
*
hash
)
{
{
DBUG_ENTER
(
"hash_reset"
);
DBUG_ENTER
(
"
my_
hash_reset"
);
DBUG_PRINT
(
"enter"
,(
"hash: 0x%lxd"
,
hash
));
DBUG_PRINT
(
"enter"
,(
"hash: 0x%lxd"
,
hash
));
hash_free_elements
(
hash
);
hash_free_elements
(
hash
);
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
d4aea9a4
...
@@ -1920,7 +1920,6 @@ void Dbtc::packKeyData000Lab(Signal* signal,
...
@@ -1920,7 +1920,6 @@ void Dbtc::packKeyData000Lab(Signal* signal,
Uint32
totalLen
)
Uint32
totalLen
)
{
{
CacheRecord
*
const
regCachePtr
=
cachePtr
.
p
;
CacheRecord
*
const
regCachePtr
=
cachePtr
.
p
;
UintR
Tmp
;
jam
();
jam
();
Uint32
len
=
0
;
Uint32
len
=
0
;
...
@@ -8646,14 +8645,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
...
@@ -8646,14 +8645,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
apiConnectptr
.
i
=
scanTabReq
->
apiConnectPtr
;
apiConnectptr
.
i
=
scanTabReq
->
apiConnectPtr
;
tabptr
.
i
=
scanTabReq
->
tableId
;
tabptr
.
i
=
scanTabReq
->
tableId
;
if
(
apiConnectptr
.
i
>=
capiConnectFilesize
||
if
(
apiConnectptr
.
i
>=
capiConnectFilesize
)
tabptr
.
i
>=
ctabrecFilesize
)
{
{
jam
();
jam
();
warningHandlerLab
(
signal
);
warningHandlerLab
(
signal
);
return
;
return
;
}
//if
}
//if
ptrAss
(
apiConnectptr
,
apiConnectRecord
);
ptrAss
(
apiConnectptr
,
apiConnectRecord
);
ApiConnectRecord
*
transP
=
apiConnectptr
.
p
;
ApiConnectRecord
*
transP
=
apiConnectptr
.
p
;
if
(
transP
->
apiConnectstate
!=
CS_CONNECTED
)
{
if
(
transP
->
apiConnectstate
!=
CS_CONNECTED
)
{
jam
();
jam
();
// could be left over from TCKEYREQ rollback
// could be left over from TCKEYREQ rollback
...
@@ -8667,9 +8668,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
...
@@ -8667,9 +8668,16 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
}
else
{
}
else
{
jam
();
jam
();
errCode
=
ZSTATE_ERROR
;
errCode
=
ZSTATE_ERROR
;
goto
SCAN_TAB_error
;
goto
SCAN_TAB_error
_no_state_change
;
}
}
}
}
if
(
tabptr
.
i
>=
ctabrecFilesize
)
{
errCode
=
ZUNKNOWN_TABLE_ERROR
;
goto
SCAN_TAB_error
;
}
ptrAss
(
tabptr
,
tableRecord
);
ptrAss
(
tabptr
,
tableRecord
);
if
((
aiLength
==
0
)
||
if
((
aiLength
==
0
)
||
(
!
tabptr
.
p
->
checkTable
(
schemaVersion
))
||
(
!
tabptr
.
p
->
checkTable
(
schemaVersion
))
||
...
@@ -8766,8 +8774,18 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
...
@@ -8766,8 +8774,18 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
errCode
=
ZNO_SCANREC_ERROR
;
errCode
=
ZNO_SCANREC_ERROR
;
goto
SCAN_TAB_error
;
goto
SCAN_TAB_error
;
SCAN_TAB_error:
SCAN_TAB_error:
jam
();
jam
();
/**
* Prepare for up coming ATTRINFO/KEYINFO
*/
transP
->
apiConnectstate
=
CS_ABORTING
;
transP
->
abortState
=
AS_IDLE
;
transP
->
transid
[
0
]
=
transid1
;
transP
->
transid
[
1
]
=
transid2
;
SCAN_TAB_error_no_state_change:
ScanTabRef
*
ref
=
(
ScanTabRef
*
)
&
signal
->
theData
[
0
];
ScanTabRef
*
ref
=
(
ScanTabRef
*
)
&
signal
->
theData
[
0
];
ref
->
apiConnectPtr
=
transP
->
ndbapiConnect
;
ref
->
apiConnectPtr
=
transP
->
ndbapiConnect
;
ref
->
transId1
=
transid1
;
ref
->
transId1
=
transid1
;
...
...
sql/net_serv.cc
View file @
d4aea9a4
...
@@ -255,7 +255,7 @@ my_bool
...
@@ -255,7 +255,7 @@ my_bool
my_net_write
(
NET
*
net
,
const
char
*
packet
,
ulong
len
)
my_net_write
(
NET
*
net
,
const
char
*
packet
,
ulong
len
)
{
{
uchar
buff
[
NET_HEADER_SIZE
];
uchar
buff
[
NET_HEADER_SIZE
];
if
(
unlikely
(
!
net
->
vio
))
// nowhere to write
if
(
unlikely
(
!
net
->
vio
))
/* nowhere to write */
return
0
;
return
0
;
/*
/*
Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH
Big packets are handled by splitting them in packets of MAX_PACKET_LENGTH
...
...
sql/sql_class.h
View file @
d4aea9a4
...
@@ -742,8 +742,8 @@ public:
...
@@ -742,8 +742,8 @@ public:
/* Erase all statements (calls Statement destructor) */
/* Erase all statements (calls Statement destructor) */
void
reset
()
void
reset
()
{
{
hash_reset
(
&
names_hash
);
my_
hash_reset
(
&
names_hash
);
hash_reset
(
&
st_hash
);
my_
hash_reset
(
&
st_hash
);
last_found_statement
=
0
;
last_found_statement
=
0
;
}
}
...
...
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