Commit b2cec26d authored by unknown's avatar unknown

Fix that mysqladmin shutdown can be interrupted with ^C

Fixed bug with BLOB keys in BDB tables
Fixed problem with MERGE tables on OS with 32 bit files
Fixed that TIME_TO_SEC() works with negative times


Docs/manual.texi:
  Changelog
client/mysqladmin.c:
  Fix that mysqladmin shutdown can be interrupted with ^C
include/mysqld_error.h:
  Fixed typo
mysql-test/r/func_time.result:
  Added test case for negative times
mysql-test/t/func_time.test:
  Added test case for negative times
mysql-test/t/rpl000015-slave.sh:
  Removed warnings
mysql-test/t/rpl000016-slave.sh:
  Removed warnings
sql/field.cc:
  Fixed bug with BLOB keys in BDB tables
sql/field.h:
  Fixed bug with BLOB keys in BDB tables
sql/ha_berkeley.cc:
  Fixed bug with BLOB keys in BDB tables
sql/ha_myisammrg.cc:
  Fixed problem with MERGE tables on OS with 32 bit files
sql/item_timefunc.cc:
  Fixed that TIME_TO_SEC() works with negative times.
sql/share/swedish/errmsg.txt:
  Merge with 4.0
sql/sql_acl.cc:
  Fixed typo
parent b9e1b930
......@@ -46791,6 +46791,7 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code.
@menu
* News-3.23.45:: Changes in release 3.23.45
* News-3.23.44:: Changes in release 3.23.44
* News-3.23.43:: Changes in release 3.23.43
* News-3.23.42:: Changes in release 3.23.42
......@@ -46839,7 +46840,18 @@ not yet 100% confident in this code.
* News-3.23.0:: Changes in release 3.23.0
@end menu
@node News-3.23.44, News-3.23.43, News-3.23.x, News-3.23.x
@node News-3.23.45, News-3.23.44, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.45
@itemize @bullet
@item
Fixed bug with BDB tables and keys on @code{BLOB}'s.
@item
Fixed bug in @code{MERGE} tables on OS with 32 bit file pointers.
@item
Fixed bug in @code{TIME_TO_SEC()} when using negative values.
@end itemize
@node News-3.23.44, News-3.23.43, News-3.23.45, News-3.23.x
@appendixsubsec Changes in release 3.23.44
@itemize @bullet
@item
......@@ -46861,10 +46873,6 @@ Fixed problem with sjis character strings used within quoted table names.
Fixed coredump when using @code{CREATE ... FULLTEXT} keys with other table
handlers than MyISAM.
@item
Add missing @code{InnoDB} variables to @code{SHOW VARIABLES}.
@item
Foreign keys checking is now done for @code{InnoDB} tables.
@item
Don't use @code{signal()} on windows because this appears to not be
100 % reliable.
@item
......@@ -46881,6 +46889,57 @@ a core dump.
Applied portability fixes for OS/2 (Patch by Yuri Dario).
@end itemize
The following changes are for @code{InnoDB} tables:
@itemize @bullet
@item
Add missing @code{InnoDB} variables to @code{SHOW VARIABLES}.
@item
Foreign keys checking is now done for @code{InnoDB} tables.
@item
@code{DROP DATABASE} now works also for @code{InnoDB} tables.
@item
@code{InnoDB} now supports data files and raw disk partitions bigger
than 4 GB on those operating systems which have big files.
@item
@code{InnoDB} calculates better table cardinality estimates for the
MySQL optimizer.
@item
Accent characters in the default character set latin1 are ordered
according to the MySQL ordering.
NOTE: if you are using latin1 and have inserted characters whose code is >
127 to an indexed CHAR column, you should run CHECK TABLE on your table when
you upgrade to 3.23.44, and drop and reimport the table if CHECK TABLE
reports an error!
@item
A new @file{my.cnf} parameter @code{innodb_thread_concurrency} helps in
performance tuning in heavily concurrent environments.
@item
A new @code{my.cnf} parameter @code{innodb_fast_shutdown} speeds up
server shutdown.
@item
A new @code{my.cnf} parameter @code{innodb_force_recovery} helps to save
your data in case the disk image of the database becomes corrupt.
@item
@code{innodb_monitor} has been improved and a new
@code{innodb_table_monitor} added.
@item
Increased maximum key length from 500 to 7000 bytes.
@item
Fixed a bug in replication of auto-inc columns with multiline inserts.
@item
Fixed a bug when the case of letters changes in an update of an indexed
secondary column.
@item
Fixed a hang when there are > 24 data files.
@item
Fixed a crash when @code{MAX(col)} is selected from an empty table, and
col is a not the first column in a multi-column index.
@item
Fixed a bug in purge which could cause crashes.
@end itemize
@node News-3.23.43, News-3.23.42, News-3.23.44, News-3.23.x
@appendixsubsec Changes in release 3.23.43
@itemize @bullet
......@@ -46981,15 +47040,15 @@ Fixed possible problem with @code{shutdown} on Solaris where the
@item
InnoDB now supports < 4 GB rows. The former limit was 8000 bytes.
@item
The @code{doublewrite} file flush method is used in InnoDB.
The @code{doublewrite} file flush method is used in @code{InnoDB}.
It reduces the need for Unix fsync calls to a fraction and
improves performance on most Unix flavors.
@item
You can now use the InnoDB Monitor to print a lot of InnoDB state
You can now use the @code{InnoDB} Monitor to print a lot of @code{InnoDB} state
information, including locks, to the standard output; useful in
performance tuning.
@item
Several bugs which could cause hangs in InnoDB have been fixed.
Several bugs which could cause hangs in @code{InnoDB} have been fixed.
@item
Split @code{record_buffer} to @code{record_buffer} and
@code{record_rnd_buffer}. To make things compatible to previous MySQL
......@@ -47103,7 +47162,7 @@ Extended argument length in option files from 256 to 512 chars.
Fixed problem with shutdown when @code{INSERT DELAYED} was waiting for
a @code{LOCK TABLE}.
@item
Fixed coredump bug in InnoDB when tablespace was full.
Fixed coredump bug in @code{InnoDB} when tablespace was full.
@item
Fixed problem with @code{MERGE} tables and big tables (> 4G) when using
@code{ORDER BY}.
......@@ -47148,7 +47207,7 @@ New program @code{mysqlcheck}.
Added database name to output for administrative commands like @code{CHECK},
@code{REPAIR}, @code{OPTIMIZE}.
@item
Lots of portability fixes for InnoDB.
Lots of portability fixes for @code{InnoDB}.
@item
Changed optimizer so that queries like
@code{SELECT * FROM table_name,table_name2 ... ORDER BY key_part1 LIMIT #}
......@@ -23,7 +23,7 @@
#include <my_pthread.h> /* because of signal() */
#endif
#define ADMIN_VERSION "8.22"
#define ADMIN_VERSION "8.23"
#define MAX_MYSQL_VAR 64
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
#define MAX_TRUNC_LENGTH 3
......@@ -1130,7 +1130,7 @@ static void wait_pidfile(char *pidfile)
system_filename(buff,pidfile);
while ((fd = my_open(buff, O_RDONLY, MYF(0))) >= 0 &&
count++ < opt_shutdown_timeout)
count++ < opt_shutdown_timeout && !interrupted)
{
my_close(fd,MYF(0));
sleep(1);
......
......@@ -211,7 +211,7 @@
#define ER_DROP_DB_WITH_READ_LOCK 1208
#define ER_CREATE_DB_WITH_READ_LOCK 1209
#define ER_WRONG_ARGUMENTS 1210
#define ER_NO_PERMISSON_TO_CREATE_USER 1211
#define ER_NO_PERMISSION_TO_CREATE_USER 1211
#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
#define ER_LOCK_DEADLOCK 1213
#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214
......
......@@ -8,6 +8,8 @@ from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestam
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22") sec_to_time(time_to_sec("0:30:47")/6.21)
02:30:01 23001 54742 00:04:57
sec_to_time(time_to_sec('-838:59:59'))
-838:59:59
now()-curdate()*1000000-curtime()
0
strcmp(current_timestamp(),concat(current_date()," ",current_time()))
......
......@@ -9,6 +9,7 @@ select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_times
select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0;
select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"),
sec_to_time(time_to_sec("0:30:47")/6.21);
select sec_to_time(time_to_sec('-838:59:59'));
select now()-curdate()*1000000-curtime();
select strcmp(current_timestamp(),concat(current_date()," ",current_time()));
select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w");
......
rm $MYSQL_TEST_DIR/var/slave-data/master.info
rm -f $MYSQL_TEST_DIR/var/slave-data/master.info
rm $MYSQL_TEST_DIR/var/slave-data/master.info
rm -f $MYSQL_TEST_DIR/var/slave-data/master.info
......@@ -3466,9 +3466,9 @@ int Field_string::pack_cmp(const char *b, uint length)
}
uint Field_string::packed_col_length(const char *ptr)
uint Field_string::packed_col_length(const char *ptr, uint length)
{
if (field_length > 255)
if (length > 255)
return uint2korr(ptr)+2;
else
return (uint) ((uchar) *ptr)+1;
......@@ -3476,7 +3476,7 @@ uint Field_string::packed_col_length(const char *ptr)
uint Field_string::max_packed_col_length(uint max_length)
{
return (field_length > 255 ? 2 : 1)+max_length;
return (max_length > 255 ? 2 : 1)+max_length;
}
......@@ -3685,9 +3685,9 @@ int Field_varstring::pack_cmp(const char *b, uint key_length)
return my_sortncmp(a,a_length, b,b_length);
}
uint Field_varstring::packed_col_length(const char *ptr)
uint Field_varstring::packed_col_length(const char *ptr, uint length)
{
if (field_length > 255)
if (length > 255)
return uint2korr(ptr)+2;
else
return (uint) ((uchar) *ptr)+1;
......@@ -3695,7 +3695,7 @@ uint Field_varstring::packed_col_length(const char *ptr)
uint Field_varstring::max_packed_col_length(uint max_length)
{
return (field_length > 255 ? 2 : 1)+max_length;
return (max_length > 255 ? 2 : 1)+max_length;
}
/****************************************************************************
......@@ -4225,6 +4225,18 @@ char *Field_blob::pack_key_from_key_image(char *to, const char *from,
return to+length;
}
uint Field_blob::packed_col_length(const char *ptr, uint length)
{
if (length > 255)
return uint2korr(ptr)+2;
else
return (uint) ((uchar) *ptr)+1;
}
uint Field_blob::max_packed_col_length(uint max_length)
{
return (max_length > 255 ? 2 : 1)+max_length;
}
/****************************************************************************
** enum type.
......
......@@ -176,10 +176,10 @@ public:
{
return pack(to,from,max_length);
}
virtual uint packed_col_length(const char *to)
{ return pack_length();}
virtual uint packed_col_length(const char *to, uint length)
{ return length;}
virtual uint max_packed_col_length(uint max_length)
{ return pack_length();}
{ return max_length;}
virtual int pack_cmp(const char *a,const char *b, uint key_length_arg)
{ return cmp(a,b); }
......@@ -748,7 +748,7 @@ public:
const char *unpack(char* to, const char *from);
int pack_cmp(const char *a,const char *b,uint key_length);
int pack_cmp(const char *b,uint key_length);
uint packed_col_length(const char *to);
uint packed_col_length(const char *to, uint length);
uint max_packed_col_length(uint max_length);
uint size_of() const { return sizeof(*this); }
enum_field_types real_type() const { return FIELD_TYPE_STRING; }
......@@ -800,7 +800,7 @@ public:
const char *unpack(char* to, const char *from);
int pack_cmp(const char *a, const char *b, uint key_length);
int pack_cmp(const char *b, uint key_length);
uint packed_col_length(const char *to);
uint packed_col_length(const char *to, uint length);
uint max_packed_col_length(uint max_length);
uint size_of() const { return sizeof(*this); }
enum_field_types real_type() const { return FIELD_TYPE_VAR_STRING; }
......@@ -901,11 +901,8 @@ public:
char *pack_key_from_key_image(char* to, const char *from, uint max_length);
int pack_cmp(const char *a, const char *b, uint key_length);
int pack_cmp(const char *b, uint key_length);
uint packed_col_length(const char *col_ptr)
{ return get_length(col_ptr)+packlength;}
virtual uint max_packed_col_length(uint max_length)
{ return packlength+max_length; }
uint packed_col_length(const char *col_ptr, uint length);
uint max_packed_col_length(uint max_length);
inline void free() { value.free(); }
inline void clear_temporary() { bzero((char*) &value,sizeof(value)); }
friend void field_conv(Field *to,Field *from);
......
......@@ -28,8 +28,8 @@
- Get a more accurate count of the number of rows (estimate_number_of_rows()).
We could store the found number of rows when the table is scanned and
then increment the counter for each attempted write.
- We will need a manager thread that calls flush_logs, removes old
logs and makes checkpoints at given intervals.
- We will need to extend the manager thread to makes checkpoints at
given intervals.
- When not using UPDATE IGNORE, don't make a sub transaction but abort
the main transaction on errors.
- Handling of drop table during autocommit=0 ?
......@@ -90,7 +90,7 @@ const char *berkeley_lock_names[] =
{ "DEFAULT", "OLDEST","RANDOM","YOUNGEST",0 };
u_int32_t berkeley_lock_types[]=
{ DB_LOCK_DEFAULT, DB_LOCK_OLDEST, DB_LOCK_RANDOM };
TYPELIB berkeley_lock_typelib= {array_elements(berkeley_lock_names),"",
TYPELIB berkeley_lock_typelib= {array_elements(berkeley_lock_names)-1,"",
berkeley_lock_names};
static void berkeley_print_error(const char *db_errpfx, char *buffer);
......@@ -372,10 +372,12 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key)
if ((cmp=key_part->field->pack_cmp(new_key_ptr,saved_key_ptr,
key_part->length)))
return cmp;
uint length=key_part->field->packed_col_length(new_key_ptr);
uint length=key_part->field->packed_col_length(new_key_ptr,
key_part->length);
new_key_ptr+=length;
key_length-=length;
saved_key_ptr+=key_part->field->packed_col_length(saved_key_ptr);
saved_key_ptr+=key_part->field->packed_col_length(saved_key_ptr,
key_part->length);
}
return key->handler.bdb_return_if_eq;
}
......@@ -433,7 +435,7 @@ berkeley_key_cmp(TABLE *table, KEY *key_info, const char *key, uint key_length)
}
if ((cmp=key_part->field->pack_cmp(key,key_part->length)))
return cmp;
uint length=key_part->field->packed_col_length(key);
uint length=key_part->field->packed_col_length(key,key_part->length);
key+=length;
key_length-=length;
}
......@@ -1552,7 +1554,7 @@ DBT *ha_berkeley::get_pos(DBT *to, byte *pos)
KEY_PART_INFO *end=key_part+table->key_info[primary_key].key_parts;
for ( ; key_part != end ; key_part++)
pos+=key_part->field->packed_col_length((char*) pos);
pos+=key_part->field->packed_col_length((char*) pos,key_part->length);
to->size= (uint) (pos- (byte*) to->data);
}
return to;
......
......@@ -175,7 +175,11 @@ void ha_myisammrg::info(uint flag)
mean_rec_length=info.reclength;
block_size=0;
update_time=0;
#if SIZEOF_OFF_T > 4
ref_length=6; // Should be big enough
#else
ref_length=4; // Can't be > than my_off_t
#endif
}
......
......@@ -248,8 +248,10 @@ longlong Item_func_unix_timestamp::val_int()
longlong Item_func_time_to_sec::val_int()
{
TIME ltime;
longlong seconds;
(void) get_arg0_time(&ltime);
return ltime.hour*3600L+ltime.minute*60+ltime.second;
seconds=ltime.hour*3600L+ltime.minute*60+ltime.second;
return ltime.neg ? -seconds : seconds;
}
......
......@@ -212,7 +212,7 @@
"DROP DATABASE är inte tillåtet när man har ett globalt läs-lås",
"CREATE DATABASE är inte tillåtet när man har ett globalt läs-lås",
"Felaktiga argument till %s",
"%-.32s@%-.64s har inte rättigheter att skapa nya användare",
"%-.32s@%-.64s har inte rättighet att skapa nya användare",
"Felaktig tabell definition: Alla tabeller i en MERGE tabell måste vara i samma databas",
"Fick 'DEADLOCK' vid låsförsök av block/rad; Försök att starta om transaktionen",
"Tabelltypen har inte hantering av FULLTEXT index",
......
......@@ -1003,8 +1003,8 @@ static int replace_user_table(TABLE *table, const LEX_USER &combo,
my_printf_error(ER_NONEXISTING_GRANT,ER(ER_NONEXISTING_GRANT),
MYF(0),combo.user.str,combo.host.str);
else
my_printf_error(ER_NO_PERMISSON_TO_CREATE_USER,
ER(ER_NO_PERMISSON_TO_CREATE_USER),
my_printf_error(ER_NO_PERMISSION_TO_CREATE_USER,
ER(ER_NO_PERMISSION_TO_CREATE_USER),
MYF(0),thd->user,
thd->host ? thd->host : thd->ip ? thd->ip: "");
error= -1;
......
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