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
538a3f7a
Commit
538a3f7a
authored
Nov 25, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
parents
d472a624
886d54bb
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
111 additions
and
90 deletions
+111
-90
myisam/mi_test3.c
myisam/mi_test3.c
+2
-2
myisam/mi_write.c
myisam/mi_write.c
+6
-10
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+6
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+13
-0
ndb/src/common/logger/LogHandler.cpp
ndb/src/common/logger/LogHandler.cpp
+3
-4
ndb/src/common/logger/Logger.cpp
ndb/src/common/logger/Logger.cpp
+6
-3
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+17
-16
ndb/src/mgmsrv/InitConfigFileParser.cpp
ndb/src/mgmsrv/InitConfigFileParser.cpp
+24
-44
sql/item_func.cc
sql/item_func.cc
+11
-8
sql/item_sum.h
sql/item_sum.h
+1
-1
sql/sql_udf.h
sql/sql_udf.h
+2
-1
sql/table.cc
sql/table.cc
+20
-1
No files found.
myisam/mi_test3.c
View file @
538a3f7a
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#endif
#endif
const
char
*
filename
=
"test3
.MSI
"
;
const
char
*
filename
=
"test3"
;
uint
tests
=
10
,
forks
=
10
,
key_cacheing
=
0
,
use_log
=
0
;
uint
tests
=
10
,
forks
=
10
,
key_cacheing
=
0
,
use_log
=
0
;
static
void
get_options
(
int
argc
,
char
*
argv
[]);
static
void
get_options
(
int
argc
,
char
*
argv
[]);
...
@@ -363,7 +363,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
...
@@ -363,7 +363,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
}
}
sprintf
(
record
.
id
,
"%7d"
,
getpid
());
sprintf
(
record
.
id
,
"%7d"
,
getpid
());
str
mov
(
record
.
text
,
"Testing..."
);
str
nmov
(
record
.
text
,
"Testing..."
,
sizeof
(
record
.
text
)
);
tries
=
(
uint
)
rnd
(
100
)
+
10
;
tries
=
(
uint
)
rnd
(
100
)
+
10
;
for
(
i
=
count
=
0
;
i
<
tries
;
i
++
)
for
(
i
=
count
=
0
;
i
<
tries
;
i
++
)
...
...
myisam/mi_write.c
View file @
538a3f7a
...
@@ -165,12 +165,7 @@ err:
...
@@ -165,12 +165,7 @@ err:
{
{
uint
j
;
uint
j
;
for
(
j
=
0
;
j
<
share
->
base
.
keys
;
j
++
)
for
(
j
=
0
;
j
<
share
->
base
.
keys
;
j
++
)
{
mi_flush_bulk_insert
(
info
,
j
);
if
(
is_tree_inited
(
&
info
->
bulk_insert
[
j
]))
{
reset_tree
(
&
info
->
bulk_insert
[
j
]);
}
}
}
}
info
->
errkey
=
(
int
)
i
;
info
->
errkey
=
(
int
)
i
;
while
(
i
--
>
0
)
while
(
i
--
>
0
)
...
@@ -329,7 +324,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
...
@@ -329,7 +324,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar
*
temp_buff
,
*
keypos
;
uchar
*
temp_buff
,
*
keypos
;
uchar
keybuff
[
MI_MAX_KEY_BUFF
];
uchar
keybuff
[
MI_MAX_KEY_BUFF
];
my_bool
was_last_key
;
my_bool
was_last_key
;
my_off_t
next_page
;
my_off_t
next_page
,
dupp_key_pos
;
DBUG_ENTER
(
"w_search"
);
DBUG_ENTER
(
"w_search"
);
DBUG_PRINT
(
"enter"
,(
"page: %ld"
,
page
));
DBUG_PRINT
(
"enter"
,(
"page: %ld"
,
page
));
...
@@ -349,9 +344,9 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
...
@@ -349,9 +344,9 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
/* get position to record with duplicated key */
/* get position to record with duplicated key */
tmp_key_length
=
(
*
keyinfo
->
get_key
)(
keyinfo
,
nod_flag
,
&
keypos
,
keybuff
);
tmp_key_length
=
(
*
keyinfo
->
get_key
)(
keyinfo
,
nod_flag
,
&
keypos
,
keybuff
);
if
(
tmp_key_length
)
if
(
tmp_key_length
)
info
->
dupp_key_pos
=
_mi_dpos
(
info
,
0
,
keybuff
+
tmp_key_length
);
dupp_key_pos
=
_mi_dpos
(
info
,
0
,
keybuff
+
tmp_key_length
);
else
else
info
->
dupp_key_pos
=
HA_OFFSET_ERROR
;
dupp_key_pos
=
HA_OFFSET_ERROR
;
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
{
{
uint
off
;
uint
off
;
...
@@ -370,7 +365,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
...
@@ -370,7 +365,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
else
else
{
{
/* popular word. two-level tree. going down */
/* popular word. two-level tree. going down */
my_off_t
root
=
info
->
dupp_key_pos
;
my_off_t
root
=
dupp_key_pos
;
keyinfo
=&
info
->
s
->
ft2_keyinfo
;
keyinfo
=&
info
->
s
->
ft2_keyinfo
;
get_key_full_length_rdonly
(
off
,
key
);
get_key_full_length_rdonly
(
off
,
key
);
key
+=
off
;
key
+=
off
;
...
@@ -389,6 +384,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
...
@@ -389,6 +384,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
}
}
else
/* not HA_FULLTEXT, normal HA_NOSAME key */
else
/* not HA_FULLTEXT, normal HA_NOSAME key */
{
{
info
->
dupp_key_pos
=
dupp_key_pos
;
my_afree
((
byte
*
)
temp_buff
);
my_afree
((
byte
*
)
temp_buff
);
my_errno
=
HA_ERR_FOUND_DUPP_KEY
;
my_errno
=
HA_ERR_FOUND_DUPP_KEY
;
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
...
...
mysql-test/r/fulltext.result
View file @
538a3f7a
...
@@ -399,3 +399,9 @@ select count(*) from t1;
...
@@ -399,3 +399,9 @@ select count(*) from t1;
count(*)
count(*)
1
1
drop table t1;
drop table t1;
create table t1 (a int primary key, b text, fulltext(b));
create table t2 (a int, b text);
insert t1 values (1, "aaaa"), (2, "bbbb");
insert t2 values (10, "aaaa"), (2, "cccc");
replace t1 select * from t2;
drop table t1, t2;
mysql-test/t/fulltext.test
View file @
538a3f7a
...
@@ -308,3 +308,16 @@ REPAIR TABLE t1;
...
@@ -308,3 +308,16 @@ REPAIR TABLE t1;
select
count
(
*
)
from
t1
;
select
count
(
*
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# bug#6784
# mi_flush_bulk_insert (on dup key error in mi_write)
# was mangling info->dupp_key_pos
#
create
table
t1
(
a
int
primary
key
,
b
text
,
fulltext
(
b
));
create
table
t2
(
a
int
,
b
text
);
insert
t1
values
(
1
,
"aaaa"
),
(
2
,
"bbbb"
);
insert
t2
values
(
10
,
"aaaa"
),
(
2
,
"cccc"
);
replace
t1
select
*
from
t2
;
drop
table
t1
,
t2
;
ndb/src/common/logger/LogHandler.cpp
View file @
538a3f7a
...
@@ -117,10 +117,9 @@ LogHandler::parseParams(const BaseString &_params) {
...
@@ -117,10 +117,9 @@ LogHandler::parseParams(const BaseString &_params) {
_params
.
split
(
v_args
,
","
);
_params
.
split
(
v_args
,
","
);
for
(
size_t
i
=
0
;
i
<
v_args
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
v_args
.
size
();
i
++
)
{
Vector
<
BaseString
>
v_param_value
;
Vector
<
BaseString
>
v_param_value
;
if
(
v_args
[
i
].
split
(
v_param_value
,
"="
,
2
)
!=
2
)
v_args
[
i
].
split
(
v_param_value
,
"="
,
2
);
ret
=
false
;
if
(
v_param_value
.
size
()
==
2
&&
else
if
(
!
setParam
(
v_param_value
[
0
],
v_param_value
[
1
]))
!
setParam
(
v_param_value
[
0
],
v_param_value
[
1
]))
ret
=
false
;
ret
=
false
;
}
}
...
...
ndb/src/common/logger/Logger.cpp
View file @
538a3f7a
...
@@ -169,10 +169,13 @@ Logger::addHandler(const BaseString &logstring) {
...
@@ -169,10 +169,13 @@ Logger::addHandler(const BaseString &logstring) {
size_t
i
;
size_t
i
;
Vector
<
BaseString
>
logdest
;
Vector
<
BaseString
>
logdest
;
Vector
<
LogHandler
*>
loghandlers
;
Vector
<
LogHandler
*>
loghandlers
;
DBUG_ENTER
(
"Logger::addHandler"
);
logstring
.
split
(
logdest
,
";"
);
logstring
.
split
(
logdest
,
";"
);
for
(
i
=
0
;
i
<
logdest
.
size
();
i
++
)
{
for
(
i
=
0
;
i
<
logdest
.
size
();
i
++
)
{
DBUG_PRINT
(
"info"
,(
"adding: %s"
,
logdest
[
i
]));
Vector
<
BaseString
>
v_type_args
;
Vector
<
BaseString
>
v_type_args
;
logdest
[
i
].
split
(
v_type_args
,
":"
,
2
);
logdest
[
i
].
split
(
v_type_args
,
":"
,
2
);
...
@@ -191,16 +194,16 @@ Logger::addHandler(const BaseString &logstring) {
...
@@ -191,16 +194,16 @@ Logger::addHandler(const BaseString &logstring) {
handler
=
new
ConsoleLogHandler
();
handler
=
new
ConsoleLogHandler
();
if
(
handler
==
NULL
)
if
(
handler
==
NULL
)
return
false
;
DBUG_RETURN
(
false
)
;
if
(
!
handler
->
parseParams
(
params
))
if
(
!
handler
->
parseParams
(
params
))
return
false
;
DBUG_RETURN
(
false
)
;
loghandlers
.
push_back
(
handler
);
loghandlers
.
push_back
(
handler
);
}
}
for
(
i
=
0
;
i
<
loghandlers
.
size
();
i
++
)
for
(
i
=
0
;
i
<
loghandlers
.
size
();
i
++
)
addHandler
(
loghandlers
[
i
]);
addHandler
(
loghandlers
[
i
]);
return
true
;
/* @todo handle errors */
DBUG_RETURN
(
true
)
;
/* @todo handle errors */
}
}
bool
bool
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
538a3f7a
...
@@ -8573,12 +8573,10 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8573,12 +8573,10 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
/**
/**
* Used for scan take over
* Used for scan take over
*/
*/
{
FragrecordPtr
tFragPtr
;
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
}
/**
/**
* !idx uses 1 - (MAX_PARALLEL_SCANS_PER_FRAG - 1) = 1-11
* !idx uses 1 - (MAX_PARALLEL_SCANS_PER_FRAG - 1) = 1-11
...
@@ -8587,7 +8585,7 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8587,7 +8585,7 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
Uint32
start
=
(
idx
?
MAX_PARALLEL_SCANS_PER_FRAG
:
1
);
Uint32
start
=
(
idx
?
MAX_PARALLEL_SCANS_PER_FRAG
:
1
);
Uint32
stop
=
(
idx
?
MAX_PARALLEL_INDEX_SCANS_PER_FRAG
:
MAX_PARALLEL_SCANS_PER_FRAG
-
1
);
Uint32
stop
=
(
idx
?
MAX_PARALLEL_INDEX_SCANS_PER_FRAG
:
MAX_PARALLEL_SCANS_PER_FRAG
-
1
);
stop
+=
start
;
stop
+=
start
;
Uint32
free
=
fragp
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
Uint32
free
=
tFragP
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
if
(
free
==
Fragrecord
::
ScanNumberMask
::
NotFound
||
free
>=
stop
){
if
(
free
==
Fragrecord
::
ScanNumberMask
::
NotFound
||
free
>=
stop
){
jam
();
jam
();
...
@@ -8607,9 +8605,8 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8607,9 +8605,8 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
return
ZOK
;
return
ZOK
;
}
}
scanptr
.
p
->
scanNumber
=
free
;
scanptr
.
p
->
scanNumber
=
free
;
fragp
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
tFragP
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
LocalDLList
<
ScanRecord
>
active
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
LocalDLList
<
ScanRecord
>
active
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
active
.
add
(
scanptr
);
active
.
add
(
scanptr
);
...
@@ -8693,8 +8690,12 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8693,8 +8690,12 @@ void Dblqh::finishScanrec(Signal* signal)
LocalDLList
<
ScanRecord
>
scans
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
LocalDLList
<
ScanRecord
>
scans
(
c_scanRecordPool
,
fragptr
.
p
->
m_activeScans
);
scans
.
release
(
scanptr
);
scans
.
release
(
scanptr
);
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
scanptr
.
p
->
fragPtrI
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
const
Uint32
scanNumber
=
scanptr
.
p
->
scanNumber
;
const
Uint32
scanNumber
=
scanptr
.
p
->
scanNumber
;
ndbrequire
(
!
fragp
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ndbrequire
(
!
tFragP
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ScanRecordPtr
restart
;
ScanRecordPtr
restart
;
/**
/**
...
@@ -8702,13 +8703,13 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8702,13 +8703,13 @@ void Dblqh::finishScanrec(Signal* signal)
*/
*/
if
(
scanNumber
==
NR_ScanNo
||
!
queue
.
first
(
restart
)){
if
(
scanNumber
==
NR_ScanNo
||
!
queue
.
first
(
restart
)){
jam
();
jam
();
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
return
;
}
}
if
(
ERROR_INSERTED
(
5034
)){
if
(
ERROR_INSERTED
(
5034
)){
jam
();
jam
();
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
return
;
}
}
...
...
ndb/src/mgmsrv/InitConfigFileParser.cpp
View file @
538a3f7a
...
@@ -213,48 +213,41 @@ InitConfigFileParser::parseConfig(FILE * file) {
...
@@ -213,48 +213,41 @@ InitConfigFileParser::parseConfig(FILE * file) {
// Parse Name-Value Pair
// Parse Name-Value Pair
//****************************************************************************
//****************************************************************************
bool
InitConfigFileParser
::
parseNameValuePair
(
Context
&
ctx
,
const
char
*
line
)
{
bool
InitConfigFileParser
::
parseNameValuePair
(
Context
&
ctx
,
const
char
*
line
)
{
char
tmpLine
[
MAX_LINE_LENGTH
];
char
fname
[
MAX_LINE_LENGTH
],
rest
[
MAX_LINE_LENGTH
];
char
*
t
;
const
char
*
separator_list
[]
=
{
":"
,
"="
,
0
};
const
char
*
separator
=
0
;
if
(
ctx
.
m_currentSection
==
NULL
){
if
(
ctx
.
m_currentSection
==
NULL
){
ctx
.
reportError
(
"Value specified outside section"
);
ctx
.
reportError
(
"Value specified outside section"
);
return
false
;
return
false
;
}
}
strncpy
(
tmpLine
,
line
,
MAX_LINE_LENGTH
);
// *************************************
// *************************************
// Check if a separator exists in line
// Split string at first occurrence of
// '=' or ':'
// *************************************
// *************************************
for
(
int
i
=
0
;
separator_list
[
i
]
!=
0
;
i
++
)
{
if
(
strchr
(
tmpLine
,
separator_list
[
i
][
0
]))
{
separator
=
separator_list
[
i
];
break
;
}
}
if
(
separator
==
0
)
{
Vector
<
BaseString
>
tmp_string_split
;
if
(
BaseString
(
line
).
split
(
tmp_string_split
,
BaseString
(
"=:"
),
2
)
!=
2
)
{
ctx
.
reportError
(
"Parse error"
);
ctx
.
reportError
(
"Parse error"
);
return
false
;
return
false
;
}
}
// *******************************************
// *************************************
// Get pointer to substring before separator
// Remove leading and trailing chars
// *******************************************
// *************************************
t
=
strtok
(
tmpLine
,
separator
);
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
// *****************************************
tmp_string_split
[
i
].
trim
(
"
\r\n
\t
"
);
// Count number of tokens before separator
// *****************************************
if
(
sscanf
(
t
,
"%120s%120s"
,
fname
,
rest
)
!=
1
)
{
ctx
.
reportError
(
"Multiple names before
\'
%c
\'
"
,
separator
[
0
]);
return
false
;
}
}
// *************************************
// First in split is fname
// *************************************
const
char
*
fname
=
tmp_string_split
[
0
].
c_str
();
if
(
!
ctx
.
m_currentInfo
->
contains
(
fname
))
{
if
(
!
ctx
.
m_currentInfo
->
contains
(
fname
))
{
ctx
.
reportError
(
"[%s] Unknown parameter: %s"
,
ctx
.
fname
,
fname
);
ctx
.
reportError
(
"[%s] Unknown parameter: %s"
,
ctx
.
fname
,
fname
);
return
false
;
return
false
;
...
@@ -273,24 +266,11 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) {
...
@@ -273,24 +266,11 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) {
}
}
}
}
// ******************************************
// Get pointer to substring after separator
// ******************************************
t
=
strtok
(
NULL
,
"
\0
"
);
if
(
t
==
NULL
)
{
ctx
.
reportError
(
"No value for parameter"
);
return
false
;
}
// ******************************************
// Remove prefix and postfix spaces and tabs
// *******************************************
trim
(
t
);
// ***********************
// ***********************
// Store name-value pair
// Store name-value pair
// ***********************
// ***********************
return
storeNameValuePair
(
ctx
,
fname
,
t
);
return
storeNameValuePair
(
ctx
,
fname
,
tmp_string_split
[
1
].
c_str
());
}
}
...
...
sql/item_func.cc
View file @
538a3f7a
...
@@ -1684,6 +1684,8 @@ longlong Item_func_bit_count::val_int()
...
@@ -1684,6 +1684,8 @@ longlong Item_func_bit_count::val_int()
udf_handler
::~
udf_handler
()
udf_handler
::~
udf_handler
()
{
{
if
(
!
not_original
)
{
if
(
initialized
)
if
(
initialized
)
{
{
if
(
u_d
->
func_deinit
!=
NULL
)
if
(
u_d
->
func_deinit
!=
NULL
)
...
@@ -1696,6 +1698,7 @@ udf_handler::~udf_handler()
...
@@ -1696,6 +1698,7 @@ udf_handler::~udf_handler()
}
}
if
(
buffers
)
// Because of bug in ecc
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
delete
[]
buffers
;
}
}
}
...
...
sql/item_sum.h
View file @
538a3f7a
...
@@ -571,7 +571,7 @@ public:
...
@@ -571,7 +571,7 @@ public:
:
Item_sum
(
list
),
udf
(
udf_arg
)
:
Item_sum
(
list
),
udf
(
udf_arg
)
{
quick_group
=
0
;}
{
quick_group
=
0
;}
Item_udf_sum
(
THD
*
thd
,
Item_udf_sum
*
item
)
Item_udf_sum
(
THD
*
thd
,
Item_udf_sum
*
item
)
:
Item_sum
(
thd
,
item
),
udf
(
item
->
udf
)
{}
:
Item_sum
(
thd
,
item
),
udf
(
item
->
udf
)
{
udf
.
not_original
=
TRUE
;
}
const
char
*
func_name
()
const
{
return
udf
.
name
();
}
const
char
*
func_name
()
const
{
return
udf
.
name
();
}
bool
fix_fields
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item
**
ref
)
bool
fix_fields
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item
**
ref
)
{
{
...
...
sql/sql_udf.h
View file @
538a3f7a
...
@@ -56,8 +56,9 @@ class udf_handler :public Sql_alloc
...
@@ -56,8 +56,9 @@ class udf_handler :public Sql_alloc
public:
public:
table_map
used_tables_cache
;
table_map
used_tables_cache
;
bool
const_item_cache
;
bool
const_item_cache
;
bool
not_original
;
udf_handler
(
udf_func
*
udf_arg
)
:
u_d
(
udf_arg
),
buffers
(
0
),
error
(
0
),
udf_handler
(
udf_func
*
udf_arg
)
:
u_d
(
udf_arg
),
buffers
(
0
),
error
(
0
),
is_null
(
0
),
initialized
(
0
)
is_null
(
0
),
initialized
(
0
)
,
not_original
(
0
)
{}
{}
~
udf_handler
();
~
udf_handler
();
const
char
*
name
()
const
{
return
u_d
?
u_d
->
name
.
str
:
"?"
;
}
const
char
*
name
()
const
{
return
u_d
?
u_d
->
name
.
str
:
"?"
;
}
...
...
sql/table.cc
View file @
538a3f7a
...
@@ -486,7 +486,26 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
...
@@ -486,7 +486,26 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
/* old frm file */
/* old frm file */
field_type
=
(
enum_field_types
)
f_packtype
(
pack_flag
);
field_type
=
(
enum_field_types
)
f_packtype
(
pack_flag
);
charset
=
f_is_binary
(
pack_flag
)
?
&
my_charset_bin
:
outparam
->
table_charset
;
if
(
f_is_binary
(
pack_flag
))
{
/*
Try to choose the best 4.1 type:
- for 4.0 "CHAR(N) BINARY" or "VARCHAR(N) BINARY"
try to find a binary collation for character set.
- for other types (e.g. BLOB) just use my_charset_bin.
*/
if
(
!
f_is_blob
(
pack_flag
))
{
// 3.23 or 4.0 string
if
(
!
(
charset
=
get_charset_by_csname
(
outparam
->
table_charset
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
))))
charset
=
&
my_charset_bin
;
}
else
charset
=
&
my_charset_bin
;
}
else
charset
=
outparam
->
table_charset
;
bzero
((
char
*
)
&
comment
,
sizeof
(
comment
));
bzero
((
char
*
)
&
comment
,
sizeof
(
comment
));
}
}
*
field_ptr
=
reg_field
=
*
field_ptr
=
reg_field
=
...
...
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