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
ba4ac587
Commit
ba4ac587
authored
May 09, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
parents
64408825
2ae1faaf
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
28 deletions
+67
-28
cmd-line-utils/libedit/Makefile.am
cmd-line-utils/libedit/Makefile.am
+1
-1
heap/hp_hash.c
heap/hp_hash.c
+6
-7
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+4
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+8
-1
mysql-test/t/range.test
mysql-test/t/range.test
+2
-0
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+1
-4
sql/item_func.cc
sql/item_func.cc
+31
-15
sql/item_func.h
sql/item_func.h
+1
-0
sql/item_sum.cc
sql/item_sum.cc
+11
-0
sql/item_sum.h
sql/item_sum.h
+1
-0
sql/sql_udf.h
sql/sql_udf.h
+1
-0
No files found.
cmd-line-utils/libedit/Makefile.am
View file @
ba4ac587
...
...
@@ -24,7 +24,7 @@ pkginclude_HEADERS = readline/readline.h
noinst_HEADERS
=
chared.h el.h el_term.h histedit.h key.h parse.h refresh.h sig.h
\
sys.h tokenizer.h config.h hist.h map.h prompt.h read.h
\
search.h tty.h libedit_term.h
search.h tty.h libedit_term.h
vis.h
EXTRA_DIST
=
makelist.sh np/unvis.c np/strlcpy.c np/vis.c np/vis.h np/strlcat.c np/fgetln.c
...
...
heap/hp_hash.c
View file @
ba4ac587
...
...
@@ -635,13 +635,12 @@ int hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key)
key
+=
2
;
/* skip key pack length */
if
(
cs
->
mbmaxlen
>
1
)
{
uint
char_length
=
seg
->
length
/
cs
->
mbmaxlen
;
char_length_key
=
my_charpos
(
cs
,
key
,
key
+
char_length_key
,
char_length
);
set_if_smaller
(
char_length_key
,
seg
->
length
);
char_length_rec
=
my_charpos
(
cs
,
pos
,
pos
+
char_length_rec
,
char_length
);
set_if_smaller
(
char_length_rec
,
seg
->
length
);
uint
char_length1
,
char_length2
;
char_length1
=
char_length2
=
seg
->
length
/
cs
->
mbmaxlen
;
char_length1
=
my_charpos
(
cs
,
key
,
key
+
char_length_key
,
char_length1
);
set_if_smaller
(
char_length_key
,
char_length1
);
char_length2
=
my_charpos
(
cs
,
pos
,
pos
+
char_length_rec
,
char_length2
);
set_if_smaller
(
char_length_rec
,
char_length2
);
}
if
(
cs
->
coll
->
strnncollsp
(
seg
->
charset
,
...
...
mysql-test/r/information_schema.result
View file @
ba4ac587
...
...
@@ -748,3 +748,7 @@ TABLE_CONSTRAINTS TABLE_NAME select
KEY_COLUMN_USAGE TABLE_NAME select
delete from mysql.user where user='mysqltest_4';
flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*)
information_schema 15
mysql 17
mysql-test/t/information_schema.test
View file @
ba4ac587
# This test uses grants, which can't get tested for embedded server
# This test
uses grants, which can't get tested for embedded server
--
source
include
/
not_embedded
.
inc
# Test for information_schema.schemata &
...
...
@@ -486,3 +486,10 @@ where COLUMN_NAME='TABLE_NAME';
connection
default
;
delete
from
mysql
.
user
where
user
=
'mysqltest_4'
;
flush
privileges
;
#
# Bug #9404 information_schema: Weird error messages
# with SELECT SUM() ... GROUP BY queries
#
SELECT
table_schema
,
count
(
*
)
FROM
information_schema
.
TABLES
GROUP
BY
TABLE_SCHEMA
;
mysql-test/t/range.test
View file @
ba4ac587
--
source
include
/
have_innodb
.
inc
#
# Problem with range optimizer
#
...
...
scripts/mysql_install_db.sh
View file @
ba4ac587
...
...
@@ -11,7 +11,6 @@ in_rpm=0
windows
=
0
defaults
=
""
user
=
""
tmp_file
=
/tmp/mysql_install_db.
$$
case
"
$1
"
in
--no-defaults
|
--defaults-file
=
*
|
--defaults-extra-file
=
*
)
...
...
@@ -223,10 +222,8 @@ then
then
echo
"Fill help tables"
fi
echo
"use mysql;"
>
$tmp_file
cat
$tmp_file
$fill_help_tables
|
eval
"
$mysqld_install_cmd_line
"
(
echo
"use mysql;"
;
cat
$fill_help_tables
)
|
eval
"
$mysqld_install_cmd_line
"
res
=
$?
rm
$tmp_file
if
test
$res
!=
0
then
echo
""
...
...
sql/item_func.cc
View file @
ba4ac587
...
...
@@ -2533,6 +2533,28 @@ longlong Item_func_bit_count::val_int()
#ifdef HAVE_DLOPEN
void
udf_handler
::
cleanup
()
{
if
(
!
not_original
)
{
if
(
initialized
)
{
if
(
u_d
->
func_deinit
!=
NULL
)
{
void
(
*
deinit
)(
UDF_INIT
*
)
=
(
void
(
*
)(
UDF_INIT
*
))
u_d
->
func_deinit
;
(
*
deinit
)(
&
initid
);
}
free_udf
(
u_d
);
initialized
=
FALSE
;
}
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
buffers
=
0
;
}
}
bool
udf_handler
::
fix_fields
(
THD
*
thd
,
TABLE_LIST
*
tables
,
Item_result_field
*
func
,
uint
arg_count
,
Item
**
arguments
)
...
...
@@ -2805,6 +2827,13 @@ my_decimal *udf_handler::val_decimal(my_bool *null_value, my_decimal *dec_buf)
}
void
Item_udf_func
::
cleanup
()
{
udf
.
cleanup
();
Item_func
::
cleanup
();
}
double
Item_func_udf_float
::
val_real
()
{
DBUG_ASSERT
(
fixed
==
1
);
...
...
@@ -2930,21 +2959,8 @@ String *Item_func_udf_str::val_str(String *str)
udf_handler
::~
udf_handler
()
{
if
(
!
not_original
)
{
if
(
initialized
)
{
if
(
u_d
->
func_deinit
!=
NULL
)
{
void
(
*
deinit
)(
UDF_INIT
*
)
=
(
void
(
*
)(
UDF_INIT
*
))
u_d
->
func_deinit
;
(
*
deinit
)(
&
initid
);
}
free_udf
(
u_d
);
}
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
}
/* Everything should be properly cleaned up by this moment. */
DBUG_ASSERT
(
not_original
||
!
(
initialized
||
buffers
));
}
#else
...
...
sql/item_func.h
View file @
ba4ac587
...
...
@@ -879,6 +879,7 @@ public:
fixed
=
1
;
return
res
;
}
void
cleanup
();
Item_result
result_type
()
const
{
return
udf
.
result_type
();
}
table_map
not_null_tables
()
const
{
return
0
;
}
};
...
...
sql/item_sum.cc
View file @
ba4ac587
...
...
@@ -2456,6 +2456,17 @@ bool Item_udf_sum::add()
DBUG_RETURN
(
0
);
}
void
Item_udf_sum
::
cleanup
()
{
/*
udf_handler::cleanup() nicely handles case when we have not
original item but one created by copy_or_same() method.
*/
udf
.
cleanup
();
Item_sum
::
cleanup
();
}
Item
*
Item_sum_udf_float
::
copy_or_same
(
THD
*
thd
)
{
return
new
(
thd
->
mem_root
)
Item_sum_udf_float
(
thd
,
this
);
...
...
sql/item_sum.h
View file @
ba4ac587
...
...
@@ -667,6 +667,7 @@ public:
bool
add
();
void
reset_field
()
{};
void
update_field
()
{};
void
cleanup
();
};
...
...
sql/sql_udf.h
View file @
ba4ac587
...
...
@@ -67,6 +67,7 @@ class udf_handler :public Sql_alloc
bool
get_arguments
();
bool
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tlist
,
Item_result_field
*
item
,
uint
arg_count
,
Item
**
args
);
void
cleanup
();
double
val
(
my_bool
*
null_value
)
{
if
(
get_arguments
())
...
...
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