mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into ice.snake.net:/Volumes/ice2/MySQL/bk/mysql-4.1
This commit is contained in:
commit
295f11edd0
12 changed files with 80 additions and 15 deletions
|
@ -128,6 +128,9 @@ TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
|
|||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
{"all", 'a', "Deprecated. Use --create-options instead.",
|
||||
(gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"all-databases", 'A',
|
||||
"Dump all the databases. This will be same as --databases with all databases selected.",
|
||||
(gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
|
@ -240,7 +243,7 @@ static struct my_option my_long_options[] =
|
|||
{"no-data", 'd', "No row information.", (gptr*) &dFlag, (gptr*) &dFlag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N',
|
||||
"Deprecated, use --set-charset or --skip-set-charset to enable/disable charset settings instead",
|
||||
"Deprecated. Use --skip-set-charset instead.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.",
|
||||
|
|
|
@ -576,7 +576,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain
|
||||
select min(a1) from t1 where a1 != 'KKK';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 3 NULL 14 Using where; Using index
|
||||
explain
|
||||
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -621,7 +621,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
explain
|
||||
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref k2 k2 4 const 6 Using where; Using index
|
||||
1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
|
||||
drop table t1, t2;
|
||||
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
|
||||
|
|
|
@ -32,7 +32,7 @@ T1
|
|||
ALTER TABLE T1 add b int;
|
||||
SHOW TABLES LIKE "T1";
|
||||
Tables_in_test (T1)
|
||||
t1
|
||||
T1
|
||||
ALTER TABLE T1 RENAME T2;
|
||||
SHOW TABLES LIKE "T2";
|
||||
Tables_in_test (T2)
|
||||
|
@ -41,7 +41,7 @@ LOCK TABLE T2 WRITE;
|
|||
ALTER TABLE T2 drop b;
|
||||
SHOW TABLES LIKE "T2";
|
||||
Tables_in_test (T2)
|
||||
t2
|
||||
T2
|
||||
UNLOCK TABLES;
|
||||
RENAME TABLE T2 TO T1;
|
||||
SHOW TABLES LIKE "T1";
|
||||
|
|
|
@ -4,7 +4,7 @@ SELECT * from T1;
|
|||
a
|
||||
drop table t1;
|
||||
flush tables;
|
||||
CREATE TABLE t1 (a int) type=INNODB;
|
||||
CREATE TABLE t1 (a int) ENGINE=INNODB;
|
||||
SELECT * from T1;
|
||||
Can't open file: 'T1.InnoDB'. (errno: 1)
|
||||
ERROR HY000: Can't open file: 'T1.InnoDB'. (errno: 1)
|
||||
drop table t1;
|
||||
|
|
|
@ -191,4 +191,31 @@ execute stmt1 using @arg00;
|
|||
select m from t1;
|
||||
m
|
||||
1
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
create table t1 (id int(10) unsigned NOT NULL default '0',
|
||||
name varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (id), UNIQUE KEY `name` (`name`));
|
||||
insert into t1 values (1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7');
|
||||
prepare stmt1 from 'select name from t1 where id=? or id=?';
|
||||
set @id1=1,@id2=6;
|
||||
execute stmt1 using @id1, @id2;
|
||||
name
|
||||
1
|
||||
6
|
||||
select name from t1 where id=1 or id=6;
|
||||
name
|
||||
1
|
||||
6
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
create table t1 ( a int primary key, b varchar(30)) engine = MYISAM ;
|
||||
prepare stmt1 from ' show table status from test like ''t1%'' ';
|
||||
execute stmt1;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL
|
||||
show table status from test like 't1%' ;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL
|
||||
deallocate prepare stmt1 ;
|
||||
drop table t1;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
disable_query_log;
|
||||
show variables like "lower_case_%";
|
||||
--require r/true.require
|
||||
select @@version_compile_os NOT IN ("NT","WIN2000","Win95/Win98","XP") as "TRUE";
|
||||
select convert(@@version_compile_os using latin1) NOT IN ("NT","WIN2000","Win95/Win98","XP") as "TRUE";
|
||||
enable_query_log;
|
||||
|
||||
--disable_warnings
|
||||
|
@ -31,7 +31,7 @@ flush tables;
|
|||
# storing things in lower case.
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int) type=INNODB;
|
||||
CREATE TABLE t1 (a int) ENGINE=INNODB;
|
||||
--error 1016
|
||||
SELECT * from T1;
|
||||
drop table t1;
|
||||
|
|
|
@ -178,4 +178,31 @@ drop table t1;
|
|||
prepare stmt1 from ' create table t1 (m int) as select ? as m ' ;
|
||||
execute stmt1 using @arg00;
|
||||
select m from t1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# eq() for parameters
|
||||
#
|
||||
create table t1 (id int(10) unsigned NOT NULL default '0',
|
||||
name varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (id), UNIQUE KEY `name` (`name`));
|
||||
insert into t1 values (1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7');
|
||||
prepare stmt1 from 'select name from t1 where id=? or id=?';
|
||||
set @id1=1,@id2=6;
|
||||
execute stmt1 using @id1, @id2;
|
||||
select name from t1 where id=1 or id=6;
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# SHOW TABLE STATUS test
|
||||
#
|
||||
create table t1 ( a int primary key, b varchar(30)) engine = MYISAM ;
|
||||
prepare stmt1 from ' show table status from test like ''t1%'' ';
|
||||
--replace_column 12 # 13 # 14 #
|
||||
execute stmt1;
|
||||
--replace_column 12 # 13 # 14 #
|
||||
show table status from test like 't1%' ;
|
||||
deallocate prepare stmt1 ;
|
||||
drop table t1;
|
||||
|
|
|
@ -525,6 +525,8 @@ public:
|
|||
virtual table_map used_tables() const
|
||||
{ return state != NO_VALUE ? (table_map)0 : PARAM_TABLE_BIT; }
|
||||
void print(String *str) { str->append('?'); }
|
||||
/* parameter never equal to other parameter of other item */
|
||||
bool eq(const Item *item, bool binary_cmp) const { return 0; }
|
||||
};
|
||||
|
||||
class Item_int :public Item_num
|
||||
|
|
|
@ -1246,6 +1246,12 @@ static void server_init(void)
|
|||
{
|
||||
DBUG_PRINT("general",("UNIX Socket is %s",mysqld_unix_port));
|
||||
|
||||
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
|
||||
{
|
||||
sql_print_error("The socket file path is too long (> %d): %s",
|
||||
sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
|
||||
unireg_abort(1);
|
||||
}
|
||||
if ((unix_sock= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
sql_perror("Can't start server : UNIX Socket "); /* purecov: inspected */
|
||||
|
|
|
@ -2938,7 +2938,7 @@ unsent_create_error:
|
|||
goto error;
|
||||
}
|
||||
/* grant is checked in mysqld_show_tables */
|
||||
if (select_lex->options & SELECT_DESCRIBE)
|
||||
if (lex->describe)
|
||||
res= mysqld_extend_show_tables(thd,db,
|
||||
(lex->wild ? lex->wild->ptr() : NullS));
|
||||
else
|
||||
|
|
|
@ -4228,13 +4228,12 @@ show_param:
|
|||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_TABLES;
|
||||
lex->select_lex.db= $2;
|
||||
lex->select_lex.options= 0;
|
||||
}
|
||||
| TABLE_SYM STATUS_SYM opt_db wild
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_TABLES;
|
||||
lex->select_lex.options|= SELECT_DESCRIBE;
|
||||
lex->describe= DESCRIBE_EXTENDED;
|
||||
lex->select_lex.db= $3;
|
||||
}
|
||||
| OPEN_SYM TABLES opt_db wild
|
||||
|
@ -4242,7 +4241,6 @@ show_param:
|
|||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
|
||||
lex->select_lex.db= $3;
|
||||
lex->select_lex.options= 0;
|
||||
}
|
||||
| ENGINE_SYM storage_engines
|
||||
{ Lex->create_info.db_type= $2; }
|
||||
|
|
|
@ -1498,7 +1498,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
|
|||
{
|
||||
sql_print_error("Fatal error: Can't lock time zone table: %s",
|
||||
thd->net.last_error);
|
||||
goto end_with_cleanup;
|
||||
goto end_with_close;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1563,6 +1563,9 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
|
|||
|
||||
end_with_unlock:
|
||||
mysql_unlock_tables(thd, lock);
|
||||
|
||||
end_with_close:
|
||||
close_thread_tables(thd);
|
||||
thd->version--; /* Force close to free memory */
|
||||
|
||||
end_with_setting_default_tz:
|
||||
|
@ -1584,7 +1587,6 @@ end_with_cleanup:
|
|||
if (return_val)
|
||||
my_tz_free();
|
||||
end:
|
||||
close_thread_tables(thd);
|
||||
delete thd;
|
||||
if (org_thd)
|
||||
org_thd->store_globals(); /* purecov: inspected */
|
||||
|
|
Loading…
Reference in a new issue