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
95fa0d99
Commit
95fa0d99
authored
Jan 11, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
parents
4ebb0979
7bdd452d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
43 additions
and
40 deletions
+43
-40
include/hash.h
include/hash.h
+1
-1
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+2
-2
mysql-test/r/heap.result
mysql-test/r/heap.result
+1
-1
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+2
-2
mysql-test/r/strict.result
mysql-test/r/strict.result
+1
-1
mysys/hash.c
mysys/hash.c
+3
-3
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+4
-0
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+1
-1
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+7
-22
sql/field.cc
sql/field.cc
+17
-3
sql/net_serv.cc
sql/net_serv.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
No files found.
include/hash.h
View file @
95fa0d99
...
@@ -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/bdb.result
View file @
95fa0d99
...
@@ -1300,7 +1300,7 @@ insert into t1 values('+ ', '+ ', '+ ');
...
@@ -1300,7 +1300,7 @@ insert into t1 values('+ ', '+ ', '+ ');
set @a=repeat(' ',20);
set @a=repeat(' ',20);
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
Warnings:
Warnings:
Warning
1265 Data truncated for column 'v' at row 1
Note
1265 Data truncated for column 'v' at row 1
select concat('*',v,'*',c,'*',t,'*') from t1;
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
concat('*',v,'*',c,'*',t,'*')
*+
*+*+ *
*+
*+*+ *
...
@@ -1346,7 +1346,7 @@ t1 CREATE TABLE `t1` (
...
@@ -1346,7 +1346,7 @@ t1 CREATE TABLE `t1` (
)
ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
)
ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
alter table t1 modify t varchar(10);
Warnings:
Warnings:
Warning
1265 Data truncated for column 't' at row 2
Note
1265 Data truncated for column 't' at row 2
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
...
...
mysql-test/r/heap.result
View file @
95fa0d99
...
@@ -255,7 +255,7 @@ insert into t1 values('+ ', '+ ', '+ ');
...
@@ -255,7 +255,7 @@ insert into t1 values('+ ', '+ ', '+ ');
set @a=repeat(' ',20);
set @a=repeat(' ',20);
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
Warnings:
Warnings:
Warning
1265 Data truncated for column 'v' at row 1
Note
1265 Data truncated for column 'v' at row 1
select concat('*',v,'*',c,'*',t,'*') from t1;
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
concat('*',v,'*',c,'*',t,'*')
*+ *+*+ *
*+ *+*+ *
...
...
mysql-test/r/myisam.result
View file @
95fa0d99
...
@@ -571,7 +571,7 @@ insert into t1 values('+ ', '+ ', '+ ');
...
@@ -571,7 +571,7 @@ insert into t1 values('+ ', '+ ', '+ ');
set @a=repeat(' ',20);
set @a=repeat(' ',20);
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
Warnings:
Warnings:
Warning
1265 Data truncated for column 'v' at row 1
Note
1265 Data truncated for column 'v' at row 1
select concat('*',v,'*',c,'*',t,'*') from t1;
select concat('*',v,'*',c,'*',t,'*') from t1;
concat('*',v,'*',c,'*',t,'*')
concat('*',v,'*',c,'*',t,'*')
*+
*+*+ *
*+
*+*+ *
...
@@ -617,7 +617,7 @@ t1 CREATE TABLE `t1` (
...
@@ -617,7 +617,7 @@ t1 CREATE TABLE `t1` (
)
ENGINE=MyISAM DEFAULT CHARSET=latin1
)
ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 modify t varchar(10);
alter table t1 modify t varchar(10);
Warnings:
Warnings:
Warning
1265 Data truncated for column 't' at row 2
Note
1265 Data truncated for column 't' at row 2
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
...
...
mysql-test/r/strict.result
View file @
95fa0d99
...
@@ -818,7 +818,6 @@ ERROR 01000: Data truncated for column 'col1' at row 1
...
@@ -818,7 +818,6 @@ ERROR 01000: Data truncated for column 'col1' at row 1
INSERT INTO t1 (col2) VALUES ('hellobob');
INSERT INTO t1 (col2) VALUES ('hellobob');
ERROR 01000: Data truncated for column 'col2' at row 1
ERROR 01000: Data truncated for column 'col2' at row 1
INSERT INTO t1 (col2) VALUES ('hello ');
INSERT INTO t1 (col2) VALUES ('hello ');
ERROR 01000: Data truncated for column 'col2' at row 1
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
ERROR 01000: Data truncated for column 'col1' at row 2
ERROR 01000: Data truncated for column 'col1' at row 2
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
...
@@ -835,6 +834,7 @@ col1 col2
...
@@ -835,6 +834,7 @@ col1 col2
hello hello
hello hello
he hellot
he hellot
hello hello
hello hello
NULL hello
hello hellob
hello hellob
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (col1 enum('red','blue','green'));
CREATE TABLE t1 (col1 enum('red','blue','green'));
...
...
mysys/hash.c
View file @
95fa0d99
...
@@ -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/common/portlib/NdbThread.c
View file @
95fa0d99
...
@@ -54,7 +54,11 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
...
@@ -54,7 +54,11 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
strnmov
(
tmpThread
->
thread_name
,
p_thread_name
,
sizeof
(
tmpThread
->
thread_name
));
strnmov
(
tmpThread
->
thread_name
,
p_thread_name
,
sizeof
(
tmpThread
->
thread_name
));
pthread_attr_init
(
&
thread_attr
);
pthread_attr_init
(
&
thread_attr
);
#if (SIZEOF_CHARP == 8)
pthread_attr_setstacksize
(
&
thread_attr
,
2
*
thread_stack_size
);
#else
pthread_attr_setstacksize
(
&
thread_attr
,
thread_stack_size
);
pthread_attr_setstacksize
(
&
thread_attr
,
thread_stack_size
);
#endif
#ifdef USE_PTHREAD_EXTRAS
#ifdef USE_PTHREAD_EXTRAS
/* Guard stack overflow with a 2k databuffer */
/* Guard stack overflow with a 2k databuffer */
pthread_attr_setguardsize
(
&
thread_attr
,
2048
);
pthread_attr_setguardsize
(
&
thread_attr
,
2048
);
...
...
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
95fa0d99
...
@@ -1419,6 +1419,6 @@ NdbOut & operator <<(NdbOut & out, SignalHeader & sh){
...
@@ -1419,6 +1419,6 @@ NdbOut & operator <<(NdbOut & out, SignalHeader & sh){
Transporter
*
Transporter
*
TransporterRegistry
::
get_transporter
(
NodeId
nodeId
)
{
TransporterRegistry
::
get_transporter
(
NodeId
nodeId
)
{
return
theTransporters
[
nodeId
];
return
theTransporters
[
nodeId
];
}
;
}
template
class
Vector
<
TransporterRegistry
::
Transporter_interface
>;
template
class
Vector
<
TransporterRegistry
::
Transporter_interface
>;
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
95fa0d99
...
@@ -14,19 +14,11 @@
...
@@ -14,19 +14,11 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/**
* O_DIRECT
*/
#if 0
//#ifdef NDB_LINUX
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#endif
#include <ndb_global.h>
#include <ndb_global.h>
#include <my_sys.h>
#include <my_pthread.h>
#include
"Error.hpp"
#include
<Error.hpp>
#include "AsyncFile.hpp"
#include "AsyncFile.hpp"
#include <ErrorHandlingMacros.hpp>
#include <ErrorHandlingMacros.hpp>
...
@@ -35,15 +27,6 @@
...
@@ -35,15 +27,6 @@
#include <NdbThread.h>
#include <NdbThread.h>
#include <signaldata/FsOpenReq.hpp>
#include <signaldata/FsOpenReq.hpp>
#if 0
#ifdef HAVE_PREAD
// This is for pread and pwrite
#ifndef __USE_UNIX98
#define __USE_UNIX98
#endif
#endif
#endif
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#else
#else
// For readv and writev
// For readv and writev
...
@@ -91,6 +74,7 @@ static int numAsyncFiles = 0;
...
@@ -91,6 +74,7 @@ static int numAsyncFiles = 0;
extern
"C"
void
*
runAsyncFile
(
void
*
arg
)
extern
"C"
void
*
runAsyncFile
(
void
*
arg
)
{
{
my_thread_init
();
((
AsyncFile
*
)
arg
)
->
run
();
((
AsyncFile
*
)
arg
)
->
run
();
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -419,7 +403,7 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
...
@@ -419,7 +403,7 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
#elif defined NDB_OSE || defined NDB_SOFTOSE
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
::
read
(
theFd
,
buf
,
size
);
return_value
=
::
read
(
theFd
,
buf
,
size
);
#else // UNIX
#else // UNIX
return_value
=
::
pread
(
theFd
,
buf
,
size
,
offset
);
return_value
=
my_pread
(
theFd
,
buf
,
size
,
offset
,
0
);
#endif
#endif
#ifndef NDB_WIN32
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
@@ -653,7 +637,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
...
@@ -653,7 +637,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
#elif defined NDB_OSE || defined NDB_SOFTOSE
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
::
write
(
theFd
,
buf
,
bytes_to_write
);
return_value
=
::
write
(
theFd
,
buf
,
bytes_to_write
);
#else // UNIX
#else // UNIX
return_value
=
::
pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
);
return_value
=
my_pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
,
0
);
#endif
#endif
#ifndef NDB_WIN32
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
@@ -889,6 +873,7 @@ void AsyncFile::endReq()
...
@@ -889,6 +873,7 @@ void AsyncFile::endReq()
{
{
// Thread is ended with return
// Thread is ended with return
if
(
theWriteBuffer
)
NdbMem_Free
(
theWriteBuffer
);
if
(
theWriteBuffer
)
NdbMem_Free
(
theWriteBuffer
);
my_thread_end
();
NdbThread_Exit
(
0
);
NdbThread_Exit
(
0
);
}
}
...
...
sql/field.cc
View file @
95fa0d99
...
@@ -4672,6 +4672,7 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -4672,6 +4672,7 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
uint32
not_used
,
copy_length
;
uint32
not_used
,
copy_length
;
char
buff
[
80
];
char
buff
[
80
];
String
tmpstr
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
String
tmpstr
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
enum
MYSQL_ERROR
::
enum_warning_level
level
=
MYSQL_ERROR
::
WARN_LEVEL_WARN
;
/* Convert character set if nesessary */
/* Convert character set if nesessary */
if
(
String
::
needs_conversion
(
length
,
cs
,
field_charset
,
&
not_used
))
if
(
String
::
needs_conversion
(
length
,
cs
,
field_charset
,
&
not_used
))
...
@@ -4696,11 +4697,24 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -4696,11 +4697,24 @@ int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
*
ptr
=
(
uchar
)
copy_length
;
*
ptr
=
(
uchar
)
copy_length
;
else
else
int2store
(
ptr
,
copy_length
);
int2store
(
ptr
,
copy_length
);
if
(
copy_length
<
length
)
// Check if we lost something other than just trailing spaces
if
((
copy_length
<
length
)
&&
table
->
in_use
->
count_cuted_fields
)
{
const
char
*
end
=
from
+
length
;
from
+=
copy_length
;
from
+=
field_charset
->
cset
->
scan
(
field_charset
,
from
,
end
,
MY_SEQ_SPACES
);
/*
If we lost only spaces then produce a NOTE, not a WARNING.
But if we have already had errors (e.g with charset conversion),
then don't reset level to NOTE.
*/
if
(
from
==
end
&&
!
error
)
level
=
MYSQL_ERROR
::
WARN_LEVEL_NOTE
;
error
=
1
;
error
=
1
;
}
if
(
error
)
if
(
error
)
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_DATA_TRUNCATED
,
1
);
set_warning
(
level
,
ER_WARN_DATA_TRUNCATED
,
1
);
return
error
;
return
error
;
}
}
...
...
sql/net_serv.cc
View file @
95fa0d99
...
@@ -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 @
95fa0d99
...
@@ -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
;
}
}
...
...
sql/sql_lex.cc
View file @
95fa0d99
...
@@ -172,7 +172,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
...
@@ -172,7 +172,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
lex
->
proc_list
.
first
=
0
;
lex
->
proc_list
.
first
=
0
;
if
(
lex
->
spfuns
.
records
)
if
(
lex
->
spfuns
.
records
)
hash_reset
(
&
lex
->
spfuns
);
my_
hash_reset
(
&
lex
->
spfuns
);
}
}
void
lex_end
(
LEX
*
lex
)
void
lex_end
(
LEX
*
lex
)
...
...
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