Commit 79538703 authored by unknown's avatar unknown

Merge work:/my/mysql-4.0 into mashka.mysql.fi:/home/my/mysql-4.0

parents 8ff9e708 a1e75ac0
...@@ -31258,8 +31258,8 @@ stored into a temporary table) is calculated in MySQL Version ...@@ -31258,8 +31258,8 @@ stored into a temporary table) is calculated in MySQL Version
@item expr2 or expr3 returns an integer @tab integer @item expr2 or expr3 returns an integer @tab integer
@end multitable @end multitable
If expr2 and expr3 are strings, then the result is case-sensitive if If expr2 and expr3 are strings, then the result is case-insensitive if
both strings are case-sensitive. (Starting from 3.23.51) both strings are case-insensitive. (Starting from 3.23.51)
@findex CASE @findex CASE
@item CASE value WHEN [compare-value] THEN result [WHEN [compare-value] THEN result ...] [ELSE result] END @item CASE value WHEN [compare-value] THEN result [WHEN [compare-value] THEN result ...] [ELSE result] END
...@@ -33246,9 +33246,15 @@ anything; just use the string value as it would be a number: ...@@ -33246,9 +33246,15 @@ anything; just use the string value as it would be a number:
@example @example
mysql> SELECT 1+'1'; mysql> SELECT 1+'1';
-> 2 -> 2
@end example @end example
If you use a number in string context the number will automaticly be
converted to a @code{BINARY} string.
mysql> SELECT concat("hello you ",2);
-> "hello you 2"
MySQL supports arithmetic with both signed and unsigned 64-bit values. MySQL supports arithmetic with both signed and unsigned 64-bit values.
If you are using an numerical operations (like @code{+}) and one of the If you are using an numerical operations (like @code{+}) and one of the
operands are @code{unsigned integer}, then the result will be unsigned. operands are @code{unsigned integer}, then the result will be unsigned.
...@@ -50442,7 +50448,15 @@ each individual 4.0.x release. ...@@ -50442,7 +50448,15 @@ each individual 4.0.x release.
@itemize @bullet @itemize @bullet
@item @item
Fixed overrun bug when calling @code{AES_DECRYPT()} with wrong arguments Increased max possible @code{max_allowed_packet} in @code{mysqld} to 1G.
@item
Fixed bug when doing a multi-line @code{INSERT} on a table with an
auto_increment key which was not in the first part of the key.
@item
Changed @code{LOAD DATA INFILE} to not recreate index if the table had
rows from before.
@item
Fixed overrun bug when calling @code{AES_DECRYPT()} with wrong arguments.
@item @item
@code{--skip-ssl} can now be used to disable SSL in the MySQL clients, @code{--skip-ssl} can now be used to disable SSL in the MySQL clients,
even if one is using other ssl options in a options file or previously even if one is using other ssl options in a options file or previously
...@@ -50502,8 +50516,9 @@ Fixed a bug in my_getopt; --set-variable syntax didn't work for ...@@ -50502,8 +50516,9 @@ Fixed a bug in my_getopt; --set-variable syntax didn't work for
those options that didn't have a valid variable in my_option struct. those options that didn't have a valid variable in my_option struct.
This affected at least @code{default-table-type} option. This affected at least @code{default-table-type} option.
@item @item
Fixed a bug that caused @code{REPAIR TABLE} to fail on tables Fixed a bug from 4.0.2 that caused @code{REPAIR TABLE} and
with duplicates in a unique key. @code{myisamchk --repair} to fail on tables with duplicates in a unique
key.
@item @item
Fixed a bug from 4.0.3 in calculating the default field type for some Fixed a bug from 4.0.3 in calculating the default field type for some
functions. This affected queries of type @code{CREATE TABLE table_name functions. This affected queries of type @code{CREATE TABLE table_name
...@@ -407,7 +407,8 @@ static void dump_local_log_entries(const char* logname) ...@@ -407,7 +407,8 @@ static void dump_local_log_entries(const char* logname)
File fd = -1; File fd = -1;
IO_CACHE cache,*file= &cache; IO_CACHE cache,*file= &cache;
ulonglong rec_count = 0; ulonglong rec_count = 0;
char last_db[FN_REFLEN+1], tmp_buff[BIN_LOG_HEADER_SIZE]; char last_db[FN_REFLEN+1];
byte tmp_buff[BIN_LOG_HEADER_SIZE];
bool old_format = 0; bool old_format = 0;
last_db[0]=0; last_db[0]=0;
......
...@@ -232,7 +232,7 @@ static struct my_option my_long_options[] = ...@@ -232,7 +232,7 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "", {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
(gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0, (gptr*) &max_allowed_packet, (gptr*) &max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, 512*1024L*1024L, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, 1024*1024L*1024L,
MALLOC_OVERHEAD, 1024, 0}, MALLOC_OVERHEAD, 1024, 0},
{"net_buffer_length", OPT_NET_BUFFER_LENGTH, "", {"net_buffer_length", OPT_NET_BUFFER_LENGTH, "",
(gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0, (gptr*) &net_buffer_length, (gptr*) &net_buffer_length, 0,
......
...@@ -20,8 +20,8 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h \ ...@@ -20,8 +20,8 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h \
mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ mysql.h mysql_com.h mysqld_error.h mysql_embed.h \
my_semaphore.h my_pthread.h my_no_pthread.h raid.h \ my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
errmsg.h my_global.h my_net.h my_alloc.h \ errmsg.h my_global.h my_net.h my_alloc.h \
my_getopt.h sslopt-longopts.h sslopt-usage.h \ my_getopt.h sslopt-longopts.h \
sslopt-vars.h $(BUILT_SOURCES) sslopt-vars.h sslopt-case.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h \ noinst_HEADERS = config-win.h config-os2.h \
nisam.h heap.h merge.h my_bitmap.h\ nisam.h heap.h merge.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
......
...@@ -107,6 +107,7 @@ enum ha_extra_function { ...@@ -107,6 +107,7 @@ enum ha_extra_function {
HA_EXTRA_NO_IGNORE_DUP_KEY, HA_EXTRA_NO_IGNORE_DUP_KEY,
HA_EXTRA_DONT_USE_CURSOR_TO_UPDATE, /* Cursor will not be used for update */ HA_EXTRA_DONT_USE_CURSOR_TO_UPDATE, /* Cursor will not be used for update */
HA_EXTRA_BULK_INSERT_BEGIN, HA_EXTRA_BULK_INSERT_BEGIN,
HA_EXTRA_BULK_INSERT_FLUSH, /* Flush one index */
HA_EXTRA_BULK_INSERT_END, HA_EXTRA_BULK_INSERT_END,
HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DELETE
}; };
......
...@@ -553,9 +553,9 @@ extern gptr _my_memdup(const byte *from,uint length, ...@@ -553,9 +553,9 @@ extern gptr _my_memdup(const byte *from,uint length,
const char *sFile, uint uLine,myf MyFlag); const char *sFile, uint uLine,myf MyFlag);
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine, extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
myf MyFlag); myf MyFlag);
extern my_string _my_strdup_with_length(const char *from, uint length, extern char *_my_strdup_with_length(const byte *from, uint length,
const char *sFile, uint uLine, const char *sFile, uint uLine,
myf MyFlag); myf MyFlag);
#ifndef TERMINATE #ifndef TERMINATE
extern void TERMINATE(FILE *file); extern void TERMINATE(FILE *file);
......
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef HAVE_OPENSSL
puts("\
--ssl Use SSL for connection (automatically set with other flags\n\
--ssl-key X509 key in PEM format (implies --ssl)\n\
--ssl-cert X509 cert in PEM format (implies --ssl)\n\
--ssl-ca CA file in PEM format (check OpenSSL docs, implies --ssl)\n\
--ssl-capath CA directory (check OpenSSL docs, implies --ssl)\n\
--ssl-cipher SSL cipher to use (implies --ssl)");
#endif
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
HA_EXTRA_WRITE_CACHE HA_EXTRA_WRITE_CACHE
HA_EXTRA_CACHE HA_EXTRA_CACHE
HA_EXTRA_BULK_INSERT_BEGIN HA_EXTRA_BULK_INSERT_BEGIN
If extra_arg is 0, then the default cache size is used. If extra_arg is 0, then the default cache size is used.
HA_EXTRA_BULK_INSERT_FLUSH
extra_arg is a a pointer to which index to flush (uint*)
RETURN VALUES RETURN VALUES
0 ok 0 ok
*/ */
...@@ -356,6 +358,14 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) ...@@ -356,6 +358,14 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
error=_mi_init_bulk_insert(info, (extra_arg ? *(ulong*) extra_arg : error=_mi_init_bulk_insert(info, (extra_arg ? *(ulong*) extra_arg :
myisam_bulk_insert_tree_size)); myisam_bulk_insert_tree_size));
break; break;
case HA_EXTRA_BULK_INSERT_FLUSH:
if (info->bulk_insert)
{
uint index_to_flush= *(uint*) extra_arg;
if (is_tree_inited(&info->bulk_insert[index_to_flush]))
reset_tree(&info->bulk_insert[index_to_flush]);
}
break;
case HA_EXTRA_BULK_INSERT_END: case HA_EXTRA_BULK_INSERT_END:
if (info->bulk_insert) if (info->bulk_insert)
{ {
......
...@@ -41,6 +41,14 @@ a t>0 c i ...@@ -41,6 +41,14 @@ a t>0 c i
5 0 a NULL 5 0 a NULL
6 1 hello NULL 6 1 hello NULL
drop table t1; drop table t1;
create table t1 (sid char(20), id int(2) NOT NULL auto_increment, key(sid, id));
insert into t1 values ('skr',NULL),('skr',NULL),('test',NULL);
select * from t1;
sid id
skr 1
skr 2
test 1
drop table t1;
drop database if exists foo; drop database if exists foo;
create database foo; create database foo;
use foo; use foo;
......
...@@ -39,6 +39,15 @@ insert into t1 set a=default,t=default,c=default,i=default; ...@@ -39,6 +39,15 @@ insert into t1 set a=default,t=default,c=default,i=default;
select a,t>0,c,i from t1; select a,t>0,c,i from t1;
drop table t1; drop table t1;
#
# Test problem with bulk insert and auto_increment on second part keys
#
create table t1 (sid char(20), id int(2) NOT NULL auto_increment, key(sid, id));
insert into t1 values ('skr',NULL),('skr',NULL),('test',NULL);
select * from t1;
drop table t1;
# #
# Test of mysqld crash with fully qualified column names # Test of mysqld crash with fully qualified column names
# #
......
...@@ -529,20 +529,20 @@ gptr _my_memdup(const byte *from, uint length, const char *sFile, uint uLine, ...@@ -529,20 +529,20 @@ gptr _my_memdup(const byte *from, uint length, const char *sFile, uint uLine,
} /*_my_memdup */ } /*_my_memdup */
my_string _my_strdup(const char *from, const char *sFile, uint uLine, char *_my_strdup(const char *from, const char *sFile, uint uLine,
myf MyFlags) myf MyFlags)
{ {
gptr ptr; gptr ptr;
uint length=(uint) strlen(from)+1; uint length=(uint) strlen(from)+1;
if ((ptr=_mymalloc(length,sFile,uLine,MyFlags)) != 0) if ((ptr=_mymalloc(length,sFile,uLine,MyFlags)) != 0)
memcpy((byte*) ptr, (byte*) from,(size_t) length); memcpy((byte*) ptr, (byte*) from,(size_t) length);
return((my_string) ptr); return((char*) ptr);
} /* _my_strdup */ } /* _my_strdup */
my_string _my_strdup_with_length(const char *from, uint length, char *_my_strdup_with_length(const byte *from, uint length,
const char *sFile, uint uLine, const char *sFile, uint uLine,
myf MyFlags) myf MyFlags)
{ {
gptr ptr; gptr ptr;
if ((ptr=_mymalloc(length+1,sFile,uLine,MyFlags)) != 0) if ((ptr=_mymalloc(length+1,sFile,uLine,MyFlags)) != 0)
...@@ -550,5 +550,5 @@ my_string _my_strdup_with_length(const char *from, uint length, ...@@ -550,5 +550,5 @@ my_string _my_strdup_with_length(const char *from, uint length,
memcpy((byte*) ptr, (byte*) from,(size_t) length); memcpy((byte*) ptr, (byte*) from,(size_t) length);
ptr[length]=0; ptr[length]=0;
} }
return((my_string) ptr); return((char *) ptr);
} }
...@@ -244,7 +244,9 @@ int ha_isam::reset(void) ...@@ -244,7 +244,9 @@ int ha_isam::reset(void)
int ha_isam::external_lock(THD *thd, int lock_type) int ha_isam::external_lock(THD *thd, int lock_type)
{ {
return nisam_lock_database(file,lock_type); if (!table->tmp_table)
return nisam_lock_database(file,lock_type);
return 0;
} }
......
...@@ -657,7 +657,15 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize) ...@@ -657,7 +657,15 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
} }
/* Deactive all not unique index that can be recreated fast */ /*
Deactive all not unique index that can be recreated fast
SYNOPSIS
deactivate_non_unique_index()
rows Rows to be inserted
0 if we don't know
HA_POS_ERROR if we want to disable all keys
*/
void ha_myisam::deactivate_non_unique_index(ha_rows rows) void ha_myisam::deactivate_non_unique_index(ha_rows rows)
{ {
...@@ -670,9 +678,12 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows) ...@@ -670,9 +678,12 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows)
mi_extra(file, HA_EXTRA_NO_KEYS, 0); mi_extra(file, HA_EXTRA_NO_KEYS, 0);
else else
{ {
mi_disable_non_unique_index(file,rows); /* Only disable old index if the table was empty */
if (file->state->records == 0)
mi_disable_non_unique_index(file,rows);
ha_myisam::extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, ha_myisam::extra_opt(HA_EXTRA_BULK_INSERT_BEGIN,
current_thd->variables.bulk_insert_buff_size); current_thd->variables.bulk_insert_buff_size);
table->bulk_insert= 1;
} }
} }
enable_activate_all_index=1; enable_activate_all_index=1;
...@@ -690,6 +701,7 @@ bool ha_myisam::activate_all_index(THD *thd) ...@@ -690,6 +701,7 @@ bool ha_myisam::activate_all_index(THD *thd)
DBUG_ENTER("activate_all_index"); DBUG_ENTER("activate_all_index");
mi_extra(file, HA_EXTRA_BULK_INSERT_END, 0); mi_extra(file, HA_EXTRA_BULK_INSERT_END, 0);
table->bulk_insert= 0;
if (enable_activate_all_index && if (enable_activate_all_index &&
share->state.key_map != set_bits(ulonglong, share->base.keys)) share->state.key_map != set_bits(ulonglong, share->base.keys))
{ {
...@@ -958,7 +970,9 @@ int ha_myisam::delete_table(const char *name) ...@@ -958,7 +970,9 @@ int ha_myisam::delete_table(const char *name)
int ha_myisam::external_lock(THD *thd, int lock_type) int ha_myisam::external_lock(THD *thd, int lock_type)
{ {
return mi_lock_database(file,lock_type); if (!table->tmp_table)
return mi_lock_database(file,lock_type);
return 0;
} }
...@@ -1194,6 +1208,10 @@ longlong ha_myisam::get_auto_increment() ...@@ -1194,6 +1208,10 @@ longlong ha_myisam::get_auto_increment()
return auto_increment_value; return auto_increment_value;
} }
if (table->bulk_insert)
mi_extra(file, HA_EXTRA_BULK_INSERT_FLUSH,
(void*) &table->next_number_index);
longlong nr; longlong nr;
int error; int error;
byte key[MI_MAX_KEY_LENGTH]; byte key[MI_MAX_KEY_LENGTH];
......
...@@ -21,6 +21,46 @@ ...@@ -21,6 +21,46 @@
before getting internal locks. If we do it in the other order, the status before getting internal locks. If we do it in the other order, the status
information is not up to date when called from the lock handler. information is not up to date when called from the lock handler.
GENERAL DESCRIPTION OF LOCKING
When not using LOCK TABLES:
- For each SQL statement mysql_lock_tables() is called for all involved
tables.
- mysql_lock_tables() will call
table_handler->external_lock(thd,locktype) for each table.
This is followed by a call to thr_multi_lock() for all tables.
- When statement is done, we call mysql_unlock_tables().
This will call thr_multi_unlock() followed by
table_handler->external_lock(thd, F_UNLCK) for each table.
- Note that mysql_unlock_tables() may be called several times as
MySQL in some cases can free some tables earlier than others.
- The above is true both for normal and temporary tables.
- Temporary non transactional tables are never passed to thr_multi_lock()
and we never call external_lock(thd, F_UNLOCK) on these.
When using LOCK TABLES:
- LOCK TABLE will call mysql_lock_tables() for all tables.
mysql_lock_tables() will call
table_handler->external_lock(thd,locktype) for each table.
This is followed by a call to thr_multi_lock() for all tables.
- For each statement, we will call table_handler->start_stmt(THD)
to inform the table handler that we are using the table.
The tables used can only be tables used in LOCK TABLES or a
temporary table.
- When statement is done, we will call ha_commit_stmt(thd);
- When calling UNLOCK TABLES we call mysql_unlock_tables() for all
tables used in LOCK TABLES
TODO: TODO:
Change to use my_malloc() ONLY when using LOCK TABLES command or when Change to use my_malloc() ONLY when using LOCK TABLES command or when
we are forced to use mysql_lock_merge. we are forced to use mysql_lock_merge.
...@@ -206,7 +246,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock) ...@@ -206,7 +246,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock)
sql_lock->lock_count= found; sql_lock->lock_count= found;
} }
/* Then to the same for the external locks */ /* Then do the same for the external locks */
/* Move all write locked tables first */ /* Move all write locked tables first */
TABLE **table=sql_lock->table; TABLE **table=sql_lock->table;
for (i=found=0 ; i < sql_lock->table_count ; i++) for (i=found=0 ; i < sql_lock->table_count ; i++)
......
...@@ -744,10 +744,10 @@ Rotate_log_event::Rotate_log_event(const char* buf, int event_len, ...@@ -744,10 +744,10 @@ Rotate_log_event::Rotate_log_event(const char* buf, int event_len,
ident_offset = ROTATE_HEADER_LEN; ident_offset = ROTATE_HEADER_LEN;
} }
set_if_smaller(ident_len,FN_REFLEN-1); set_if_smaller(ident_len,FN_REFLEN-1);
if (!(new_log_ident= (char*) my_strdup_with_length((byte*) buf + if (!(new_log_ident= my_strdup_with_length((byte*) buf +
ident_offset, ident_offset,
(uint) ident_len, (uint) ident_len,
MYF(MY_WME)))) MYF(MY_WME))))
return; return;
alloced = 1; alloced = 1;
} }
......
...@@ -3477,7 +3477,7 @@ struct my_option my_long_options[] = ...@@ -3477,7 +3477,7 @@ struct my_option my_long_options[] =
"Max packetlength to send/receive from to server.", "Max packetlength to send/receive from to server.",
(gptr*) &global_system_variables.max_allowed_packet, (gptr*) &global_system_variables.max_allowed_packet,
(gptr*) &max_system_variables.max_allowed_packet, 0, GET_ULONG, (gptr*) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
REQUIRED_ARG, 1024*1024L, 80, 64*1024*1024L, MALLOC_OVERHEAD, 1024, 0}, REQUIRED_ARG, 1024*1024L, 80, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE, {"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE,
"Can be used to restrict the total size used to cache a multi-transaction query.", "Can be used to restrict the total size used to cache a multi-transaction query.",
(gptr*) &max_binlog_cache_size, (gptr*) &max_binlog_cache_size, 0, (gptr*) &max_binlog_cache_size, (gptr*) &max_binlog_cache_size, 0,
......
...@@ -202,6 +202,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields, ...@@ -202,6 +202,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
thd->variables.read_buff_size); thd->variables.read_buff_size);
table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN,
thd->variables.bulk_insert_buff_size); thd->variables.bulk_insert_buff_size);
table->bulk_insert= 1;
} }
while ((values= its++)) while ((values= its++))
...@@ -290,6 +291,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields, ...@@ -290,6 +291,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
error=1; error=1;
} }
} }
table->bulk_insert= 0;
} }
if (id && values_list.elements != 1) if (id && values_list.elements != 1)
thd->insert_id(id); // For update log thd->insert_id(id); // For update log
......
...@@ -248,8 +248,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -248,8 +248,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table->next_number_field=table->found_next_number_field; table->next_number_field=table->found_next_number_field;
VOID(table->file->extra_opt(HA_EXTRA_WRITE_CACHE, VOID(table->file->extra_opt(HA_EXTRA_WRITE_CACHE,
thd->variables.read_buff_size)); thd->variables.read_buff_size));
VOID(table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, table->bulk_insert= 1;
thd->variables.bulk_insert_buff_size));
if (handle_duplicates == DUP_IGNORE || if (handle_duplicates == DUP_IGNORE ||
handle_duplicates == DUP_REPLACE) handle_duplicates == DUP_REPLACE)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
/* drop and alter of tables */ /* drop and alter of tables */
#include "mysql_priv.h" #include "mysql_priv.h"
#include <hash.h>
#ifdef HAVE_BERKELEY_DB #ifdef HAVE_BERKELEY_DB
#include <ha_berkeley.h> #include "ha_berkeley.h"
#endif #endif
#include <hash.h>
#include <myisam.h> #include <myisam.h>
#include <assert.h> #include <assert.h>
......
...@@ -91,7 +91,7 @@ struct st_table { ...@@ -91,7 +91,7 @@ struct st_table {
my_bool null_row; /* All columns are null */ my_bool null_row; /* All columns are null */
my_bool maybe_null,outer_join; /* Used with OUTER JOIN */ my_bool maybe_null,outer_join; /* Used with OUTER JOIN */
my_bool distinct,const_table,no_rows; my_bool distinct,const_table,no_rows;
my_bool key_read; my_bool key_read, bulk_insert;
my_bool crypted; my_bool crypted;
my_bool db_low_byte_first; /* Portable row format */ my_bool db_low_byte_first; /* Portable row format */
my_bool locked_by_flush; my_bool locked_by_flush;
......
...@@ -71,9 +71,11 @@ report_errors() ...@@ -71,9 +71,11 @@ report_errors()
while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0) while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
{ {
#ifndef DBUG_OFF /* Avoid warning */
char buf[200]; char buf[200];
DBUG_PRINT("error", ("OpenSSL: %s:%s:%d:%s\n", ERR_error_string(l,buf), DBUG_PRINT("error", ("OpenSSL: %s:%s:%d:%s\n", ERR_error_string(l,buf),
file,line,(flags & ERR_TXT_STRING) ? data : "")) ; file,line,(flags & ERR_TXT_STRING) ? data : "")) ;
#endif
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
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