mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Bug fixes + defines for INNOBASE
This commit is contained in:
parent
ee763533f2
commit
2fedd7bae7
14 changed files with 73 additions and 47 deletions
|
@ -9408,7 +9408,8 @@ the sort order!
|
|||
@item The default return type of @code{IF} will now depend on both arguments
|
||||
and not only the first argument.
|
||||
@item @code{AUTO_INCREMENT} will not work with negative numbers.
|
||||
@item @code{INNER} and @code{DELAYED} are now reserved words.
|
||||
@item @code{INNER}, @code{DELAYED}, @code{RIGHT} and @code{WHEN}
|
||||
are now reserved words.
|
||||
@item @code{FLOAT(X)} is now a true floating point type and not a value with
|
||||
a fixed number of decimals.
|
||||
@item When declaring @code{DECIMAL(length,dec)} the length argument no
|
||||
|
@ -18050,7 +18051,7 @@ the table will not be analyzed again.
|
|||
@section @code{REPAIR TABLE} syntax
|
||||
|
||||
@example
|
||||
REPAIR TABLE tbl_name[,tbl_name...] [QUICK]
|
||||
REPAIR TABLE tbl_name[,tbl_name...] [QUICK] [EXTENDED]
|
||||
@end example
|
||||
|
||||
@code{REPAIR TABLE} only works on @code{MyISAM} tables and is the same things
|
||||
|
@ -18077,6 +18078,11 @@ future, we will make it more flexible.
|
|||
If @code{QUICK} is given then @strong{MySQL} will try to do a
|
||||
@code{REPAIR} of only the index tree.
|
||||
|
||||
If you use @code{EXTENDED} then @strong{MySQL} will create the index row
|
||||
by row instead of creating one index at a time with sorting; This may be
|
||||
better than sorting on fixed length keys if you have long @code{char()}
|
||||
keys that compress very good.
|
||||
|
||||
@findex DELETE
|
||||
@node DELETE, SELECT, REPAIR TABLE, Reference
|
||||
@section @code{DELETE} syntax
|
||||
|
@ -19923,8 +19929,9 @@ Maximum number of temporary tables a client can keep open at the same time.
|
|||
After this many write locks, allow some read locks to run in between.
|
||||
|
||||
@item @code{myisam_sort_buffer_size}
|
||||
The buffer that is allocated when sorting the index when doing a @code{REPAIR}
|
||||
table.
|
||||
The buffer that is allocated when sorting the index when doing a
|
||||
@code{REPAIR} or when creating indexes with @code{CREATE INDEX} or
|
||||
@code{ALTER TABLE}.
|
||||
|
||||
@item @code{net_buffer_length}
|
||||
The communication buffer is reset to this size between queries. This
|
||||
|
@ -30912,8 +30919,9 @@ in these cases, and can provide useful information about the current number
|
|||
of connections and their status.
|
||||
|
||||
@item
|
||||
Run the command @code{mysqladmin -i 5 status}
|
||||
in a separate window to produce statistics while you run your other queries.
|
||||
Run the command @code{mysqladmin -i 5 status} or @code{mysqladmin -i 5
|
||||
-r status} or in a separate window to produce statistics while you run
|
||||
your other queries.
|
||||
|
||||
@item
|
||||
Try the following:
|
||||
|
@ -33513,7 +33521,9 @@ For the connection specified by @code{mysql}, @code{mysql_errno()} returns
|
|||
the error code for the most recently invoked API function that can succeed
|
||||
or fail. A return value of zero means that no error occurred. Client error
|
||||
message numbers are listed in the @strong{MySQL} @file{errmsg.h} header file.
|
||||
Server error message numbers are listed in @file{mysqld_error.h}
|
||||
Server error message numbers are listed in @file{mysqld_error.h}. In the
|
||||
@strong{MySQL} source distribution you can find a complete list of
|
||||
error messages and error numbers in the file @file{Docs/mysqld_error.txt}.
|
||||
|
||||
@subsubheading Return values:
|
||||
|
||||
|
@ -38101,7 +38111,8 @@ was part of the key that was used to find rows.
|
|||
@item
|
||||
Fixed bug in @code{FULLTEXT} index when inserting a @code{NULL} column.
|
||||
@item
|
||||
Changed to use @code{mkstemp()} instead of @code{tempnam()}.
|
||||
Changed to use @code{mkstemp()} instead of @code{tempnam()}. Based
|
||||
on a patch from John Jones.
|
||||
@end itemize
|
||||
|
||||
@node News-3.23.25, News-3.23.24, News-3.23.26, News-3.23.x
|
||||
|
@ -42412,7 +42423,7 @@ tell us what you want to have done more quickly. @xref{Licensing and Support}.
|
|||
@item
|
||||
Fail safe replication.
|
||||
@item
|
||||
Optimize, test and document transactions safe tables
|
||||
Optimize, test and document transactions safe tables (BDB tables)
|
||||
@item
|
||||
Allow users to change startup options.
|
||||
@item
|
||||
|
@ -42445,9 +42456,8 @@ Check if locked threads take any CPU.
|
|||
Fix configure so that one can compile all libraries (like @code{MyISAM})
|
||||
without threads.
|
||||
@item
|
||||
Change to use mkstemp() instead of tempnam() for system that supports the call.
|
||||
We need to add a my_mkstemp() function in mysys and also change the cache
|
||||
code to not create the filename until we do the actual open.
|
||||
Add an option to periodically flush key pages for tables with delayed keys
|
||||
if they haven't been used in a while.
|
||||
@item
|
||||
Allow join on key parts (optimization issue).
|
||||
@item
|
||||
|
|
|
@ -81,7 +81,8 @@ bool String::realloc(uint32 alloc_length)
|
|||
}
|
||||
else if ((new_ptr= (char*) my_malloc(len,MYF(MY_WME))))
|
||||
{
|
||||
memcpy(new_ptr,Ptr,str_length);
|
||||
if (str_length) // Avoid bugs in memcpy on AIX
|
||||
memcpy(new_ptr,Ptr,str_length);
|
||||
new_ptr[str_length]=0;
|
||||
Ptr=new_ptr;
|
||||
Alloced_length=len;
|
||||
|
@ -221,8 +222,8 @@ bool String::copy(const char *str,uint32 arg_length)
|
|||
{
|
||||
if (alloc(arg_length))
|
||||
return TRUE;
|
||||
str_length=arg_length;
|
||||
memcpy(Ptr,str,arg_length);
|
||||
if ((str_length=arg_length))
|
||||
memcpy(Ptr,str,arg_length);
|
||||
Ptr[arg_length]=0;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -251,17 +252,21 @@ void String::strip_sp()
|
|||
|
||||
bool String::append(const String &s)
|
||||
{
|
||||
if (realloc(str_length+s.length()))
|
||||
return TRUE;
|
||||
memcpy(Ptr+str_length,s.ptr(),s.length());
|
||||
str_length+=s.length();
|
||||
if (s.length())
|
||||
{
|
||||
if (realloc(str_length+s.length()))
|
||||
return TRUE;
|
||||
memcpy(Ptr+str_length,s.ptr(),s.length());
|
||||
str_length+=s.length();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool String::append(const char *s,uint32 arg_length)
|
||||
{
|
||||
if (!arg_length) // Default argument
|
||||
arg_length= (uint32) strlen(s);
|
||||
if (!(arg_length= (uint32) strlen(s)))
|
||||
return FALSE;
|
||||
if (realloc(str_length+arg_length))
|
||||
return TRUE;
|
||||
memcpy(Ptr+str_length,s,arg_length);
|
||||
|
@ -398,7 +403,8 @@ bool String::replace(uint32 offset,uint32 arg_length,const String &to)
|
|||
{
|
||||
if (diff < 0)
|
||||
{
|
||||
memcpy(Ptr+offset,to.ptr(),to.length());
|
||||
if (to.length())
|
||||
memcpy(Ptr+offset,to.ptr(),to.length());
|
||||
bmove(Ptr+offset+to.length(),Ptr+offset+arg_length,
|
||||
str_length-offset-arg_length);
|
||||
}
|
||||
|
@ -411,7 +417,8 @@ bool String::replace(uint32 offset,uint32 arg_length,const String &to)
|
|||
bmove_upp(Ptr+str_length+diff,Ptr+str_length,
|
||||
str_length-offset-arg_length);
|
||||
}
|
||||
memcpy(Ptr+offset,to.ptr(),to.length());
|
||||
if (to.length())
|
||||
memcpy(Ptr+offset,to.ptr(),to.length());
|
||||
}
|
||||
str_length+=(uint32) diff;
|
||||
}
|
||||
|
@ -502,8 +509,8 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
|
|||
}
|
||||
if (to->realloc(from_length))
|
||||
return from; // Actually an error
|
||||
to->str_length=min(from->str_length,from_length);
|
||||
memcpy(to->Ptr,from->Ptr,to->str_length);
|
||||
if ((to->str_length=min(from->str_length,from_length)))
|
||||
memcpy(to->Ptr,from->Ptr,to->str_length);
|
||||
return to;
|
||||
}
|
||||
|
||||
|
|
|
@ -192,3 +192,7 @@ Changes done to this distrubtion (pthreads-1_60_beta6) by Monty (monty@tcx.se)
|
|||
|
||||
00.03.30 by Monty (monty@mysql.com)
|
||||
- Added chroot() and gethostname().
|
||||
|
||||
00.10.18 by Monty (monty@mysql.com)
|
||||
- Added patch by Dave Huang <khym@bga.com> to fix problem with date/time
|
||||
on NETBSD/Alpha.
|
||||
|
|
8
mit-pthreads/config/configure
vendored
8
mit-pthreads/config/configure
vendored
|
@ -1252,7 +1252,7 @@ except=""
|
|||
name=$host_cpu-$host_os
|
||||
|
||||
case $host in
|
||||
alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.4*)
|
||||
alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.[45]*)
|
||||
name=alpha-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek pipe fstat"
|
||||
|
@ -1276,7 +1276,7 @@ case $host in
|
|||
CFLAGS="$CFLAGS -std"
|
||||
fi
|
||||
;;
|
||||
arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.4*)
|
||||
arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.[45]*)
|
||||
name=arm32-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork pipe lseek ftruncate fstat"
|
||||
|
@ -1336,7 +1336,7 @@ EOF
|
|||
EOF
|
||||
|
||||
;;
|
||||
sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.4*)
|
||||
sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.[45]*)
|
||||
name=sparc-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="pipe fork lseek ftruncate fstat"
|
||||
|
@ -1375,7 +1375,7 @@ EOF
|
|||
syscall=i386-bsdi-2.0
|
||||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.4*)
|
||||
i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.[45]*)
|
||||
name=i386-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek ftruncate pipe fstat"
|
||||
|
|
|
@ -126,7 +126,7 @@ name=$host_cpu-$host_os
|
|||
|
||||
case $host in
|
||||
changequote(,)dnl
|
||||
alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.4*)
|
||||
alpha-*-netbsd1.3[H-Z]|alpha-*-netbsd1.[45]*)
|
||||
name=alpha-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek pipe fstat"
|
||||
|
@ -152,7 +152,7 @@ changequote([,])dnl
|
|||
fi
|
||||
;;
|
||||
changequote(,)dnl
|
||||
arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.4*)
|
||||
arm32-*-netbsd1.3[H-Z]|arm32-*-netbsd1.[45]*)
|
||||
name=arm32-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork pipe lseek ftruncate fstat"
|
||||
|
@ -199,7 +199,7 @@ changequote([,])dnl
|
|||
AC_DEFINE(BROKEN_SIGNALS)
|
||||
;;
|
||||
changequote(,)dnl
|
||||
sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.4*)
|
||||
sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.[45]*)
|
||||
name=sparc-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="pipe fork lseek ftruncate fstat"
|
||||
|
@ -240,7 +240,7 @@ changequote([,])dnl
|
|||
except="fork lseek ftruncate sigsuspend"
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.4*)
|
||||
i386-*-netbsd1.3[H-Z]|i386-*-netbsd1.[45]*)
|
||||
name=i386-netbsd-1.3
|
||||
sysincludes=netbsd-1.1
|
||||
except="fork lseek ftruncate pipe fstat"
|
||||
|
|
|
@ -129,7 +129,7 @@ struct rule {
|
|||
** Prototypes for static functions.
|
||||
*/
|
||||
|
||||
static long detzcode __P_((const char *));
|
||||
static int detzcode __P_((const char *));
|
||||
static const char * getnum __P_((const char *, int *, int, int));
|
||||
static const char * getsecs __P_((const char *, long *));
|
||||
static const char * getoffset __P_((const char *, long *));
|
||||
|
@ -175,7 +175,7 @@ int daylight = 0;
|
|||
time_t altzone = 0;
|
||||
#endif /* defined ALTZONE */
|
||||
|
||||
static long detzcode(const char * codep)
|
||||
static int detzcode(const char * codep)
|
||||
{
|
||||
long result;
|
||||
int i;
|
||||
|
|
|
@ -424,7 +424,7 @@ struct hostent *my_gethostbyname_r(const char *name,
|
|||
int buflen, int *h_errnop)
|
||||
{
|
||||
struct hostent *hp;
|
||||
assert((size_t) buflen >= sizeof(*result));
|
||||
dbug_assert((size_t) buflen >= sizeof(*result));
|
||||
if (gethostbyname_r(name,result, buffer, (size_t) buflen, &hp, h_errnop))
|
||||
return 0;
|
||||
return hp;
|
||||
|
@ -436,7 +436,7 @@ struct hostent *my_gethostbyname_r(const char *name,
|
|||
struct hostent *result, char *buffer,
|
||||
int buflen, int *h_errnop)
|
||||
{
|
||||
assert(buflen >= sizeof(struct hostent_data));
|
||||
dbug_assert(buflen >= sizeof(struct hostent_data));
|
||||
if (gethostbyname_r(name,result,(struct hostent_data *) buffer) == -1)
|
||||
{
|
||||
*h_errnop= errno;
|
||||
|
@ -452,7 +452,7 @@ struct hostent *my_gethostbyname_r(const char *name,
|
|||
int buflen, int *h_errnop)
|
||||
{
|
||||
struct hostent *hp;
|
||||
assert(buflen >= sizeof(struct hostent_data));
|
||||
dbug_assert(buflen >= sizeof(struct hostent_data));
|
||||
hp= gethostbyname_r(name,result,(struct hostent_data *) buffer);
|
||||
*h_errnop= errno;
|
||||
return hp;
|
||||
|
|
|
@ -37,8 +37,8 @@ done
|
|||
|
||||
for i in extra/comp_err extra/replace extra/perror extra/resolveip \
|
||||
extra/my_print_defaults isam/isamchk isam/pack_isam myisam/myisamchk myisam/myisampack sql/mysqld sql/mysqlbinlog \
|
||||
client/mysql sql/mysqld client/mysqlshow client/mysqladmin client/mysqldump client/mysqlimport client/mysql-test \
|
||||
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport client/.libs/mysql-test
|
||||
client/mysql sql/mysqld client/mysqlshow client/mysqladmin client/mysqldump client/mysqlimport \
|
||||
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin client/.libs/mysqldump client/.libs/mysqlimport
|
||||
do
|
||||
cp -p $i $BASE/bin
|
||||
done
|
||||
|
|
|
@ -14,7 +14,7 @@ trap '' 1 2 3 15 # we shouldn't let anyone kill us
|
|||
|
||||
defaults=
|
||||
case "$1" in
|
||||
--no-defaults|--defaults-file=*)
|
||||
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
||||
defaults="$1"; shift
|
||||
;;
|
||||
esac
|
||||
|
@ -138,8 +138,8 @@ fi
|
|||
# checked and repaired at start
|
||||
#
|
||||
# echo "Checking tables in $DATADIR"
|
||||
# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check $DATADIR/*/*.MYI
|
||||
# $MY_BASEDIR_VERSION/bin/isamchk --silent --force $DATADIR/*/*.ISM
|
||||
# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check -O key_buffer=64M -O sort_buffer=64M $DATADIR/*/*.MYI
|
||||
# $MY_BASEDIR_VERSION/bin/isamchk --silent --force -O sort_buffer=64M $DATADIR/*/*.ISM
|
||||
|
||||
echo "Starting mysqld daemon with databases from $DATADIR"
|
||||
|
||||
|
@ -155,9 +155,9 @@ do
|
|||
rm -f $MYSQL_UNIX_PORT $pid_file # Some extra safety
|
||||
if test "$#" -eq 0
|
||||
then
|
||||
(trap "" 1 ; exec $NOHUP_NICENESS $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ >> $err_log 2>&1 )
|
||||
(trap "" 1 ; exec $NOHUP_NICENESS $ledir/mysqld $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ >> $err_log 2>&1 )
|
||||
else
|
||||
(trap "" ; exec $NOHUP_NICENESS $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ "$@" >> $err_log 2>&1 )
|
||||
(trap "" ; exec $NOHUP_NICENESS $ledir/mysqld $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR --user=$user --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ "$@" >> $err_log 2>&1 )
|
||||
fi
|
||||
if test ! -f $pid_file # This is removed if normal shutdown
|
||||
then
|
||||
|
|
|
@ -102,7 +102,7 @@ enum db_type { DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
|
|||
DB_TYPE_HASH,DB_TYPE_MISAM,DB_TYPE_PISAM,
|
||||
DB_TYPE_RMS_ISAM, DB_TYPE_HEAP, DB_TYPE_ISAM,
|
||||
DB_TYPE_MRG_ISAM, DB_TYPE_MYISAM, DB_TYPE_MRG_MYISAM,
|
||||
DB_TYPE_BERKELEY_DB,
|
||||
DB_TYPE_BERKELEY_DB, DB_TYPE_INNOBASE,
|
||||
DB_TYPE_DEFAULT };
|
||||
|
||||
enum row_type { ROW_TYPE_DEFAULT, ROW_TYPE_FIXED, ROW_TYPE_DYNAMIC,
|
||||
|
|
|
@ -843,7 +843,7 @@ public:
|
|||
FT_DOCLIST *ft_handler;
|
||||
|
||||
Item_func_match(List<Item> &a, Item *b): Item_real_func(b),
|
||||
fields(a), table(0), master(0), ft_handler(0) {}
|
||||
fields(a), table(0), join_key(0), master(0), ft_handler(0) {}
|
||||
~Item_func_match()
|
||||
{
|
||||
if (!master)
|
||||
|
|
|
@ -160,6 +160,7 @@ static SYMBOL symbols[] = {
|
|||
{ "INDEX", SYM(INDEX),0,0},
|
||||
{ "INFILE", SYM(INFILE),0,0},
|
||||
{ "INNER", SYM(INNER_SYM),0,0},
|
||||
{ "INNOBASE", SYM(INNOBASE_SYM),0,0},
|
||||
{ "INSERT", SYM(INSERT),0,0},
|
||||
{ "INSERT_ID", SYM(INSERT_ID),0,0},
|
||||
{ "INT", SYM(INT_SYM),0,0},
|
||||
|
|
|
@ -2169,7 +2169,7 @@ pthread_handler_decl(handle_flush,arg __attribute__((unused)))
|
|||
flush_thread_in_use=1;
|
||||
|
||||
pthread_mutex_lock(&LOCK_flush);
|
||||
for (;;)
|
||||
while (flush_time)
|
||||
{
|
||||
struct timespec abstime;
|
||||
#ifdef HAVE_TIMESPEC_TS_SEC
|
||||
|
|
|
@ -178,6 +178,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
|||
%token INDEX
|
||||
%token INFILE
|
||||
%token INNER_SYM
|
||||
%token INNOBASE_SYM
|
||||
%token INTO
|
||||
%token IN_SYM
|
||||
%token ISAM_SYM
|
||||
|
@ -744,6 +745,7 @@ table_types:
|
|||
| MERGE_SYM { $$= DB_TYPE_MRG_MYISAM; }
|
||||
| HEAP_SYM { $$= DB_TYPE_HEAP; }
|
||||
| BERKELEY_DB_SYM { $$= DB_TYPE_BERKELEY_DB; }
|
||||
| INNOBASE_SYM { $$= DB_TYPE_INNOBASE; }
|
||||
|
||||
row_types:
|
||||
DEFAULT { $$= ROW_TYPE_DEFAULT; }
|
||||
|
@ -2432,6 +2434,7 @@ keyword:
|
|||
| AVG_SYM {}
|
||||
| BACKUP_SYM {}
|
||||
| BEGIN_SYM {}
|
||||
| BERKELEY_DB_SYM {}
|
||||
| BIT_SYM {}
|
||||
| BOOL_SYM {}
|
||||
| CHANGED {}
|
||||
|
@ -2463,6 +2466,7 @@ keyword:
|
|||
| HOUR_SYM {}
|
||||
| IDENTIFIED_SYM {}
|
||||
| ISAM_SYM {}
|
||||
| INNOBASE_SYM {}
|
||||
| LOCAL_SYM {}
|
||||
| LOGS_SYM {}
|
||||
| MAX_ROWS {}
|
||||
|
|
Loading…
Reference in a new issue