Commit 7d0df267 authored by unknown's avatar unknown

Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1

into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5291

parents 4b4af1c1 1230daf8
...@@ -2693,8 +2693,9 @@ char *get_arg(char *line, my_bool get_next_arg) ...@@ -2693,8 +2693,9 @@ char *get_arg(char *line, my_bool get_next_arg)
ptr++; ptr++;
if (*ptr == '\\') // short command was used if (*ptr == '\\') // short command was used
ptr+= 2; ptr+= 2;
while (*ptr &&!my_isspace(charset_info, *ptr)) // skip command else
ptr++; while (*ptr &&!my_isspace(charset_info, *ptr)) // skip command
ptr++;
} }
if (!*ptr) if (!*ptr)
return NullS; return NullS;
......
...@@ -2445,10 +2445,10 @@ elif test "$extra_charsets" = none; then ...@@ -2445,10 +2445,10 @@ elif test "$extra_charsets" = none; then
CHARSETS="$CHARSETS" CHARSETS="$CHARSETS"
elif test "$extra_charsets" = complex; then elif test "$extra_charsets" = complex; then
CHARSETS="$CHARSETS $CHARSETS_COMPLEX" CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS]) AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
elif test "$extra_charsets" = all; then elif test "$extra_charsets" = all; then
CHARSETS="$CHARSETS $CHARSETS_AVAILABLE" CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS]) AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
else else
EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'` EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
CHARSETS="$CHARSETS $EXTRA_CHARSETS" CHARSETS="$CHARSETS $EXTRA_CHARSETS"
......
...@@ -1585,7 +1585,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name) ...@@ -1585,7 +1585,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
int old_lock; int old_lock;
MYISAM_SHARE *share=info->s; MYISAM_SHARE *share=info->s;
MI_STATE_INFO old_state; MI_STATE_INFO old_state;
DBUG_ENTER("sort_index"); DBUG_ENTER("mi_sort_index");
if (!(param->testflag & T_SILENT)) if (!(param->testflag & T_SILENT))
printf("- Sorting index for MyISAM-table '%s'\n",name); printf("- Sorting index for MyISAM-table '%s'\n",name);
...@@ -1664,7 +1664,7 @@ err: ...@@ -1664,7 +1664,7 @@ err:
err2: err2:
VOID(my_delete(param->temp_filename,MYF(MY_WME))); VOID(my_delete(param->temp_filename,MYF(MY_WME)));
DBUG_RETURN(-1); DBUG_RETURN(-1);
} /* sort_index */ } /* mi_sort_index */
/* Sort records recursive using one index */ /* Sort records recursive using one index */
...@@ -1672,7 +1672,7 @@ err2: ...@@ -1672,7 +1672,7 @@ err2:
static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
my_off_t pagepos, File new_file) my_off_t pagepos, File new_file)
{ {
uint length,nod_flag,used_length; uint length,nod_flag,used_length, key_length;
uchar *buff,*keypos,*endpos; uchar *buff,*keypos,*endpos;
uchar key[MI_MAX_POSSIBLE_KEY_BUFF]; uchar key[MI_MAX_POSSIBLE_KEY_BUFF];
my_off_t new_page_pos,next_page; my_off_t new_page_pos,next_page;
...@@ -1693,7 +1693,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -1693,7 +1693,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
llstr(pagepos,llbuff)); llstr(pagepos,llbuff));
goto err; goto err;
} }
if ((nod_flag=mi_test_if_nod(buff))) if ((nod_flag=mi_test_if_nod(buff)) || keyinfo->flag & HA_FULLTEXT)
{ {
used_length=mi_getint(buff); used_length=mi_getint(buff);
keypos=buff+2+nod_flag; keypos=buff+2+nod_flag;
...@@ -1704,7 +1704,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -1704,7 +1704,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
{ {
next_page=_mi_kpos(nod_flag,keypos); next_page=_mi_kpos(nod_flag,keypos);
_mi_kpointer(info,keypos-nod_flag,param->new_file_pos); /* Save new pos */ _mi_kpointer(info,keypos-nod_flag,param->new_file_pos); /* Save new pos */
if (sort_one_index(param,info,keyinfo,next_page, new_file)) if (sort_one_index(param,info,keyinfo,next_page,new_file))
{ {
DBUG_PRINT("error",("From page: %ld, keyoffset: %d used_length: %d", DBUG_PRINT("error",("From page: %ld, keyoffset: %d used_length: %d",
(ulong) pagepos, (int) (keypos - buff), (ulong) pagepos, (int) (keypos - buff),
...@@ -1714,11 +1714,25 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -1714,11 +1714,25 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
} }
} }
if (keypos >= endpos || if (keypos >= endpos ||
((*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0) (key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0)
break; break;
#ifdef EXTRA_DEBUG DBUG_ASSERT(keypos <= endpos);
assert(keypos <= endpos); if (keyinfo->flag & HA_FULLTEXT)
#endif {
uint off;
int subkeys;
get_key_full_length_rdonly(off, key);
subkeys=ft_sintXkorr(key+off);
if (subkeys < 0)
{
next_page= _mi_dpos(info,0,key+key_length);
_mi_dpointer(info,keypos-nod_flag-info->s->rec_reflength,
param->new_file_pos); /* Save new pos */
if (sort_one_index(param,info,&info->s->ft2_keyinfo,
next_page,new_file))
goto err;
}
}
} }
} }
......
...@@ -7,6 +7,15 @@ FULLTEXT KEY (a) ...@@ -7,6 +7,15 @@ FULLTEXT KEY (a)
repair table t1 quick; repair table t1 quick;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 repair status OK test.t1 repair status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select count(*) from t1 where match a against ('aaaxxx'); select count(*) from t1 where match a against ('aaaxxx');
count(*) count(*)
260 260
......
...@@ -642,3 +642,12 @@ x y ...@@ -642,3 +642,12 @@ x y
1 3 1 3
1 2 1 2
drop table t1,t2,t3; drop table t1,t2,t3;
create table t1 (a int);
create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
create table t3 engine=merge union=(t1, t2) select * from t1;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
create table t3 engine=merge union=(t1, t2) select * from t2;
ERROR HY000: You can't specify target table 't2' for update in FROM clause
drop table t1, t2;
...@@ -259,3 +259,14 @@ execute ` ...@@ -259,3 +259,14 @@ execute `
1234 1234
1234 1234
set names default; set names default;
create table t1 (a varchar(10)) charset=utf8;
insert into t1 (a) values ('yahoo');
set character_set_connection=latin1;
prepare stmt from 'select a from t1 where a like ?';
set @var='google';
execute stmt using @var;
a
execute stmt using @var;
a
deallocate prepare stmt;
drop table t1;
...@@ -436,6 +436,14 @@ select length(version()) > 1 as `*` UNION select 2; ...@@ -436,6 +436,14 @@ select length(version()) > 1 as `*` UNION select 2;
* *
1 1
2 2
create table t1 (a int);
insert into t1 values (0), (3), (1), (2);
explain (select * from t1) union (select * from t1) order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION t1 ALL NULL NULL NULL NULL 4
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort
drop table t1;
CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM; CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM;
INSERT INTO t1 (id) VALUES("1"); INSERT INTO t1 (id) VALUES("1");
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) ENGINE=MyISAM; CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) ENGINE=MyISAM;
......
...@@ -44,6 +44,9 @@ while ($1) ...@@ -44,6 +44,9 @@ while ($1)
# converting to two-level # converting to two-level
repair table t1 quick; repair table t1 quick;
check table t1;
optimize table t1; # BUG#5327 - mi_sort_index() of 2-level tree
check table t1;
select count(*) from t1 where match a against ('aaaxxx'); select count(*) from t1 where match a against ('aaaxxx');
select count(*) from t1 where match a against ('aaayyy'); select count(*) from t1 where match a against ('aaayyy');
...@@ -102,6 +105,11 @@ CREATE TABLE t1 ( ...@@ -102,6 +105,11 @@ CREATE TABLE t1 (
FULLTEXT KEY (a) FULLTEXT KEY (a)
) ENGINE=MyISAM; ) ENGINE=MyISAM;
#
# now same as about but w/o repair table
# 2-level tree created by mi_write
#
# two-level entry, second-level tree with depth 2 # two-level entry, second-level tree with depth 2
--disable_query_log --disable_query_log
let $1=260; let $1=260;
......
...@@ -271,3 +271,17 @@ select * from t3 where x = 1 and y < 5 order by y; ...@@ -271,3 +271,17 @@ select * from t3 where x = 1 and y < 5 order by y;
# Bug is that followng query returns empty set while it must be same as above # Bug is that followng query returns empty set while it must be same as above
select * from t3 where x = 1 and y < 5 order by y desc; select * from t3 where x = 1 and y < 5 order by y desc;
drop table t1,t2,t3; drop table t1,t2,t3;
#
# Bug#5232: CREATE TABLE ... SELECT
#
create table t1 (a int);
create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
--error 1093
create table t3 engine=merge union=(t1, t2) select * from t1;
--error 1093
create table t3 engine=merge union=(t1, t2) select * from t2;
drop table t1, t2;
...@@ -261,3 +261,20 @@ execute ` ...@@ -261,3 +261,20 @@ execute `
set names default; set names default;
#
# BUG#4368 "select * from t1 where a like ?" crashes server if a is in utf8
# and ? is in latin1
# Check that Item converting latin1 to utf8 (for LIKE function) is created
# in memory of prepared statement.
#
create table t1 (a varchar(10)) charset=utf8;
insert into t1 (a) values ('yahoo');
set character_set_connection=latin1;
prepare stmt from 'select a from t1 where a like ?';
set @var='google';
execute stmt using @var;
execute stmt using @var;
deallocate prepare stmt;
drop table t1;
...@@ -264,6 +264,14 @@ drop table t1,t2; ...@@ -264,6 +264,14 @@ drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2; select length(version()) > 1 as `*` UNION select 2;
#
# Bug #4980: problem with explain
#
create table t1 (a int);
insert into t1 values (0), (3), (1), (2);
explain (select * from t1) union (select * from t1) order by a;
drop table t1;
# #
# Test for another bug with UNION and LEFT JOIN # Test for another bug with UNION and LEFT JOIN
# #
......
...@@ -68,7 +68,7 @@ then ...@@ -68,7 +68,7 @@ then
c_d="$c_d Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL," c_d="$c_d Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
c_d="$c_d PRIMARY KEY Host (Host,Db,User)," c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
c_d="$c_d KEY User (User)" c_d="$c_d KEY User (User)"
c_d="$c_d )" c_d="$c_d ) engine=MyISAM"
c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin" c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin"
c_d="$c_d comment='Database privileges';" c_d="$c_d comment='Database privileges';"
...@@ -98,7 +98,7 @@ then ...@@ -98,7 +98,7 @@ then
c_h="$c_h Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL," c_h="$c_h Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
c_h="$c_h Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL," c_h="$c_h Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
c_h="$c_h PRIMARY KEY Host (Host,Db)" c_h="$c_h PRIMARY KEY Host (Host,Db)"
c_h="$c_h )" c_h="$c_h ) engine=MyISAM"
c_h="$c_h CHARACTER SET utf8 COLLATE utf8_bin" c_h="$c_h CHARACTER SET utf8 COLLATE utf8_bin"
c_h="$c_h comment='Host privileges; Merged with database privileges';" c_h="$c_h comment='Host privileges; Merged with database privileges';"
fi fi
...@@ -142,7 +142,7 @@ then ...@@ -142,7 +142,7 @@ then
c_u="$c_u max_updates int(11) unsigned DEFAULT 0 NOT NULL," c_u="$c_u max_updates int(11) unsigned DEFAULT 0 NOT NULL,"
c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL," c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
c_u="$c_u PRIMARY KEY Host (Host,User)" c_u="$c_u PRIMARY KEY Host (Host,User)"
c_u="$c_u )" c_u="$c_u ) engine=MyISAM"
c_u="$c_u CHARACTER SET utf8 COLLATE utf8_bin" c_u="$c_u CHARACTER SET utf8 COLLATE utf8_bin"
c_u="$c_u comment='Users and global privileges';" c_u="$c_u comment='Users and global privileges';"
...@@ -182,7 +182,7 @@ then ...@@ -182,7 +182,7 @@ then
c_f="$c_f dl char(128) DEFAULT '' NOT NULL," c_f="$c_f dl char(128) DEFAULT '' NOT NULL,"
c_f="$c_f type enum ('function','aggregate') NOT NULL," c_f="$c_f type enum ('function','aggregate') NOT NULL,"
c_f="$c_f PRIMARY KEY (name)" c_f="$c_f PRIMARY KEY (name)"
c_f="$c_f )" c_f="$c_f ) engine=MyISAM"
c_f="$c_f CHARACTER SET utf8 COLLATE utf8_bin" c_f="$c_f CHARACTER SET utf8 COLLATE utf8_bin"
c_f="$c_f comment='User defined functions';" c_f="$c_f comment='User defined functions';"
fi fi
...@@ -204,7 +204,7 @@ then ...@@ -204,7 +204,7 @@ then
c_t="$c_t Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL," c_t="$c_t Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,"
c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name)," c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name),"
c_t="$c_t KEY Grantor (Grantor)" c_t="$c_t KEY Grantor (Grantor)"
c_t="$c_t )" c_t="$c_t ) engine=MyISAM"
c_t="$c_t CHARACTER SET utf8 COLLATE utf8_bin" c_t="$c_t CHARACTER SET utf8 COLLATE utf8_bin"
c_t="$c_t comment='Table privileges';" c_t="$c_t comment='Table privileges';"
fi fi
...@@ -224,7 +224,7 @@ then ...@@ -224,7 +224,7 @@ then
c_c="$c_c Timestamp timestamp(14)," c_c="$c_c Timestamp timestamp(14),"
c_c="$c_c Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL," c_c="$c_c Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,"
c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)" c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
c_c="$c_c )" c_c="$c_c ) engine=MyISAM"
c_c="$c_c CHARACTER SET utf8 COLLATE utf8_bin" c_c="$c_c CHARACTER SET utf8 COLLATE utf8_bin"
c_c="$c_c comment='Column privileges';" c_c="$c_c comment='Column privileges';"
fi fi
...@@ -244,7 +244,7 @@ then ...@@ -244,7 +244,7 @@ then
c_ht="$c_ht url varchar(128) not null," c_ht="$c_ht url varchar(128) not null,"
c_ht="$c_ht primary key (help_topic_id)," c_ht="$c_ht primary key (help_topic_id),"
c_ht="$c_ht unique index (name)" c_ht="$c_ht unique index (name)"
c_ht="$c_ht )" c_ht="$c_ht ) engine=MyISAM"
c_ht="$c_ht CHARACTER SET utf8" c_ht="$c_ht CHARACTER SET utf8"
c_ht="$c_ht comment='help topics';" c_ht="$c_ht comment='help topics';"
fi fi
...@@ -264,7 +264,7 @@ then ...@@ -264,7 +264,7 @@ then
c_hc="$c_hc url varchar(128) not null," c_hc="$c_hc url varchar(128) not null,"
c_hc="$c_hc primary key (help_category_id)," c_hc="$c_hc primary key (help_category_id),"
c_hc="$c_hc unique index (name)" c_hc="$c_hc unique index (name)"
c_hc="$c_hc )" c_hc="$c_hc ) engine=MyISAM"
c_hc="$c_hc CHARACTER SET utf8" c_hc="$c_hc CHARACTER SET utf8"
c_hc="$c_hc comment='help categories';" c_hc="$c_hc comment='help categories';"
fi fi
...@@ -280,7 +280,7 @@ then ...@@ -280,7 +280,7 @@ then
c_hk="$c_hk name varchar(64) not null," c_hk="$c_hk name varchar(64) not null,"
c_hk="$c_hk primary key (help_keyword_id)," c_hk="$c_hk primary key (help_keyword_id),"
c_hk="$c_hk unique index (name)" c_hk="$c_hk unique index (name)"
c_hk="$c_hk )" c_hk="$c_hk ) engine=MyISAM"
c_hk="$c_hk CHARACTER SET utf8" c_hk="$c_hk CHARACTER SET utf8"
c_hk="$c_hk comment='help keywords';" c_hk="$c_hk comment='help keywords';"
fi fi
...@@ -295,7 +295,7 @@ then ...@@ -295,7 +295,7 @@ then
c_hr="$c_hr help_topic_id int unsigned not null references help_topic," c_hr="$c_hr help_topic_id int unsigned not null references help_topic,"
c_hr="$c_hr help_keyword_id int unsigned not null references help_keyword," c_hr="$c_hr help_keyword_id int unsigned not null references help_keyword,"
c_hr="$c_hr primary key (help_keyword_id, help_topic_id)" c_hr="$c_hr primary key (help_keyword_id, help_topic_id)"
c_hr="$c_hr )" c_hr="$c_hr ) engine=MyISAM"
c_hr="$c_hr CHARACTER SET utf8" c_hr="$c_hr CHARACTER SET utf8"
c_hr="$c_hr comment='keyword-topic relation';" c_hr="$c_hr comment='keyword-topic relation';"
fi fi
...@@ -310,8 +310,7 @@ then ...@@ -310,8 +310,7 @@ then
c_tzn="$c_tzn Name char(64) NOT NULL," c_tzn="$c_tzn Name char(64) NOT NULL,"
c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL," c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL,"
c_tzn="$c_tzn PRIMARY KEY Name (Name)" c_tzn="$c_tzn PRIMARY KEY Name (Name)"
c_tzn="$c_tzn )" c_tzn="$c_tzn ) engine=MyISAM CHARACTER SET utf8"
c_tzn="$c_tzn CHARACTER SET utf8"
c_tzn="$c_tzn comment='Time zone names';" c_tzn="$c_tzn comment='Time zone names';"
if test "$1" = "test" if test "$1" = "test"
...@@ -333,8 +332,7 @@ then ...@@ -333,8 +332,7 @@ then
c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment," c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment,"
c_tz="$c_tz Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL," c_tz="$c_tz Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,"
c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)" c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)"
c_tz="$c_tz )" c_tz="$c_tz ) engine=MyISAM CHARACTER SET utf8"
c_tz="$c_tz CHARACTER SET utf8"
c_tz="$c_tz comment='Time zones';" c_tz="$c_tz comment='Time zones';"
if test "$1" = "test" if test "$1" = "test"
...@@ -355,8 +353,7 @@ then ...@@ -355,8 +353,7 @@ then
c_tzt="$c_tzt Transition_time bigint signed NOT NULL," c_tzt="$c_tzt Transition_time bigint signed NOT NULL,"
c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL," c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL,"
c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)" c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)"
c_tzt="$c_tzt )" c_tzt="$c_tzt ) engine=MyISAM CHARACTER SET utf8"
c_tzt="$c_tzt CHARACTER SET utf8"
c_tzt="$c_tzt comment='Time zone transitions';" c_tzt="$c_tzt comment='Time zone transitions';"
if test "$1" = "test" if test "$1" = "test"
...@@ -578,8 +575,7 @@ then ...@@ -578,8 +575,7 @@ then
c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL," c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL,"
c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL," c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL,"
c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)" c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)"
c_tztt="$c_tztt )" c_tztt="$c_tztt ) engine=MyISAM CHARACTER SET utf8"
c_tztt="$c_tztt CHARACTER SET utf8"
c_tztt="$c_tztt comment='Time zone transition types';" c_tztt="$c_tztt comment='Time zone transition types';"
if test "$1" = "test" if test "$1" = "test"
...@@ -615,8 +611,7 @@ then ...@@ -615,8 +611,7 @@ then
c_tzls="$c_tzls Transition_time bigint signed NOT NULL," c_tzls="$c_tzls Transition_time bigint signed NOT NULL,"
c_tzls="$c_tzls Correction int signed NOT NULL," c_tzls="$c_tzls Correction int signed NOT NULL,"
c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)" c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)"
c_tzls="$c_tzls )" c_tzls="$c_tzls ) engine=MyISAM CHARACTER SET utf8"
c_tzts="$c_tzts CHARACTER SET utf8"
c_tzls="$c_tzls comment='Leap seconds information for time zones';" c_tzls="$c_tzls comment='Leap seconds information for time zones';"
if test "$1" = "test" if test "$1" = "test"
......
...@@ -311,6 +311,7 @@ do ...@@ -311,6 +311,7 @@ do
fi fi
if test ! -f $pid_file # This is removed if normal shutdown if test ! -f $pid_file # This is removed if normal shutdown
then then
echo "STOPPING server from pid file $pid_file"
break break
fi fi
...@@ -321,12 +322,24 @@ do ...@@ -321,12 +322,24 @@ do
# but should work for the rest of the servers. # but should work for the rest of the servers.
# The only thing is ps x => redhat 5 gives warnings when using ps -x. # The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill. # kill -9 is used or the process won't react on the kill.
numofproces=`ps xa | grep -v "grep" | grep -c $ledir/$MYSQLD` if test -n "$mysql_tcp_port"
then
numofproces=`ps xa | grep -v "grep" | grep $ledir/$MYSQLD| grep -c "port=$mysql_tcp_port"`
else
numofproces=`ps xa | grep -v "grep" | grep -c $ledir/$MYSQLD`
fi
echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
I=1 I=1
while test "$I" -le "$numofproces" while test "$I" -le "$numofproces"
do do
PROC=`ps xa | grep $ledir/$MYSQLD | grep -v "grep" | sed -n '$p'` if test -n "$mysql_tcp_port"
then
PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "port=$mysql_tcp_port" | sed -n '$p'`
else
PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | sed -n '$p'`
fi
for T in $PROC for T in $PROC
do do
break break
......
...@@ -299,8 +299,9 @@ convert_error_code_to_mysql( ...@@ -299,8 +299,9 @@ convert_error_code_to_mysql(
} else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) { } else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) {
return(HA_ERR_ROW_IS_REFERENCED); return(HA_ERR_CANNOT_ADD_FOREIGN); /* TODO: This is a bit
misleading, a new MySQL error
code should be introduced */
} else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) { } else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) {
return(HA_ERR_CRASHED); return(HA_ERR_CRASHED);
......
...@@ -211,9 +211,20 @@ void Item_bool_func2::fix_length_and_dec() ...@@ -211,9 +211,20 @@ void Item_bool_func2::fix_length_and_dec()
} }
else else
{ {
conv= new Item_func_conv_charset(args[weak],args[strong]->collation.collation); THD *thd= current_thd;
/*
In case we're in statement prepare, create conversion item
in its memory: it will be reused on each execute.
*/
Item_arena *arena= thd->current_arena, backup;
if (arena->is_stmt_prepare())
thd->set_n_backup_item_arena(arena, &backup);
conv= new Item_func_conv_charset(args[weak],
args[strong]->collation.collation);
if (arena->is_stmt_prepare())
thd->restore_backup_item_arena(arena, &backup);
conv->collation.set(args[weak]->collation.derivation); conv->collation.set(args[weak]->collation.derivation);
conv->fix_fields(current_thd, 0, &conv); conv->fix_fields(thd, 0, &conv);
} }
args[weak]= conv ? conv : args[weak]; args[weak]= conv ? conv : args[weak];
} }
......
...@@ -2940,6 +2940,13 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -2940,6 +2940,13 @@ we force server id to 2, but this MySQL server will not act as a slave.");
#if defined(__NT__) || defined(HAVE_SMEM) #if defined(__NT__) || defined(HAVE_SMEM)
handle_connections_methods(); handle_connections_methods();
#else #else
#ifdef __WIN__
if ( !have_tcpip || opt_disable_networking)
{
sql_print_error("TCP/IP unavailable or disabled with --skip-networking; no available interfaces");
unireg_abort(1);
}
#endif
handle_connections_sockets(0); handle_connections_sockets(0);
#endif /* __NT__ */ #endif /* __NT__ */
......
/* Copyright (C) 2003 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 */
/* /*
Modifikoval Petr -Bnajdr, snajdr@pvt.net, snajdr@cpress.cz v.0.01 Modifikoval Petr -Bnajdr, snajdr@pvt.net, snajdr@cpress.cz v.0.01
ISO LATIN-8852-2 ISO LATIN-8852-2
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
/* Knud Riishøjgård knudriis@post.tele.dk 99 && /* Knud Riishøjgård knudriis@post.tele.dk 99 &&
Carsten H. Pedersen, carsten.pedersen@bitbybit.dk oct. 1999 / aug. 2001. */ Carsten H. Pedersen, carsten.pedersen@bitbybit.dk oct. 1999 / aug. 2001. */
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
Dutch error messages (share/dutch/errmsg.txt) Dutch error messages (share/dutch/errmsg.txt)
2001-08-02 - Arjen Lentz (agl@bitbike.com) 2001-08-02 - Arjen Lentz (agl@bitbike.com)
Completed earlier partial translation; worked on consistency and spelling. Completed earlier partial translation; worked on consistency and spelling.
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=latin1 character-set=latin1
......
/* Copyright (C) 2003 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 */
/* /*
Copyright Abandoned 1997 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
Esialgne tlge: Tnu Samuel (tonu@spam.ee) Esialgne tlge: Tnu Samuel (tonu@spam.ee)
Parandanud ja tiendanud: Indrek Siitan (tfr@mysql.com) Parandanud ja tiendanud: Indrek Siitan (tfr@mysql.com)
*/ */
character-set=latin7 character-set=latin7
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=latin1 character-set=latin1
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
Dirk Munzinger (dmun@4t2.com) Dirk Munzinger (dmun@4t2.com)
2001-06-07 2001-06-07
...@@ -11,7 +25,7 @@ ...@@ -11,7 +25,7 @@
Stefan Hinz (stefan@mysql.com) Stefan Hinz (stefan@mysql.com)
2003-10-01 2003-10-01
*/ */
character-set=latin1 character-set=latin1
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=greek character-set=greek
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 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 */
/*
Translated by Feher Peter. Forditotta Feher Peter (feherp@mail.matav.hu) 1998 Translated by Feher Peter. Forditotta Feher Peter (feherp@mail.matav.hu) 1998
Updated May, 2000 Updated May, 2000
This file is public domain and comes with NO WARRANTY of any kind */ */
character-set=latin2 character-set=latin2
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=latin1 character-set=latin1
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
3.22.10-beta euc-japanese (ujis) text 3.22.10-beta euc-japanese (ujis) text
*/ */
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This 화일 is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=euckr character-set=euckr
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
/* Roy-Magne Mo rmo@www.hivolda.no 97 */ /* Roy-Magne Mo rmo@www.hivolda.no 97 */
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
/* Roy-Magne Mo rmo@www.hivolda.no 97 */ /* Roy-Magne Mo rmo@www.hivolda.no 97 */
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
Changed by Jaroslaw Lewandowski <jotel@itnet.com.pl> Changed by Jaroslaw Lewandowski <jotel@itnet.com.pl>
Charset ISO-8859-2 Charset ISO-8859-2
*/ */
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
/* Updated by Thiago Delgado Pinto - thiagodp@ieg.com.br - 06.07.2002 */ /* Updated by Thiago Delgado Pinto - thiagodp@ieg.com.br - 06.07.2002 */
character-set=latin1 character-set=latin1
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
Translated into Romanian by Stefan Saroiu Translated into Romanian by Stefan Saroiu
e-mail: tzoompy@cs.washington.edu e-mail: tzoompy@cs.washington.edu
*/ */
......
/* Copyright 2003 MySQL AB /* Copyright (C) 2003 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 */
/*
Translation done in 2003 by Egor Egorov; Ensita.NET, http://www.ensita.net/ Translation done in 2003 by Egor Egorov; Ensita.NET, http://www.ensita.net/
This file is public domain and comes with NO WARRANTY of any kind */ */
/* charset: KOI8-R */ /* charset: KOI8-R */
character-set=koi8r character-set=koi8r
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
/* /*
Translated from both E n g l i s h & C z e c h error messages Translated from both E n g l i s h & C z e c h error messages
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind
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 */
/*
Traduccion por Miguel Angel Fernandez Roiz -- LoboCom Sistemas, s.l. Traduccion por Miguel Angel Fernandez Roiz -- LoboCom Sistemas, s.l.
From June 28, 2001 translated by Miguel Solorzano miguel@mysql.com */ From June 28, 2001 translated by Miguel Solorzano miguel@mysql.com */
......
This diff is collapsed.
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
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 */
character-set=latin1 character-set=latin1
......
/* Copyright Abandoned 1997 TCX DataKonsult AB & Monty Program KB & Detron HB /* Copyright (C) 2003 MySQL AB
* This is public domain and comes with NO WARRANTY of any kind
* 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 */
/*
* Ukrainian translation by Roman Festchook <roma@orta.zt.ua> * Ukrainian translation by Roman Festchook <roma@orta.zt.ua>
* Encoding: KOI8-U * Encoding: KOI8-U
* Version: 13/09/2001 mysql-3.23.41 * Version: 13/09/2001 mysql-3.23.41
......
...@@ -222,10 +222,12 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, ...@@ -222,10 +222,12 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
table->next= thd->derived_tables; table->next= thd->derived_tables;
thd->derived_tables= table; thd->derived_tables= table;
} }
}
else
free_tmp_table(thd, table);
exit: exit:
delete derived_result; delete derived_result;
lex->current_select= save_current_select; lex->current_select= save_current_select;
}
DBUG_RETURN(res); DBUG_RETURN(res);
} }
...@@ -2335,6 +2335,21 @@ mysql_execute_command(THD *thd) ...@@ -2335,6 +2335,21 @@ mysql_execute_command(THD *thd)
net_printf(thd,ER_UPDATE_TABLE_USED, create_table->real_name); net_printf(thd,ER_UPDATE_TABLE_USED, create_table->real_name);
goto create_error; goto create_error;
} }
if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
{
TABLE_LIST *tab;
for (tab= tables; tab; tab= tab->next)
{
if (find_real_table_in_list((TABLE_LIST*) lex->create_info.
merge_list.first,
tables->db, tab->real_name))
{
net_printf(thd, ER_UPDATE_TABLE_USED, tab->real_name);
goto create_error;
}
}
}
if (tables && check_table_access(thd, SELECT_ACL, tables,0)) if (tables && check_table_access(thd, SELECT_ACL, tables,0))
goto create_error; // Error message is given goto create_error; // Error message is given
select_lex->options|= SELECT_NO_UNLOCK; select_lex->options|= SELECT_NO_UNLOCK;
......
...@@ -4332,7 +4332,7 @@ show_param: ...@@ -4332,7 +4332,7 @@ show_param:
LEX *lex= Lex; LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS; lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
} opt_limit_clause_init } opt_limit_clause_init
| keys_or_index FROM table_ident opt_db | keys_or_index from_or_in table_ident opt_db
{ {
Lex->sql_command= SQLCOM_SHOW_KEYS; Lex->sql_command= SQLCOM_SHOW_KEYS;
if ($4) if ($4)
......
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