Commit c7105d80 authored by unknown's avatar unknown

Fixed INSERT DELAYED with Innobase

Fix for shutdown on NT
Fixed bug when using wrong dates from blob field.


BitKeeper/deleted/.del-df_crash.result~4a3dbee64843953d:
  Delete: mysql-test/r/df_crash.result
BitKeeper/deleted/.del-df_crash.test~4c365178fe437f6:
  Delete: mysql-test/t/df_crash.test
Docs/manual.texi:
  Changelog
innobase/ib_config.h.in:
  automatic changed file
innobase/ib_config.h:
  automatic changed file
mysql-test/r/func_time.result:
  Test case for bug in time functions
mysql-test/r/innobase.result:
  Test for INSERT DELAYED
mysql-test/t/func_time.test:
  Test case for bug in time functions
mysql-test/t/innobase.test:
  Test for INSERT DELAYED
scripts/mysql_convert_table_format.sh:
  Added --socket and --port
sql/ha_innobase.cc:
  Fix bug when compiling with SAFE_MUTEX
  Cleaner comment when using SHOW TABLE STATUS
sql/mysqld.cc:
  Fix for shutdown on NT
sql/sql_insert.cc:
  Fixed problem with Innobase and INSERT DELAYED
sql/sql_udf.cc:
  Support for UDF on windows
sql/time.cc:
  Fixed bug when using wrong dates from blob field.
strings/ctype-tis620.c:
  Removed not used variable
support-files/mysql-max.spec.sh:
  Removed old not used section
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent 5dfbb2ca
jani@janikt.pp.saunalahti.fi
monty@donna.mysql.fi
......@@ -14029,12 +14029,13 @@ adopt a consistent convention, such as always creating databases and
tables using lowercase names.
One way to avoid this problem is to start @code{mysqld} with @code{-O
lower_case_table_names=1}.
lower_case_table_names=1}. By default this option is 1 on windows and 0 on
Unix.
In this case @strong{MySQL} will on Windows/NT convert all table names
to lower case on storage and lookup. Note that you need to first
convert your old table names to lower case before starting @code{mysqld}
with this option.
If @code{lower_case_table_names} is 1 @strong{MySQL} will convert all
table names to lower case on storage and lookup. Note that if you
change this option, you need to first convert your old table names to
lower case before starting @code{mysqld}.
@cindex variables, user
@cindex user variables
......@@ -42640,6 +42641,10 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Added @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()}. This make it
possible to know how many rows a query would have returned if one hadn't
used @code{LIMIT}.
@item
Changed output format of @code{SHOW OPEN TABLES}.
@item
Allow @code{SELECT expression LIMIT ...}.
......@@ -42738,6 +42743,13 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.37
@itemize @bullet
@item
Disabled @code{INSERT DELAYED} for tables that supports transactions.
@item
Fixed bug when using date functions on @code{TEXT}/@code{BLOB} column
with wrong date format.
@item
UDF's now also works on windows. (Patch by Ralph Mason)
@item
Fixed bug in @code{ALTER TABLE} and @code{LOAD DATA INFILE} that disabled
key-sorting. These command should now be faster in most cases.
@item
......@@ -47974,6 +47986,16 @@ Change @code{INSERT ... SELECT} to use concurrent inserts.
Return the original field types() when doing @code{SELECT MIN(column)
... GROUP BY}.
@item
Multiple result sets.
@item
Change the protocol to allow binary transfer of values. To do this
efficiently, we need to add an API to allow binding of variables.
@item
Add @code{PREPARE} of statements and sending of parameters to @code{mysqld}.
@item
Make it possible to specify @code{long_query_time} with a granularity
in microseconds.
@item
Add range checking to @code{MERGE} tables.
@item
Port of @strong{MySQL} to BeOS.
......@@ -20,3 +20,6 @@
/* Version number of package */
#define VERSION "0.90"
/* No inlining because gcc broken on HP-UX */
/* #undef UNIV_MUST_NOT_INLINE */
......@@ -19,3 +19,6 @@
/* Version number of package */
#undef VERSION
/* No inlining because gcc broken on HP-UX */
#undef UNIV_MUST_NOT_INLINE
month(updated)
10
NULL
year(updated)
1999
NULL
......@@ -192,3 +192,7 @@ January
monthname(date)
NULL
January
month(updated)
NULL
year(updated)
NULL
......@@ -445,5 +445,7 @@ i j
1 2
MIN(B) MAX(b)
1 1
a
1
table type possible_keys key key_len ref rows Extra
t1 range PRIMARY PRIMARY 4 NULL 1 where used
drop table if exists db_crash;
CREATE TABLE df_crash (
updated text
) TYPE=MyISAM;
INSERT INTO df_crash VALUES ('1999-10-5');
insert into df_crash values ('');
select month(updated) from df_crash;
select year(updated) from df_crash;
drop table df_crash;
......@@ -119,3 +119,12 @@ insert into t2 values (2, "2000-01-01");
select monthname(date) from t1 inner join t2 on t1.id = t2.id;
select monthname(date) from t1 inner join t2 on t1.id = t2.id order by t1.id;
drop table t1,t2;
#
# Test bug with month() and year() on text fields with wrong information
CREATE TABLE t1 (updated text) TYPE=MyISAM;
INSERT INTO t1 VALUES ('');
SELECT month(updated) from t1;
SELECT year(updated) from t1;
drop table t1;
......@@ -5,7 +5,7 @@
#
drop table if exists t1,t2;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innobase;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innodb;
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
select id, code, name from t1 order by id;
......@@ -28,7 +28,7 @@ CREATE TABLE t1 (
PRIMARY KEY (id),
KEY parent_id (parent_id),
KEY level (level)
) type=innobase;
) type=innodb;
INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
update t1 set parent_id=parent_id+100;
select * from t1 where parent_id=102;
......@@ -57,7 +57,7 @@ CREATE TABLE t1 (
gesuchnr int(11) DEFAULT '0' NOT NULL,
benutzer_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (gesuchnr,benutzer_id)
) type=innobase;
) type=innodb;
replace into t1 (gesuchnr,benutzer_id) values (2,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1);
......@@ -69,7 +69,7 @@ drop table t1;
# test delete using hidden_primary_key
#
create table t1 (a int) type=innobase;
create table t1 (a int) type=innodb;
insert into t1 values (1), (2);
optimize table t1;
delete from t1 where a = 1;
......@@ -77,7 +77,7 @@ select * from t1;
check table t1;
drop table t1;
create table t1 (a int,b varchar(20)) type=innobase;
create table t1 (a int,b varchar(20)) type=innodb;
insert into t1 values (1,""), (2,"testing");
delete from t1 where a = 1;
select * from t1;
......@@ -90,7 +90,7 @@ drop table t1;
# Test of reading on secondary key with may be null
create table t1 (a int,b varchar(20),key(a)) type=innobase;
create table t1 (a int,b varchar(20),key(a)) type=innodb;
insert into t1 values (1,""), (2,"testing");
select * from t1 where a = 1;
drop table t1;
......@@ -99,7 +99,7 @@ drop table t1;
# Test rollback
#
create table t1 (n int not null primary key) type=innobase;
create table t1 (n int not null primary key) type=innodb;
set autocommit=0;
insert into t1 values (4);
rollback;
......@@ -126,7 +126,7 @@ drop table t1;
# Testing transactions
#
create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=innobase;
create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) type=innodb;
begin;
insert into t1 values(1,'hamdouni');
select id as afterbegin_id,nom as afterbegin_nom from t1;
......@@ -144,7 +144,7 @@ drop table t1;
# Simple not autocommit test
#
CREATE TABLE t1 (id char(8) not null primary key, val int not null) type=innobase;
CREATE TABLE t1 (id char(8) not null primary key, val int not null) type=innodb;
insert into t1 values ('pippo', 12);
-- error 1062
insert into t1 values ('pippo', 12); # Gives error
......@@ -167,12 +167,12 @@ set autocommit=1;
# The following simple tests failed at some point
#
CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) TYPE=innobase;
CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) TYPE=innodb;
INSERT INTO t1 VALUES (1, 'Jochen');
select * from t1;
drop table t1;
CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) TYPE=innobase;
CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) TYPE=innodb;
set autocommit=0;
INSERT INTO t1 SET _userid='marc@anyware.co.uk';
COMMIT;
......@@ -191,7 +191,7 @@ CREATE TABLE t1 (
ref_email varchar(100) DEFAULT '' NOT NULL,
detail varchar(200),
PRIMARY KEY (user_id,ref_email)
)type=innobase;
)type=innodb;
INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar');
select * from t1 where user_id=10292;
......@@ -212,11 +212,11 @@ show index from t1;
drop table t1;
#
# Test of ALTER TABLE and innobase tables
# Test of ALTER TABLE and innodb tables
#
create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
alter table t1 type=innobase;
alter table t1 type=innodb;
insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
select * from t1;
update t1 set col2='7' where col1='4';
......@@ -228,10 +228,10 @@ select * from t1;
drop table t1;
#
# INSERT INTO innobase tables
# INSERT INTO innodb tables
#
create table t1 (a int not null , b int, primary key (a)) type = innobase;
create table t1 (a int not null , b int, primary key (a)) type = innodb;
create table t2 (a int not null , b int, primary key (a)) type = myisam;
insert into t1 VALUES (1,3) , (2,3), (3,3);
select * from t1;
......@@ -255,7 +255,7 @@ CREATE TABLE t1 (
passwd varchar(32) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE ggid (ggid)
) TYPE=innobase;
) TYPE=innodb;
insert into t1 (ggid,passwd) values ('test1','xxx');
insert into t1 (ggid,passwd) values ('test2','yyy');
......@@ -293,7 +293,7 @@ CREATE TABLE t1 (
approved datetime,
dummy_primary_key int(11) NOT NULL auto_increment,
PRIMARY KEY (dummy_primary_key)
) TYPE=innobase;
) TYPE=innodb;
INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
......@@ -313,7 +313,7 @@ CREATE TABLE t1 (
KEY (id),
KEY parent_id (parent_id),
KEY level (level)
) type=innobase;
) type=innodb;
INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
INSERT INTO t1 values (179,5,2);
update t1 set parent_id=parent_id+100;
......@@ -346,7 +346,7 @@ CREATE TABLE t1 (
sca_sch_desc varchar(16),
PRIMARY KEY (sca_code, cat_code, lan_code),
INDEX sca_pic (sca_pic)
) type = innobase ;
) type = innodb ;
INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
select count(*) from t1 where sca_code = 'PD';
......@@ -368,7 +368,7 @@ drop table t1;
# Test of opening table twice and timestamps
#
set @a:=now();
CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) type=innobase;
CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) type=innodb;
insert into t1 (a) values(1),(2),(3);
select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
update t1 set a=5 where a=1;
......@@ -378,7 +378,7 @@ drop table t1;
#
# Test with variable length primary key
#
create table t1 (a varchar(100) not null, primary key(a), b int not null) type=innobase;
create table t1 (a varchar(100) not null, primary key(a), b int not null) type=innodb;
insert into t1 values("hello",1),("world",2);
select * from t1 order by b desc;
optimize table t1;
......@@ -388,7 +388,7 @@ drop table t1;
#
# Test of create index with NULL columns
#
create table t1 (i int, j int ) TYPE=innobase;
create table t1 (i int, j int ) TYPE=innodb;
insert into t1 values (1,2);
select * from t1 where i=1 and j=2;
create index ax1 on t1 (i,j);
......@@ -403,17 +403,29 @@ CREATE TABLE t1 (
a int3 unsigned NOT NULL,
b int1 unsigned NOT NULL,
UNIQUE (a, b)
) TYPE = innobase;
) TYPE = innodb;
INSERT INTO t1 VALUES (1, 1);
SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
drop table t1;
#
# Test INSERT DELAYED
#
CREATE TABLE t1 (a int unsigned NOT NULL) type=innodb;
--error 1031
INSERT DELAYED INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
SELECT * FROM t1;
DROP TABLE t1;
#
# Crash when using many tables (Test case by Jeremy D Zawodny)
#
create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) type = Innobase;
create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) type = innodb;
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
explain select * from t1 where a > 0 and a < 50;
drop table t1;
......@@ -8,10 +8,12 @@ use Getopt::Long;
$opt_help=$opt_version=$opt_verbose=$opt_force=0;
$opt_user=$opt_database=$opt_password=undef;
$opt_host="localhost";
$opt_socket="";
$opt_type="MYISAM";
$opt_port=0;
$exit_status=0;
GetOptions("force","help","host=s","password=s","user=s","type=s","verbose","version") ||
GetOptions("force","help","host=s","password=s","user=s","type=s","verbose","version","socket=s", "port=i") ||
usage(0);
usage($opt_version) if ($#ARGV < 0 || $opt_help || $opt_version);
$opt_database=shift(@ARGV);
......@@ -22,7 +24,17 @@ if (uc($opt_type) eq "HEAP")
exit(1);
}
$dbh = DBI->connect("DBI:mysql:$opt_database:$opt_host",
$connect_opt="";
if ($opt_port)
{
$connect_opt.= ";port=$opt_port";
}
if (length($opt_socket))
{
$connect_opt.=";mysql_socket=$opt_socket";
}
$dbh = DBI->connect("DBI:mysql:$opt_database:${opt_host}$connect_opt",
$opt_user,
$opt_password,
{ PrintError => 0})
......@@ -96,6 +108,12 @@ Conversion of a MySQL tables to other table types.
--password='password'
Password for the current user.
--port=port
TCP/IP port to connect to if host is not "localhost".
--socket='/path/to/socket'
Socket to connect with.
--type='table-type'
Converts tables to the given table type (Default: $opt_type)
MySQL 3.23 supports at least the BDB, ISAM and MYISAM types.
......
......@@ -35,6 +35,9 @@ Innobase */
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
/* The following must be declared here so that we can handle SAFE_MUTEX */
pthread_mutex_t innobase_mutex;
#include "ha_innobase.h"
/* Store MySQL definition of 'byte': in Linux it is char while Innobase
......@@ -42,6 +45,9 @@ uses unsigned char */
typedef byte mysql_byte;
#define INSIDE_HA_INNOBASE_CC
#ifdef SAFE_MUTEX
#undef pthread_mutex_t
#endif
/* Include necessary Innobase headers */
extern "C" {
......@@ -91,8 +97,6 @@ ulong innobase_active_counter = 0;
char* innobase_home = NULL;
pthread_mutex_t innobase_mutex;
static HASH innobase_open_tables;
static mysql_byte* innobase_get_key(INNOBASE_SHARE *share,uint *length,
......@@ -2601,14 +2605,19 @@ ha_innobase::update_table_comment(
{
uint length=strlen(comment);
char *str=my_malloc(length + 100,MYF(0));
char *str=my_malloc(length + 100,MYF(0)), *pos;
if (!str)
return (char*)comment;
sprintf(str,
"%s; Innobase free: %lu kB",
comment, (ulong) innobase_get_free_space());
pos=str;
if (length)
{
pos=strmov(str,comment);
*pos++=';';
*pos++=' ';
}
sprintf(pos, "Innobase free: %lu kB", (ulong) innobase_get_free_space());
return(str);
}
......
......@@ -437,7 +437,7 @@ static void close_connections(void)
#ifdef __NT__
if ( hPipe != INVALID_HANDLE_VALUE )
{
HANDLE hTempPipe = hPipe;
HANDLE hTempPipe = &hPipe;
DBUG_PRINT( "quit", ("Closing named pipes") );
hPipe = INVALID_HANDLE_VALUE;
CancelIo( hTempPipe );
......
......@@ -225,7 +225,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
break;
}
}
if (lock_type == TL_WRITE_DELAYED && ! table->file->has_transactions())
if (lock_type == TL_WRITE_DELAYED)
{
error=write_delayed(thd,table,duplic,query, thd->query_length, log_on);
query=0;
......@@ -888,6 +888,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
my_pthread_setspecific_ptr(THR_THD, thd) ||
my_pthread_setspecific_ptr(THR_NET, &thd->net))
{
thd->fatal_error=1;
strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES));
goto end;
}
......@@ -906,6 +907,12 @@ static pthread_handler_decl(handle_delayed_insert,arg)
thd->fatal_error=1; // Abort waiting inserts
goto end;
}
if (di->table->file->has_transactions())
{
thd->fatal_error=1;
my_error(ER_ILLEGAL_HA, MYF(0), di->table_list->real_name);
goto end;
}
di->table->copy_blobs=1;
/* One can now use this */
......
......@@ -35,10 +35,28 @@
#endif
#include "mysql_priv.h"
#ifdef HAVE_DLOPEN
extern "C"
{
#if defined(__WIN__)
void* dlsym(void* lib,const char* name)
{
return GetProcAddress((HMODULE)lib,name);
}
void* dlopen(const char* libname,int unused)
{
return LoadLibraryEx(libname,NULL,0);
}
void dlclose(void* lib)
{
FreeLibrary((HMODULE)lib);
}
#else
#include <dlfcn.h>
#endif
#include <stdarg.h>
#include <hash.h>
}
......@@ -62,6 +80,7 @@ static udf_func *add_udf(char *name, Item_result ret, char *dl,
static void del_udf(udf_func *udf);
static void *find_udf_dl(const char *dl);
static void init_syms(udf_func *tmp)
{
char nm[MAX_FIELD_NAME+16],*end;
......@@ -232,7 +251,7 @@ static void del_udf(udf_func *udf)
uint name_length=udf->name_length;
udf->name=(char*) "*";
udf->name_length=1;
hash_update(&udf_hash,(byte*) udf,name,name_length);
hash_update(&udf_hash,(byte*) udf,(byte*) name,name_length);
}
DBUG_VOID_RETURN;
}
......@@ -262,7 +281,7 @@ udf_func *find_udf(const char *name,uint length,bool mark_used)
/* TODO: This should be changed to reader locks someday! */
pthread_mutex_lock(&THR_LOCK_udf);
udf=(udf_func*) hash_search(&udf_hash,name,
udf=(udf_func*) hash_search(&udf_hash,(byte*) name,
length ? length : (uint) strlen(name));
if (mark_used)
udf->usage_count++;
......@@ -304,7 +323,7 @@ static udf_func *add_udf(char *name, Item_result ret, char *dl,
tmp->returns = ret;
tmp->type = type;
tmp->usage_count=1;
if (hash_insert(&udf_hash,(char*) tmp))
if (hash_insert(&udf_hash,(byte*) tmp))
return 0;
using_udf_functions=1;
return tmp;
......@@ -344,7 +363,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
}
pthread_mutex_lock(&THR_LOCK_udf);
if (hash_search(&udf_hash,udf->name, udf->name_length))
if (hash_search(&udf_hash,(byte*) udf->name, udf->name_length))
{
net_printf(&thd->net, ER_UDF_EXISTS, udf->name);
goto err;
......@@ -430,7 +449,7 @@ int mysql_drop_function(THD *thd,const char *udf_name)
DBUG_RETURN(1);
}
pthread_mutex_lock(&THR_LOCK_udf);
if (!(udf=(udf_func*) hash_search(&udf_hash,udf_name, (uint) strlen(udf_name))))
if (!(udf=(udf_func*) hash_search(&udf_hash,(byte*) udf_name, (uint) strlen(udf_name))))
{
net_printf(&thd->net, ER_FUNCTION_NOT_DEFINED, udf_name);
goto err;
......
......@@ -428,15 +428,11 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
uint field_length,year_length,digits,i,number_of_fields,date[7];
bool date_used=0;
const char *pos;
const char *end=str+length;
DBUG_ENTER("str_to_TIME");
DBUG_PRINT("enter",("str: %.*s",length,str));
if(!str)
DBUG_RETURN(TIMESTAMP_NONE);
const char *end=str+length;
for (; !isdigit(*str) && str != end ; str++) ; // Skip garbage
for (; str != end && !isdigit(*str) ; str++) ; // Skipp garbage
if (str == end)
DBUG_RETURN(TIMESTAMP_NONE);
/*
......@@ -562,7 +558,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
uint state;
l_time->neg=0;
for (; !isdigit(*str) && *str != '-' && str != end ; str++)
for (; str != end && !isdigit(*str) && *str != '-' ; str++)
length--;
if (str != end && *str == '-')
{
......
......@@ -598,7 +598,6 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
const char *end=ptr+ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
char *tmp;
for (; ptr != end && min_str != min_end ; ptr++)
{
......@@ -628,10 +627,6 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
}
*min_length= *max_length = (uint) (min_str - min_org);
/* Temporary fix for handling wild_one at end of string (key compression) */
// for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';)
// *--tmp=' ';
while (min_str != min_end)
*min_str++ = *max_str++ = ' '; // Because if key compression
return 0;
......
......@@ -257,31 +257,6 @@ fi
%attr(755, root, root) /usr/share/mysql/
%files client
%attr(755, root, root) /usr/bin/msql2mysql
%attr(755, root, root) /usr/bin/mysql
%attr(755, root, root) /usr/bin/mysqlaccess
%attr(755, root, root) /usr/bin/mysqladmin
%attr(755, root, root) /usr/bin/mysql_find_rows
%attr(755, root, root) /usr/bin/mysqldump
%attr(755, root, root) /usr/bin/mysqlimport
%attr(755, root, root) /usr/bin/mysqlshow
%attr(755, root, root) /usr/bin/mysqlbinlog
%attr(644, root, man) %doc /usr/man/man1/mysql.1*
%attr(644, root, man) %doc /usr/man/man1/isamchk.1*
%attr(644, root, man) %doc /usr/man/man1/isamlog.1*
%attr(644, root, man) %doc /usr/man/man1/mysql_zap.1*
%attr(644, root, man) %doc /usr/man/man1/mysqlaccess.1*
%attr(644, root, man) %doc /usr/man/man1/mysqladmin.1*
%attr(644, root, man) %doc /usr/man/man1/mysqld.1*
%attr(644, root, man) %doc /usr/man/man1/mysqld_multi.1*
%attr(644, root, man) %doc /usr/man/man1/mysqldump.1*
%attr(644, root, man) %doc /usr/man/man1/mysqlshow.1*
%attr(644, root, man) %doc /usr/man/man1/perror.1*
%attr(644, root, man) %doc /usr/man/man1/replace.1*
%attr(644, root, man) %doc /usr/man/man1/safe_mysqld.1*
%changelog
* 2000-04-01 Monty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment