Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
295f11ed
Commit
295f11ed
authored
Jun 27, 2004
by
paul@ice.snake.net
Browse files
Options
Browse Files
Download
Plain Diff
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into ice.snake.net:/Volumes/ice2/MySQL/bk/mysql-4.1
parents
1b110e80
cb188a89
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
80 additions
and
15 deletions
+80
-15
client/mysqldump.c
client/mysqldump.c
+4
-1
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+2
-2
mysql-test/r/lowercase_table2.result
mysql-test/r/lowercase_table2.result
+2
-2
mysql-test/r/lowercase_table3.result
mysql-test/r/lowercase_table3.result
+2
-2
mysql-test/r/ps.result
mysql-test/r/ps.result
+27
-0
mysql-test/t/lowercase_table3.test
mysql-test/t/lowercase_table3.test
+2
-2
mysql-test/t/ps.test
mysql-test/t/ps.test
+27
-0
sql/item.h
sql/item.h
+2
-0
sql/mysqld.cc
sql/mysqld.cc
+6
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-3
sql/tztime.cc
sql/tztime.cc
+4
-2
No files found.
client/mysqldump.c
View file @
295f11ed
...
@@ -128,6 +128,9 @@ TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
...
@@ -128,6 +128,9 @@ TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
static
struct
my_option
my_long_options
[]
=
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'
,
{
"all-databases"
,
'A'
,
"Dump all the databases. This will be same as --databases with all databases selected."
,
"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
,
(
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[] =
...
@@ -240,7 +243,7 @@ static struct my_option my_long_options[] =
{
"no-data"
,
'd'
,
"No row information."
,
(
gptr
*
)
&
dFlag
,
(
gptr
*
)
&
dFlag
,
0
,
{
"no-data"
,
'd'
,
"No row information."
,
(
gptr
*
)
&
dFlag
,
(
gptr
*
)
&
dFlag
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"no-set-names"
,
'N'
,
{
"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
},
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"set-charset"
,
OPT_SET_CHARSET
,
{
"set-charset"
,
OPT_SET_CHARSET
,
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset."
,
"Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset."
,
...
...
mysql-test/r/func_group.result
View file @
295f11ed
...
@@ -576,7 +576,7 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -576,7 +576,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
explain
select min(a1) from t1 where a1 != 'KKK';
select min(a1) from t1 where a1 != 'KKK';
id select_type table type possible_keys key key_len ref rows Extra
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
explain
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
select max(a3) from t1 where a2 < 2 and a3 < 'SEA';
id select_type table type possible_keys key key_len ref rows Extra
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
...
@@ -621,7 +621,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain
explain
select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME';
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
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 r
ef k2 k2 4 const
6 Using where; Using index
1 SIMPLE t2 r
ange k2 k2 4 NULL
6 Using where; Using index
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index
drop table t1, t2;
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;
create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
...
...
mysql-test/r/lowercase_table2.result
View file @
295f11ed
...
@@ -32,7 +32,7 @@ T1
...
@@ -32,7 +32,7 @@ T1
ALTER TABLE T1 add b int;
ALTER TABLE T1 add b int;
SHOW TABLES LIKE "T1";
SHOW TABLES LIKE "T1";
Tables_in_test (T1)
Tables_in_test (T1)
t
1
T
1
ALTER TABLE T1 RENAME T2;
ALTER TABLE T1 RENAME T2;
SHOW TABLES LIKE "T2";
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
Tables_in_test (T2)
...
@@ -41,7 +41,7 @@ LOCK TABLE T2 WRITE;
...
@@ -41,7 +41,7 @@ LOCK TABLE T2 WRITE;
ALTER TABLE T2 drop b;
ALTER TABLE T2 drop b;
SHOW TABLES LIKE "T2";
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
Tables_in_test (T2)
t
2
T
2
UNLOCK TABLES;
UNLOCK TABLES;
RENAME TABLE T2 TO T1;
RENAME TABLE T2 TO T1;
SHOW TABLES LIKE "T1";
SHOW TABLES LIKE "T1";
...
...
mysql-test/r/lowercase_table3.result
View file @
295f11ed
...
@@ -4,7 +4,7 @@ SELECT * from T1;
...
@@ -4,7 +4,7 @@ SELECT * from T1;
a
a
drop table t1;
drop table t1;
flush tables;
flush tables;
CREATE TABLE t1 (a int)
type
=INNODB;
CREATE TABLE t1 (a int)
ENGINE
=INNODB;
SELECT * from T1;
SELECT * from T1;
Can't open file: 'T1.InnoDB'. (errno: 1)
ERROR HY000:
Can't open file: 'T1.InnoDB'. (errno: 1)
drop table t1;
drop table t1;
mysql-test/r/ps.result
View file @
295f11ed
...
@@ -191,4 +191,31 @@ execute stmt1 using @arg00;
...
@@ -191,4 +191,31 @@ execute stmt1 using @arg00;
select m from t1;
select m from t1;
m
m
1
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;
drop table t1;
mysql-test/t/lowercase_table3.test
View file @
295f11ed
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
disable_query_log
;
disable_query_log
;
show
variables
like
"lower_case_%"
;
show
variables
like
"lower_case_%"
;
--
require
r
/
true
.
require
--
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
;
enable_query_log
;
--
disable_warnings
--
disable_warnings
...
@@ -31,7 +31,7 @@ flush tables;
...
@@ -31,7 +31,7 @@ flush tables;
# storing things in lower case.
# storing things in lower case.
#
#
CREATE
TABLE
t1
(
a
int
)
type
=
INNODB
;
CREATE
TABLE
t1
(
a
int
)
ENGINE
=
INNODB
;
--
error
1016
--
error
1016
SELECT
*
from
T1
;
SELECT
*
from
T1
;
drop
table
t1
;
drop
table
t1
;
mysql-test/t/ps.test
View file @
295f11ed
...
@@ -178,4 +178,31 @@ drop table t1;
...
@@ -178,4 +178,31 @@ drop table t1;
prepare
stmt1
from
' create table t1 (m int) as select ? as m '
;
prepare
stmt1
from
' create table t1 (m int) as select ? as m '
;
execute
stmt1
using
@
arg00
;
execute
stmt1
using
@
arg00
;
select
m
from
t1
;
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
;
drop
table
t1
;
sql/item.h
View file @
295f11ed
...
@@ -525,6 +525,8 @@ class Item_param :public Item
...
@@ -525,6 +525,8 @@ class Item_param :public Item
virtual
table_map
used_tables
()
const
virtual
table_map
used_tables
()
const
{
return
state
!=
NO_VALUE
?
(
table_map
)
0
:
PARAM_TABLE_BIT
;
}
{
return
state
!=
NO_VALUE
?
(
table_map
)
0
:
PARAM_TABLE_BIT
;
}
void
print
(
String
*
str
)
{
str
->
append
(
'?'
);
}
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
class
Item_int
:
public
Item_num
...
...
sql/mysqld.cc
View file @
295f11ed
...
@@ -1246,6 +1246,12 @@ static void server_init(void)
...
@@ -1246,6 +1246,12 @@ static void server_init(void)
{
{
DBUG_PRINT
(
"general"
,(
"UNIX Socket is %s"
,
mysqld_unix_port
));
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
)
if
((
unix_sock
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
))
<
0
)
{
{
sql_perror
(
"Can't start server : UNIX Socket "
);
/* purecov: inspected */
sql_perror
(
"Can't start server : UNIX Socket "
);
/* purecov: inspected */
...
...
sql/sql_parse.cc
View file @
295f11ed
...
@@ -2938,7 +2938,7 @@ mysql_execute_command(THD *thd)
...
@@ -2938,7 +2938,7 @@ mysql_execute_command(THD *thd)
goto
error
;
goto
error
;
}
}
/* grant is checked in mysqld_show_tables */
/* grant is checked in mysqld_show_tables */
if
(
select_lex
->
options
&
SELECT_DESCRIBE
)
if
(
lex
->
describe
)
res
=
mysqld_extend_show_tables
(
thd
,
db
,
res
=
mysqld_extend_show_tables
(
thd
,
db
,
(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
));
(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
));
else
else
...
...
sql/sql_yacc.yy
View file @
295f11ed
...
@@ -4228,13 +4228,12 @@ show_param:
...
@@ -4228,13 +4228,12 @@ show_param:
LEX *lex= Lex;
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLES;
lex->sql_command= SQLCOM_SHOW_TABLES;
lex->select_lex.db= $2;
lex->select_lex.db= $2;
lex->select_lex.options= 0;
}
}
| TABLE_SYM STATUS_SYM opt_db wild
| TABLE_SYM STATUS_SYM opt_db wild
{
{
LEX *lex= Lex;
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLES;
lex->sql_command= SQLCOM_SHOW_TABLES;
lex->
select_lex.options|= SELECT_DESCRIBE
;
lex->
describe= DESCRIBE_EXTENDED
;
lex->select_lex.db= $3;
lex->select_lex.db= $3;
}
}
| OPEN_SYM TABLES opt_db wild
| OPEN_SYM TABLES opt_db wild
...
@@ -4242,7 +4241,6 @@ show_param:
...
@@ -4242,7 +4241,6 @@ show_param:
LEX *lex= Lex;
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
lex->select_lex.db= $3;
lex->select_lex.db= $3;
lex->select_lex.options= 0;
}
}
| ENGINE_SYM storage_engines
| ENGINE_SYM storage_engines
{ Lex->create_info.db_type= $2; }
{ Lex->create_info.db_type= $2; }
...
...
sql/tztime.cc
View file @
295f11ed
...
@@ -1498,7 +1498,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
...
@@ -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"
,
sql_print_error
(
"Fatal error: Can't lock time zone table: %s"
,
thd
->
net
.
last_error
);
thd
->
net
.
last_error
);
goto
end_with_cl
eanup
;
goto
end_with_cl
ose
;
}
}
...
@@ -1563,6 +1563,9 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
...
@@ -1563,6 +1563,9 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
end_with_unlock:
end_with_unlock:
mysql_unlock_tables
(
thd
,
lock
);
mysql_unlock_tables
(
thd
,
lock
);
end_with_close:
close_thread_tables
(
thd
);
thd
->
version
--
;
/* Force close to free memory */
thd
->
version
--
;
/* Force close to free memory */
end_with_setting_default_tz:
end_with_setting_default_tz:
...
@@ -1584,7 +1587,6 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
...
@@ -1584,7 +1587,6 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
if
(
return_val
)
if
(
return_val
)
my_tz_free
();
my_tz_free
();
end:
end:
close_thread_tables
(
thd
);
delete
thd
;
delete
thd
;
if
(
org_thd
)
if
(
org_thd
)
org_thd
->
store_globals
();
/* purecov: inspected */
org_thd
->
store_globals
();
/* purecov: inspected */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment