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
859b0550
Commit
859b0550
authored
Jul 31, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
parents
3aa28a12
10888499
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
188 additions
and
95 deletions
+188
-95
configure.in
configure.in
+4
-0
extra/yassl/taocrypt/include/asn.hpp
extra/yassl/taocrypt/include/asn.hpp
+4
-4
extra/yassl/taocrypt/src/asn.cpp
extra/yassl/taocrypt/src/asn.cpp
+1
-1
man/Makefile.am
man/Makefile.am
+2
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+7
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+10
-0
mysql-test/t/mysqlbinlog.test
mysql-test/t/mysqlbinlog.test
+5
-5
mysql-test/t/udf.test
mysql-test/t/udf.test
+1
-1
mysys/my_bitmap.c
mysys/my_bitmap.c
+2
-2
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+2
-2
sql/Makefile.am
sql/Makefile.am
+2
-2
sql/field.cc
sql/field.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+12
-8
sql/udf_example.c
sql/udf_example.c
+90
-67
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+44
-0
No files found.
configure.in
View file @
859b0550
...
...
@@ -2339,12 +2339,16 @@ then
man_dirs
=
"man"
man1_files
=
`
ls
-1
$srcdir
/man/
*
.1 |
sed
-e
's;^.*man/;;'
`
man1_files
=
`
echo
$man1_files
`
man8_files
=
`
ls
-1
$srcdir
/man/
*
.8 |
sed
-e
's;^.*man/;;'
`
man8_files
=
`
echo
$man8_files
`
else
man_dirs
=
""
man1_files
=
""
man8_files
=
""
fi
AC_SUBST
(
man_dirs
)
AC_SUBST
(
man1_files
)
AC_SUBST
(
man8_files
)
# Shall we build the bench code?
AC_ARG_WITH
(
bench,
...
...
extra/yassl/taocrypt/include/asn.hpp
View file @
859b0550
...
...
@@ -103,7 +103,7 @@ enum Constants
MAX_ALGO_SIZE
=
9
,
MAX_DIGEST_SZ
=
25
,
// SHA + enum(Bit or Octet) + length(4)
DSA_SIG_SZ
=
40
,
NAME_MAX
=
512
// max total of all included names
ASN_NAME_MAX
=
512
// max total of all included names
};
...
...
@@ -216,7 +216,7 @@ enum { SHA_SIZE = 20 };
// A Signing Authority
class
Signer
{
PublicKey
key_
;
char
name_
[
NAME_MAX
];
char
name_
[
ASN_
NAME_MAX
];
byte
hash_
[
SHA_SIZE
];
public:
Signer
(
const
byte
*
k
,
word32
kSz
,
const
char
*
n
,
const
byte
*
h
);
...
...
@@ -270,8 +270,8 @@ private:
byte
subjectHash_
[
SHA_SIZE
];
// hash of all Names
byte
issuerHash_
[
SHA_SIZE
];
// hash of all Names
byte
*
signature_
;
char
issuer_
[
NAME_MAX
];
// Names
char
subject_
[
NAME_MAX
];
// Names
char
issuer_
[
ASN_NAME_MAX
];
// Names
char
subject_
[
ASN_NAME_MAX
];
// Names
char
beforeDate_
[
MAX_DATE_SZ
];
// valid before date
char
afterDate_
[
MAX_DATE_SZ
];
// valid after date
bool
verify_
;
// Default to yes, but could be off
...
...
extra/yassl/taocrypt/src/asn.cpp
View file @
859b0550
...
...
@@ -665,7 +665,7 @@ void CertDecoder::GetName(NameType nt)
SHA
sha
;
word32
length
=
GetSequence
();
// length of all distinguished names
assert
(
length
<
NAME_MAX
);
assert
(
length
<
ASN_
NAME_MAX
);
length
+=
source_
.
get_index
();
char
*
ptr
=
(
nt
==
ISSUER
)
?
issuer_
:
subject_
;
...
...
man/Makefile.am
View file @
859b0550
...
...
@@ -18,7 +18,8 @@
## Process this file with automake to create Makefile.in
man1_MANS
=
@man1_files@
EXTRA_DIST
=
$(man1_MANS)
man8_MANS
=
@man8_files@
EXTRA_DIST
=
$(man1_MANS)
$(man8_MANS)
# Don't update the files from bitkeeper
%
::
SCCS/s.%
mysql-test/r/func_time.result
View file @
859b0550
...
...
@@ -758,6 +758,13 @@ select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
NULL NULL January NULL
set time_zone='-6:00';
create table t1(a timestamp);
insert into t1 values (19691231190001);
select * from t1;
a
1969-12-31 19:00:01
drop table t1;
create table t1(f1 date, f2 time, f3 datetime);
insert into t1 values ("2006-01-01", "12:01:01", "2006-01-01 12:01:01");
insert into t1 values ("2006-01-02", "12:01:02", "2006-01-02 12:01:02");
...
...
mysql-test/t/func_time.test
View file @
859b0550
...
...
@@ -375,6 +375,16 @@ select last_day('2005-01-00');
select
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
null
,
'%m'
)),
monthname
(
str_to_date
(
1
,
'%m'
)),
monthname
(
str_to_date
(
0
,
'%m'
));
#
# Bug #16327: problem with timestamp < 1970
#
set
time_zone
=
'-6:00'
;
create
table
t1
(
a
timestamp
);
insert
into
t1
values
(
19691231190001
);
select
*
from
t1
;
drop
table
t1
;
#
# Bug#16377 result of DATE/TIME functions were compared as strings which
# can lead to a wrong result.
...
...
mysql-test/t/mysqlbinlog.test
View file @
859b0550
...
...
@@ -49,14 +49,14 @@ select "--- Local --" as "";
select
"--- Broken LOAD DATA --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000002
2
>
/
dev
/
null
# this should show almost nothing
--
disable_query_log
select
"--- --database --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
database
=
nottest
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
database
=
nottest
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
2
>
/
dev
/
null
# this test for position option
--
disable_query_log
...
...
@@ -81,14 +81,14 @@ select "--- Remote --" as "";
select
"--- Broken LOAD DATA --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000002
2
>
/
dev
/
null
# And this too ! (altough it is documented)
--
disable_query_log
select
"--- --database --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
--
database
=
nottest
master
-
bin
.
000001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
--
database
=
nottest
master
-
bin
.
000001
2
>
/
dev
/
null
# Strangely but this works
--
disable_query_log
...
...
mysql-test/t/udf.test
View file @
859b0550
--
source
include
/
have_udf
.
inc
#
# To run this tests the "sql/udf_example.c
c
" need to be compiled into
# To run this tests the "sql/udf_example.c" need to be compiled into
# udf_example.so and LD_LIBRARY_PATH should be setup to point out where
# the library are.
#
...
...
mysys/my_bitmap.c
View file @
859b0550
...
...
@@ -159,7 +159,7 @@ uint bitmap_set_next(MY_BITMAP *map)
{
uchar
*
bitmap
=
map
->
bitmap
;
uint
bit_found
=
MY_BIT_NONE
;
uint
bitmap_size
=
map
->
bitmap_size
*
8
;
uint
bitmap_size
=
map
->
bitmap_size
;
uint
i
;
DBUG_ASSERT
(
map
->
bitmap
);
...
...
@@ -445,7 +445,7 @@ uint bitmap_get_first(const MY_BITMAP *map)
{
uchar
*
bitmap
=
map
->
bitmap
;
uint
bit_found
=
MY_BIT_NONE
;
uint
bitmap_size
=
map
->
bitmap_size
*
8
;
uint
bitmap_size
=
map
->
bitmap_size
;
uint
i
;
DBUG_ASSERT
(
map
->
bitmap
);
...
...
scripts/make_binary_distribution.sh
View file @
859b0550
...
...
@@ -96,7 +96,7 @@ mkdir $BASE $BASE/bin $BASE/docs \
if
[
$BASE_SYSTEM
!=
"netware"
]
;
then
mkdir
$BASE
/share/mysql
$BASE
/tests
$BASE
/sql-bench
$BASE
/man
\
$BASE
/man/man1
$BASE
/data
$BASE
/data/mysql
$BASE
/data/test
$BASE
/man/man1
$BASE
/
man/man8
$BASE
/
data
$BASE
/data/mysql
$BASE
/data/test
chmod
o-rwx
$BASE
/data
$BASE
/data/
*
fi
...
...
@@ -219,6 +219,7 @@ if [ $BASE_SYSTEM != "netware" ] ; then
fi
if
[
-d
man
]
;
then
$CP
man/
*
.1
$BASE
/man/man1
$CP
man/
*
.8
$BASE
/man/man8
fi
fi
...
...
@@ -309,7 +310,6 @@ else
fi
# Make safe_mysqld a symlink to mysqld_safe for backwards portability
# To be removed in MySQL 4.1
if
[
$BASE_SYSTEM
!=
"netware"
]
;
then
(
cd
$BASE
/bin
;
ln
-s
mysqld_safe safe_mysqld
)
fi
...
...
sql/Makefile.am
View file @
859b0550
...
...
@@ -116,7 +116,7 @@ DEFS = -DMYSQL_SERVER \
@DEFS@
BUILT_SOURCES
=
sql_yacc.cc sql_yacc.h lex_hash.h
EXTRA_DIST
=
udf_example.cc
$(BUILT_SOURCES)
EXTRA_DIST
=
$(BUILT_SOURCES)
DISTCLEANFILES
=
lex_hash.h
AM_YFLAGS
=
-d
...
...
@@ -155,7 +155,7 @@ lex_hash.h: gen_lex_hash$(EXEEXT)
# For testing of udf_example.so
noinst_LTLIBRARIES
=
udf_example.la
udf_example_la_SOURCES
=
udf_example.c
c
udf_example_la_SOURCES
=
udf_example.c
udf_example_la_LDFLAGS
=
-module
-rpath
$(pkglibdir)
...
...
sql/field.cc
View file @
859b0550
...
...
@@ -4606,7 +4606,7 @@ String *Field_timestamp::val_str(String *val_buffer, String *val_ptr)
thd
->
time_zone_used
=
1
;
temp
=
time_tmp
.
year
%
100
;
if
(
temp
<
YY_PART_YEAR
)
if
(
temp
<
YY_PART_YEAR
-
1
)
{
*
to
++=
'2'
;
*
to
++=
'0'
;
...
...
sql/sql_select.cc
View file @
859b0550
...
...
@@ -4131,14 +4131,14 @@ greedy_search(JOIN *join,
double
read_time
=
0.0
;
uint
idx
=
join
->
const_tables
;
// index into 'join->best_ref'
uint
best_idx
;
uint
rem_size
;
// cardinality of remaining_tables
uint
size_remain
;
// cardinality of remaining_tables
POSITION
best_pos
;
JOIN_TAB
*
best_table
;
// the next plan node to be added to the curr QEP
DBUG_ENTER
(
"greedy_search"
);
/* number of tables that remain to be optimized */
rem_size
=
my_count_bits
(
remaining_tables
);
size_remain
=
my_count_bits
(
remaining_tables
);
do
{
/* Find the extension of the current QEP with the lowest cost */
...
...
@@ -4146,7 +4146,7 @@ greedy_search(JOIN *join,
best_extension_by_limited_search
(
join
,
remaining_tables
,
idx
,
record_count
,
read_time
,
search_depth
,
prune_level
);
if
(
rem_size
<=
search_depth
)
if
(
size_remain
<=
search_depth
)
{
/*
'join->best_positions' contains a complete optimal extension of the
...
...
@@ -4182,7 +4182,7 @@ greedy_search(JOIN *join,
read_time
+=
join
->
positions
[
idx
].
read_time
;
remaining_tables
&=
~
(
best_table
->
table
->
map
);
--
rem_size
;
--
size_remain
;
++
idx
;
DBUG_EXECUTE
(
"opt"
,
print_plan
(
join
,
join
->
tables
,
...
...
@@ -8442,12 +8442,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
param
->
group_length
:
0
,
NullS
))
{
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
bitmap_clear_bit
(
&
temp_pool
,
temp_pool_slot
);
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
}
/* Copy_field belongs to TMP_TABLE_PARAM, allocate it in THD mem_root */
if
(
!
(
param
->
copy_field
=
copy
=
new
(
thd
->
mem_root
)
Copy_field
[
field_count
]))
{
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
bitmap_clear_bit
(
&
temp_pool
,
temp_pool_slot
);
free_root
(
&
own_root
,
MYF
(
0
));
/* purecov: inspected */
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
...
...
@@ -8972,6 +8974,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
err:
thd
->
mem_root
=
mem_root_save
;
free_tmp_table
(
thd
,
table
);
/* purecov: inspected */
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
bitmap_clear_bit
(
&
temp_pool
,
temp_pool_slot
);
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
}
...
...
@@ -9260,6 +9263,7 @@ free_tmp_table(THD *thd, TABLE *entry)
(
*
ptr
)
->
free
();
free_io_cache
(
entry
);
if
(
entry
->
temp_pool_slot
!=
MY_BIT_NONE
)
bitmap_clear_bit
(
&
temp_pool
,
entry
->
temp_pool_slot
);
free_root
(
&
own_root
,
MYF
(
0
));
/* the table is allocated in its own root */
...
...
sql/udf_example.c
c
→
sql/udf_example.c
View file @
859b0550
This diff is collapsed.
Click to expand it.
support-files/mysql.spec.sh
View file @
859b0550
...
...
@@ -572,7 +572,7 @@ fi
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/myisamlog.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/myisampack.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_explain_log.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man
1/mysqld.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man
8/mysqld.8
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqld_multi.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysqld_safe.1
*
%doc %attr
(
644, root, man
)
%
{
_mandir
}
/man1/mysql_fix_privilege_tables.1
*
...
...
tests/mysql_client_test.c
View file @
859b0550
...
...
@@ -15028,6 +15028,49 @@ static void test_bug20152()
}
/*
Bug#21206: memory corruption when too many cursors are opened at once
Memory corruption happens when more than 1024 cursors are open
simultaneously.
*/
static
void
test_bug21206
()
{
const
size_t
cursor_count
=
1025
;
const
char
*
create_table
[]
=
{
"DROP TABLE IF EXISTS t1"
,
"CREATE TABLE t1 (i INT)"
,
"INSERT INTO t1 VALUES (1), (2), (3)"
};
const
char
*
query
=
"SELECT * FROM t1"
;
Stmt_fetch
*
fetch_array
=
(
Stmt_fetch
*
)
calloc
(
cursor_count
,
sizeof
(
Stmt_fetch
));
Stmt_fetch
*
fetch
;
DBUG_ENTER
(
"test_bug21206"
);
myheader
(
"test_bug21206"
);
fill_tables
(
create_table
,
sizeof
(
create_table
)
/
sizeof
(
*
create_table
));
for
(
fetch
=
fetch_array
;
fetch
<
fetch_array
+
cursor_count
;
++
fetch
)
{
/* Init will exit(1) in case of error */
stmt_fetch_init
(
fetch
,
fetch
-
fetch_array
,
query
);
}
for
(
fetch
=
fetch_array
;
fetch
<
fetch_array
+
cursor_count
;
++
fetch
)
stmt_fetch_close
(
fetch
);
free
(
fetch_array
);
DBUG_VOID_RETURN
;
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -15300,6 +15343,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug14169"
,
test_bug14169
},
{
"test_bug17667"
,
test_bug17667
},
{
"test_bug19671"
,
test_bug19671
},
{
"test_bug21206"
,
test_bug21206
},
{
0
,
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