mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge bk-internal:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
commit
3c2221b54d
12 changed files with 132 additions and 33 deletions
|
@ -141,3 +141,22 @@ t1 CREATE TABLE `t1` (
|
|||
`a` binary(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (col1 binary(4));
|
||||
insert into t1 values ('a'),('a ');
|
||||
select hex(col1) from t1;
|
||||
hex(col1)
|
||||
61000000
|
||||
61200000
|
||||
alter table t1 modify col1 binary(10);
|
||||
select hex(col1) from t1;
|
||||
hex(col1)
|
||||
61000000000000000000
|
||||
61200000000000000000
|
||||
insert into t1 values ('b'),('b ');
|
||||
select hex(col1) from t1;
|
||||
hex(col1)
|
||||
61000000000000000000
|
||||
61200000000000000000
|
||||
62000000000000000000
|
||||
62200000000000000000
|
||||
drop table t1;
|
||||
|
|
|
@ -4768,6 +4768,20 @@ Handler
|
|||
Inner
|
||||
drop procedure bug15011|
|
||||
drop table t3|
|
||||
drop function if exists bug17615|
|
||||
create table t3 (a varchar(256) unicode)|
|
||||
create function bug17615() returns varchar(256) unicode
|
||||
begin
|
||||
declare tmp_res varchar(256) unicode;
|
||||
set tmp_res= 'foo string';
|
||||
return tmp_res;
|
||||
end|
|
||||
insert into t3 values(bug17615())|
|
||||
select * from t3|
|
||||
a
|
||||
foo string
|
||||
drop function bug17615|
|
||||
drop table t3|
|
||||
drop procedure if exists bug17476|
|
||||
create table t3 ( d date )|
|
||||
insert into t3 values
|
||||
|
|
|
@ -772,3 +772,10 @@ productid zlevelprice
|
|||
003trans 39.98
|
||||
004trans 31.18
|
||||
drop table t1, t2;
|
||||
create table t1 (f1 decimal(5));
|
||||
insert into t1 values (40);
|
||||
flush tables;
|
||||
select f1 from t1 where f1 in (select f1 from t1);
|
||||
f1
|
||||
40
|
||||
drop table t1;
|
||||
|
|
|
@ -89,3 +89,15 @@ show create table t1;
|
|||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#16857
|
||||
#
|
||||
create table t1 (col1 binary(4));
|
||||
insert into t1 values ('a'),('a ');
|
||||
select hex(col1) from t1;
|
||||
alter table t1 modify col1 binary(10);
|
||||
select hex(col1) from t1;
|
||||
insert into t1 values ('b'),('b ');
|
||||
select hex(col1) from t1;
|
||||
drop table t1;
|
||||
|
|
|
@ -5616,6 +5616,28 @@ drop table t3|
|
|||
|
||||
|
||||
#
|
||||
# BUG#17615: problem with character set
|
||||
#
|
||||
--disable_warnings
|
||||
drop function if exists bug17615|
|
||||
--enable_warnings
|
||||
|
||||
create table t3 (a varchar(256) unicode)|
|
||||
|
||||
create function bug17615() returns varchar(256) unicode
|
||||
begin
|
||||
declare tmp_res varchar(256) unicode;
|
||||
set tmp_res= 'foo string';
|
||||
return tmp_res;
|
||||
end|
|
||||
|
||||
insert into t3 values(bug17615())|
|
||||
select * from t3|
|
||||
|
||||
drop function bug17615|
|
||||
drop table t3|
|
||||
|
||||
|
||||
# BUG#17476: Stored procedure not returning data when it is called first
|
||||
# time per connection
|
||||
#
|
||||
|
|
|
@ -377,3 +377,11 @@ insert INTO t2 SELECT * FROM t1;
|
|||
select * from t2;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #17826 'type_decimal' fails with ps-protocol
|
||||
#
|
||||
create table t1 (f1 decimal(5));
|
||||
insert into t1 values (40);
|
||||
flush tables;
|
||||
select f1 from t1 where f1 in (select f1 from t1);
|
||||
drop table t1;
|
||||
|
|
|
@ -24,9 +24,10 @@ DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER
|
|||
# default_options.h, generated from default_options.h.in)
|
||||
# See automake/autoconf docs for details
|
||||
|
||||
noinst_LIBRARIES= liboptions.a libnet.a
|
||||
noinst_LTLIBRARIES= liboptions.la
|
||||
noinst_LIBRARIES= libnet.a
|
||||
|
||||
liboptions_a_CXXFLAGS= $(CXXFLAGS) \
|
||||
liboptions_la_CXXFLAGS= $(CXXFLAGS) \
|
||||
-DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \
|
||||
-DDEFAULT_LOG_FILE_NAME="$(localstatedir)/mysqlmanager.log" \
|
||||
-DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" \
|
||||
|
@ -35,8 +36,8 @@ liboptions_a_CXXFLAGS= $(CXXFLAGS) \
|
|||
-DDEFAULT_CONFIG_FILE="/etc/my.cnf" \
|
||||
-DPROTOCOL_VERSION=@PROTOCOL_VERSION@
|
||||
|
||||
liboptions_a_SOURCES= options.h options.cc priv.h priv.cc
|
||||
liboptions_a_LIBADD= $(top_builddir)/libmysql/get_password.$(OBJEXT)
|
||||
liboptions_la_SOURCES= options.h options.cc priv.h priv.cc
|
||||
liboptions_la_LIBADD= $(top_builddir)/libmysql/get_password.lo
|
||||
|
||||
# MySQL sometimes uses symlinks to reuse code
|
||||
# All symlinked files are grouped in libnet.a
|
||||
|
@ -77,7 +78,7 @@ mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \
|
|||
mysql_manager_error.h \
|
||||
portability.h
|
||||
|
||||
mysqlmanager_LDADD= liboptions.a \
|
||||
mysqlmanager_LDADD= liboptions.la \
|
||||
libnet.a \
|
||||
$(top_builddir)/vio/libvio.a \
|
||||
$(top_builddir)/mysys/libmysys.a \
|
||||
|
|
|
@ -379,6 +379,16 @@ static void do_cut_string_complex(Copy_field *copy)
|
|||
|
||||
|
||||
|
||||
static void do_expand_binary(Copy_field *copy)
|
||||
{
|
||||
CHARSET_INFO *cs= copy->from_field->charset();
|
||||
memcpy(copy->to_ptr,copy->from_ptr,copy->from_length);
|
||||
cs->cset->fill(cs, copy->to_ptr+copy->from_length,
|
||||
copy->to_length-copy->from_length, '\0');
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void do_expand_string(Copy_field *copy)
|
||||
{
|
||||
CHARSET_INFO *cs= copy->from_field->charset();
|
||||
|
@ -583,7 +593,13 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
|
|||
return (from->charset()->mbmaxlen == 1 ?
|
||||
do_cut_string : do_cut_string_complex);
|
||||
else if (to_length > from_length)
|
||||
return do_expand_string;
|
||||
{
|
||||
if ((to->flags & BINARY_FLAG) != 0)
|
||||
return do_expand_binary;
|
||||
else
|
||||
return do_expand_string;
|
||||
}
|
||||
|
||||
}
|
||||
else if (to->real_type() != from->real_type() ||
|
||||
to_length != from_length ||
|
||||
|
|
|
@ -61,7 +61,7 @@ bool hostname_cache_init()
|
|||
if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE, offset,
|
||||
sizeof(struct in_addr),NULL,
|
||||
(hash_free_key) free,
|
||||
&my_charset_latin1)))
|
||||
&my_charset_bin)))
|
||||
return 1;
|
||||
hostname_cache->clear();
|
||||
(void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW);
|
||||
|
|
|
@ -698,12 +698,6 @@ bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
|
|||
return 1;
|
||||
|
||||
cache->setup(args[0]);
|
||||
/*
|
||||
If it is preparation PS only then we do not know values of parameters =>
|
||||
cant't get there values and do not need that values.
|
||||
*/
|
||||
if (!thd->stmt_arena->is_stmt_prepare())
|
||||
cache->store(args[0]);
|
||||
if (cache->cols() == 1)
|
||||
{
|
||||
if ((used_tables_cache= args[0]->used_tables()))
|
||||
|
|
|
@ -4881,6 +4881,7 @@ Item_func_sp::fix_length_and_dec()
|
|||
{
|
||||
decimals= result_field->decimals();
|
||||
max_length= result_field->field_length;
|
||||
collation.set(result_field->charset());
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
@ -4891,6 +4892,7 @@ Item_func_sp::fix_length_and_dec()
|
|||
}
|
||||
decimals= field->decimals();
|
||||
max_length= field->field_length;
|
||||
collation.set(field->charset());
|
||||
maybe_null= 1;
|
||||
delete field;
|
||||
DBUG_VOID_RETURN;
|
||||
|
|
|
@ -204,24 +204,24 @@ the standard MySQL package.
|
|||
|
||||
Please note that this is a dynamically linked binary!
|
||||
|
||||
%package embedded
|
||||
Requires: %{name}-devel
|
||||
Summary: MySQL - embedded library
|
||||
Group: Applications/Databases
|
||||
Obsoletes: mysql-embedded
|
||||
|
||||
%description embedded
|
||||
This package contains the MySQL server as an embedded library.
|
||||
|
||||
The embedded MySQL server library makes it possible to run a
|
||||
full-featured MySQL server inside the client application.
|
||||
The main benefits are increased speed and more simple management
|
||||
for embedded applications.
|
||||
|
||||
The API is identical for the embedded MySQL version and the
|
||||
client/server version.
|
||||
|
||||
%{see_base}
|
||||
#%package embedded
|
||||
#Requires: %{name}-devel
|
||||
#Summary: MySQL - embedded library
|
||||
#Group: Applications/Databases
|
||||
#Obsoletes: mysql-embedded
|
||||
#
|
||||
#%description embedded
|
||||
#This package contains the MySQL server as an embedded library.
|
||||
#
|
||||
#The embedded MySQL server library makes it possible to run a
|
||||
#full-featured MySQL server inside the client application.
|
||||
#The main benefits are increased speed and more simple management
|
||||
#for embedded applications.
|
||||
#
|
||||
#The API is identical for the embedded MySQL version and the
|
||||
#client/server version.
|
||||
#
|
||||
#%{see_base}
|
||||
|
||||
%prep
|
||||
%setup -n mysql-%{mysql_version}
|
||||
|
@ -712,14 +712,18 @@ fi
|
|||
%attr(755, root, root) %{_sbindir}/mysqld-max
|
||||
%attr(644, root, root) %{_libdir}/mysql/mysqld-max.sym
|
||||
|
||||
%files embedded
|
||||
%defattr(-, root, root, 0755)
|
||||
#%files embedded
|
||||
#%defattr(-, root, root, 0755)
|
||||
# %attr(644, root, root) %{_libdir}/mysql/libmysqld.a
|
||||
|
||||
# The spec file changelog only includes changes made to the spec file
|
||||
# itself - note that they must be ordered by date (important when
|
||||
# merging BK trees)
|
||||
%changelog
|
||||
* Fri Mar 03 2006 Kent Boortz <kent@mysql.com>
|
||||
|
||||
- Don't output an embedded package as it is empty
|
||||
|
||||
* Fri Jan 10 2006 Joerg Bruehe <joerg@mysql.com>
|
||||
|
||||
- Use "-i" on "make test-force";
|
||||
|
|
Loading…
Add table
Reference in a new issue