Commit f314fbd7 authored by unknown's avatar unknown

merge


Docs/manual.texi:
  unedit old version;  Will reapply later
parents 8cdc6d54 09a9abeb
This diff is collapsed.
......@@ -287,7 +287,6 @@ inline double ulonglong2double(ulonglong value)
#define FN_ROOTDIR "\\"
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#define FN_LOWER_CASE TRUE /* Files are represented in lower case */
#define MY_NFILE 1024
#define DO_NOT_REMOVE_THREAD_WRAPPERS
......
......@@ -11,7 +11,9 @@ Created 1/20/1994 Heikki Tuuri
#include "univ.i"
#include <time.h>
#ifndef MYSQL_SERVER
#include <ctype.h>
#endif
typedef time_t ib_time_t;
......
......@@ -73,7 +73,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
if (!(flag & READING_HEADER) || info->error == -1 ||
(uint) info->error+in_buff_length < 3)
{
if (!my_errno)
if (!my_errno || my_errno == -1)
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
......@@ -87,7 +87,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
{
if (!my_errno)
if (!my_errno || my_errno == -1)
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
......
......@@ -708,7 +708,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
puts("- check record links");
}
if (!(record= (byte*) my_alloca(info->s->base.pack_reclength)))
if (!(record= (byte*) my_malloc(info->s->base.pack_reclength,MYF(0))))
{
mi_check_print_error(param,"Not Enough memory");
DBUG_RETURN(-1);
......@@ -924,7 +924,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
if (block_info.rec_len < (uint) info->s->min_pack_length ||
block_info.rec_len > (uint) info->s->max_pack_length)
{
mi_check_print_error(param,"Found block with wrong recordlength: %d at %s",
mi_check_print_error(param,
"Found block with wrong recordlength: %d at %s",
block_info.rec_len, llstr(start_recpos,llbuff));
got_error=1;
break;
......@@ -934,7 +935,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
goto err;
if (_mi_pack_rec_unpack(info,record,info->rec_buff,block_info.rec_len))
{
mi_check_print_error(param,"Found wrong record at %s", llstr(start_recpos,llbuff));
mi_check_print_error(param,"Found wrong record at %s",
llstr(start_recpos,llbuff));
got_error=1;
}
if (static_row_size)
......@@ -1082,12 +1084,12 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
printf("Lost space: %12s Linkdata: %10s\n",
llstr(empty,llbuff),llstr(link_used,llbuff2));
}
my_afree((gptr) record);
my_free((gptr) record,MYF(0));
DBUG_RETURN (error);
err:
mi_check_print_error(param,"got error: %d when reading datafile",my_errno);
mi_check_print_error(param,"got error: %d when reading datafile at record: %s",my_errno, llstr(records,llbuff));
err2:
my_afree((gptr) record);
my_free((gptr) record,MYF(0));
param->retry_without_quick=1;
DBUG_RETURN(1);
} /* chk_data_link */
......@@ -1188,7 +1190,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
del=info->state->del;
info->state->records=info->state->del=share->state.split=0;
info->state->empty=0;
if (sort_info->new_data_file_type != COMPRESSED_RECORD && !rep_quick)
if (!rep_quick)
share->state.checksum=0;
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
for (i=0 ; i < info->s->base.keys ; i++)
......@@ -1866,8 +1868,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
sort_param.sort_info=sort_info;
del=info->state->del;
if (sort_info->new_data_file_type != COMPRESSED_RECORD &&
! rep_quick)
if (! rep_quick)
share->state.checksum=0;
rec_per_key_part= param->rec_per_key_part;
......@@ -2414,6 +2415,7 @@ static int sort_get_next_record(SORT_INFO *sort_info)
llstr(sort_info->pos,llbuff));
continue;
}
info->checksum=mi_checksum(info,sort_info->record);
if (!sort_info->fix_datafile)
sort_info->filepos=sort_info->pos;
sort_info->max_pos=(sort_info->pos=block_info.filepos+
......@@ -2492,6 +2494,7 @@ int sort_write_record(SORT_INFO *sort_info)
DBUG_RETURN(1);
}
sort_info->filepos+=block_length;
info->s->state.checksum+=info->checksum;
break;
case COMPRESSED_RECORD:
reclength=info->packed_length;
......@@ -2504,6 +2507,7 @@ int sort_write_record(SORT_INFO *sort_info)
mi_check_print_error(param,"%d when writing to datafile",my_errno);
DBUG_RETURN(1);
}
info->s->state.checksum+=info->checksum;
sort_info->filepos+=reclength+length;
break;
}
......
......@@ -962,7 +962,7 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf,
b_type=_mi_pack_get_block_info(info,&block_info,info->dfile,filepos,
info->rec_buff);
if (b_type)
goto err;
goto err; /* Error code is already set */
#ifndef DBUG_OFF
if (block_info.rec_len > share->max_pack_length)
{
......
......@@ -201,7 +201,7 @@ static struct option long_options[] =
static void print_version(void)
{
printf("%s Ver 1.49 for %s at %s\n",my_progname,SYSTEM_TYPE,
printf("%s Ver 1.50 for %s at %s\n",my_progname,SYSTEM_TYPE,
MACHINE_TYPE);
}
......@@ -953,7 +953,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name)
share->base.raid_chunks,
share->base.raid_chunksize);
}
if (share->options & HA_OPTION_CHECKSUM)
if (share->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
printf("Checksum: %23s\n",llstr(info->s->state.checksum,llbuff));
;
if (share->options & HA_OPTION_DELAY_KEY_WRITE)
......
......@@ -693,7 +693,7 @@ drop table t1;
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
--error 690
--error 1062
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
select id from t1;
......@@ -704,7 +704,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
begin;
--error 690
--error 1062
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
......
......@@ -10,7 +10,8 @@ create table t1 (a int);
!$1054 select count(test.t1.b) from t1;
!$1109 select count(not_existing_database.t1) from t1;
!$1109 select count(not_existing_database.t1.a) from t1;
!$1044 select count(not_existing_database.t1.a) from not_existing_database.t1;
--error 1044,1146
select count(not_existing_database.t1.a) from not_existing_database.t1;
!$1054 select 1 from t1 order by 2;
!$1054 select 1 from t1 group by 2;
!$1054 select 1 from t1 order by t1.b;
......
......@@ -73,11 +73,15 @@ CREATE TABLE t3 (
);
--error 1210
select * from t2 having MATCH inhalt AGAINST (t1.id);
select * from t2 where MATCH inhalt AGAINST (t2.inhalt);
--error 1210
select * from t2 having MATCH ticket AGAINST ('foobar');
select * from t2 where MATCH inhalt AGAINST (t2.inhalt);
--error 1191
select * from t2 where MATCH ticket AGAINST ('foobar');
--error 1210
select * from t2,t3 having MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar');
select * from t2,t3 where MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar');
drop table t1,t2,t3;
......@@ -414,8 +414,8 @@ drop table t1;
#
CREATE TABLE t1 (a int unsigned NOT NULL) type=innodb;
--error 1031
INSERT DELAYED INTO t1 VALUES (1);
# Can't test this in 3.23
# INSERT DELAYED INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
SELECT * FROM t1;
DROP TABLE t1;
......@@ -437,7 +437,7 @@ drop table t1;
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
--error 690
--error 1062
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
select id from t1;
......@@ -448,7 +448,7 @@ create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(3
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
LOCK TABLES t1 WRITE;
begin;
--error 690
--error 1062
insert into t1 values (99,1,2,'D'),(1,1,2,'D');
select id from t1;
insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
......
connect (con1,localhost,boo,,);
connection con1;
-- error 1064;
-- error 1064,1102
drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;
......@@ -955,7 +955,7 @@ int ha_gemini::handleIndexEntry(const byte * record, dsmRecid_t recid,
thd = current_thd;
key_info=table->key_info+keynr;
thereIsAnull = false;
thereIsAnull = FALSE;
rc = createKeyString(record, key_info, theKey.akey.keystr,
sizeof(theKey.apad),&keyStringLen,
(short)pindexNumbers[keynr],
......@@ -1067,7 +1067,7 @@ int ha_gemini::createKeyString(const byte * record, KEY *pkeyinfo,
isNull = record[key_part->null_offset] & key_part->null_bit;
if(isNull)
*thereIsAnull = true;
*thereIsAnull = TRUE;
rc = gemFieldToIdxComponent(pos,
(unsigned long) key_part_length,
......@@ -1107,7 +1107,7 @@ int ha_gemini::update_row(const byte * old_record, byte * new_record)
}
for (uint keynr=0 ; keynr < table->keys ; keynr++)
{
if(key_cmp(keynr,old_record, new_record,false))
if(key_cmp(keynr,old_record, new_record,FALSE))
{
error = handleIndexEntry(old_record,lastRowid,KEY_DELETE,keynr);
if(error)
......@@ -2430,8 +2430,8 @@ int ha_gemini::analyze(THD* thd, HA_CHECK_OPT* check_opt)
uint saveIsolation;
dsmMask_t saveLockMode;
check_opt->quick = true;
check_opt->optimize = true; // Tells check not to get table lock
check_opt->quick = TRUE;
check_opt->optimize = TRUE; // Tells check not to get table lock
saveLockMode = lockMode;
saveIsolation = thd->gemini.tx_isolation;
thd->gemini.tx_isolation = ISO_READ_UNCOMMITTED;
......@@ -2503,7 +2503,7 @@ int ha_gemini::check(THD* thd, HA_CHECK_OPT* check_opt)
error = fetch_row(thd->gemini.context,buf);
if(!error)
{
if(key_cmp(i,buf,indexBuf,false))
if(key_cmp(i,buf,indexBuf,FALSE))
{
gemini_msg((dsmContext_t *)thd->gemini.context,
......@@ -2534,7 +2534,7 @@ int ha_gemini::check(THD* thd, HA_CHECK_OPT* check_opt)
}
}
key_cmp(i,indexBuf,prevBuf,true);
key_cmp(i,indexBuf,prevBuf,TRUE);
bcopy((void *)indexBuf,(void *)prevBuf,table->rec_buff_length);
if(!error)
......
......@@ -177,19 +177,19 @@
"Can't write, because of unique constraint, to table '%-.64s'",
"BLOB column '%-.64s' used in key specification without a key length",
"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead",
"Result consisted of more than one row",
"Tulemis on rohkem kui ks kirje",
"This table type requires a primary key",
"Antud MySQL ei ole kompileeritud RAID-i toega",
"You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column",
"Key '%-.64s' doesn't exist in table '%-.64s'",
"Can't open table",
"The handler for the table doesn't support check/repair",
"You are not allowed to execute this command in a transaction",
"Got error %d during COMMIT",
"Got error %d during ROLLBACK",
"Got error %d during FLUSH_LOGS",
"Got error %d during CHECKPOINT",
"Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: `%-.64s' (%-.64s)",
"Ei suuda tabelit avada",
"See tabelitp ei toeta kske CHECK/REPAIR",
"Puudub igus selle transaktsiooniksu andmiseks",
"Sain vea %d COMMIT ksu titmisel",
"Sain vea %d ROLLBACK ksu titmisel",
"Sain vea %d FLUSH_LOGS ksu titmisel",
"Sain vea %d CHECKPOINT ksu titmisel",
"hendus %ld katkestatud andmebaas: '%-.64s' kasutaja: '%-.32s' masin: `%-.64s' (%-.64s)",
"The handler for the table does not support binary table dump",
"Binlog closed while trying to FLUSH MASTER",
"Failed rebuilding the index of dumped table '%-.64s'",
......@@ -198,9 +198,9 @@
"Net error writing to master",
"Can't find FULLTEXT index matching the column list",
"Can't execute the given command because you have active locked tables or an active transaction",
"Unknown system variable '%-.64'",
"Table '%-.64s' is marked as crashed and should be repaired",
"Table '%-.64s' is marked as crashed and last (automatic?) repair failed",
"Tundmatu ssteemne muutja '%-.64'",
"Tabel '%-.64s' on mrgitud vigaseks ja tuleb parandada",
"Tabel '%-.64s' on mrgitud vigaseks ja viimane (automaatne?) parandamiskatse ebannestus",
"Warning: Some non-transactional changed tables couldn't be rolled back",
"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again',
"This operation cannot be performed with a running slave, run SLAVE STOP first",
......
......@@ -205,11 +205,11 @@
"Kunde inte initializera replications-strukturerna. Kontrollera privilegerna för 'master.info'",
"Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"Du kan endast använda konstant-uttryck med SET",
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"DROP DATABASE not allowed while thread is holding global read lock",
"CREATE DATABASE not allowed while thread is holding global read lock",
"Man kan endast använda konstant-uttryck med SET",
"Fick inte ett lås i tid",
"Antal lås överskrider antalet reserverade lås",
"Updaterings-lås kan inte göras när man använder READ UNCOMMITTED",
"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 is not allowed to create new users",
"%-.32s@%-.64s har inte rättigheter att skapa nya användare",
......@@ -2667,7 +2667,7 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias,
DBUG_RETURN(0);
}
#ifdef FN_LOWER_CASE
#ifdef FN_NO_CASE_SENCE
if (!alias) /* Alias is case sensitive */
if (!(alias_str=sql_strmake(alias_str,table->table.length)))
DBUG_RETURN(0);
......
......@@ -1125,7 +1125,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
strmov(new_name_buff,new_name);
fn_same(new_name_buff,table_name,3);
#ifdef FN_LOWER_CASE
#ifdef FN_NO_CASE_SENCE
if (lower_case_table_names)
casedn_str(new_name);
if ((lower_case_table_names &&
......@@ -1709,7 +1709,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
/* Turn off recovery logging since rollback of an
alter table is to delete the new table so there
is no need to log the changes to it. */
error = ha_recovery_logging(thd,false);
error = ha_recovery_logging(thd,FALSE);
if (error)
{
error = 1;
......@@ -1761,7 +1761,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
if (to->file->activate_all_index(thd))
error=1;
tmp_error = ha_recovery_logging(thd,true);
tmp_error = ha_recovery_logging(thd,TRUE);
/*
Ensure that the new table is saved properly to disk so that we
can do a rename
......@@ -1773,7 +1773,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
if (to->file->external_lock(thd,F_UNLCK))
error=1;
err:
tmp_error = ha_recovery_logging(thd,true);
tmp_error = ha_recovery_logging(thd,TRUE);
free_io_cache(from);
*copied= found_count;
*deleted=delete_count;
......
......@@ -189,7 +189,10 @@ TEST_join(JOIN *join)
void mysql_print_status(THD *thd)
{
char current_dir[FN_REFLEN];
printf("\nStatus information:\n\n");
my_getwd(current_dir, sizeof(current_dir),MYF(0));
printf("Current dir: %s\n", current_dir);
if (thd)
thd->proc_info="locks";
thr_print_locks(); // Write some debug info
......
......@@ -42,13 +42,13 @@
#include "my_sys.h" /* defines errno */
#include <errno.h>
#ifdef LONGLONG
#ifdef USE_LONGLONG
#define UTYPE_MAX (~(ulonglong) 0)
#define TYPE_MIN LONGLONG_MIN
#define TYPE_MAX LONGLONG_MAX
#define longtype longlong
#define ulongtype ulonglong
#ifdef UNSIGNED
#ifdef USE_UNSIGNED
#define function ulongtype strtoull
#else
#define function longtype strtoll
......@@ -59,7 +59,7 @@
#define TYPE_MAX LONG_MAX
#define longtype long
#define ulongtype unsigned long
#ifdef UNSIGNED
#ifdef USE_UNSIGNED
#define function ulongtype strtoul
#else
#define function longtype strtol
......@@ -170,7 +170,7 @@ function (const char *nptr,char **endptr,int base)
if (endptr != NULL)
*endptr = (char *) s;
#ifndef UNSIGNED
#ifndef USE_UNSIGNED
/* Check for a value that is within the range of
`unsigned long int', but outside the range of `long int'. */
if (negative)
......@@ -185,7 +185,7 @@ function (const char *nptr,char **endptr,int base)
if (overflow)
{
my_errno=ERANGE;
#ifdef UNSIGNED
#ifdef USE_UNSIGNED
return UTYPE_MAX;
#else
return negative ? TYPE_MIN : TYPE_MAX;
......
......@@ -19,7 +19,7 @@
#include <global.h>
#include <m_string.h>
#if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG)
#define LONGLONG
#if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG)
#define USE_LONGLONG
#include "strto.c"
#endif
......@@ -19,6 +19,6 @@
#include <global.h>
#if !defined(MSDOS) && !defined(HAVE_STRTOUL)
#define UNSIGNED
#define USE_UNSIGNED
#include "strto.c"
#endif
......@@ -20,7 +20,7 @@
#include <global.h>
#include <m_string.h>
#if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG)
#define UNSIGNED
#define LONGLONG
#define USE_UNSIGNED
#define USE_LONGLONG
#include "strto.c"
#endif
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