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
79f4ee96
Commit
79f4ee96
authored
Nov 24, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
parents
0052dc82
a806cba3
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
46 deletions
+55
-46
Build-tools/Do-compile
Build-tools/Do-compile
+9
-2
client/mysqladmin.cc
client/mysqladmin.cc
+1
-1
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+1
-24
mysql-test/r/information_schema_inno.result
mysql-test/r/information_schema_inno.result
+19
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+0
-10
mysql-test/t/information_schema_inno.test
mysql-test/t/information_schema_inno.test
+16
-0
sql/sql_show.cc
sql/sql_show.cc
+5
-6
sql/table.h
sql/table.h
+1
-1
tests/client_test.c
tests/client_test.c
+3
-2
No files found.
Build-tools/Do-compile
View file @
79f4ee96
...
...
@@ -10,7 +10,7 @@ use Sys::Hostname;
$opt_distribution
=
$opt_user
=
$opt_config_env
=
$opt_config_extra_env
=
"";
$opt_dbd_options
=
$opt_perl_options
=
$opt_config_options
=
$opt_make_options
=
$opt_suffix
=
"";
$opt_tmp
=
$opt_version_suffix
=
"";
$opt_bundled_zlib
=
$opt_help
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_no_test
=
$opt_no_perl
=
$opt_with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
$opt_with_cluster
=
$opt_with_debug
=
$opt_no_benchmark
=
$opt_no_mysqltest
=
$opt_without_embedded
=
$opt_readline
=
0
;
$opt_bundled_zlib
=
$opt_help
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_no_test
=
$opt_no_perl
=
$opt_
one_error
=
$opt_
with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
$opt_with_cluster
=
$opt_with_debug
=
$opt_no_benchmark
=
$opt_no_mysqltest
=
$opt_without_embedded
=
$opt_readline
=
0
;
$opt_innodb
=
$opt_bdb
=
$opt_raid
=
$opt_libwrap
=
$opt_clearlogs
=
0
;
GetOptions
(
...
...
@@ -37,6 +37,7 @@ GetOptions(
"
no-test
",
"
no-mysqltest
",
"
no-benchmark
",
"
one-error
",
"
perl-files=s
",
"
perl-options=s
",
"
raid
",
...
...
@@ -310,6 +311,7 @@ if ($opt_stage <= 2)
$command
=
$make
;
$command
.=
"
$opt_make_options
"
if
(
defined
(
$opt_make_options
)
&&
$opt_make_options
ne
"");
safe_system
(
$command
);
print
LOG
"
Do-compile: Build successful
\n
";
}
#
...
...
@@ -373,10 +375,12 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{
my
$flags
=
"";
$flags
.=
"
--with-ndbcluster
"
if
(
$opt_with_cluster
);
$flags
.=
"
--force
"
if
(
!
$opt_one_error
);
log_timestamp
();
system
("
mkdir
$bench_tmpdir
")
if
(
!
-
d
$bench_tmpdir
);
safe_cd
("
${test_dir}
/mysql-test
");
check_system
("
./mysql-test-run
$flags
--tmpdir=
$bench_tmpdir
--master_port=
$mysql_tcp_port
--slave_port=
$slave_port
--ndbcluster_port=
$ndbcluster_port
--manager-port=
$manager_port
--no-manager --sleep=10
",
"
tests were successful
");
# 'mysql-test-run' writes its own final message for log evaluation.
}
#
...
...
@@ -555,7 +559,10 @@ Do not run any tests.
Do not run the benchmark test (written in perl)
--no-mysqltest
Do not run the the mysql-test-run test (Same as 'make test')
Do not run the mysql-test-run test (Same as 'make test')
--one-error
Terminate the mysql-test-run test after the first difference (default: use '--force')
--no-perl
Do not compile or install Perl modules, use the system installed ones
...
...
client/mysqladmin.cc
View file @
79f4ee96
...
...
@@ -608,7 +608,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
{
char
*
pos
,
buff
[
40
];
ulong
sec
;
pos
=
strchr
(
status
,
' '
);
pos
=
(
char
*
)
strchr
(
status
,
' '
);
*
pos
++=
0
;
printf
(
"%s
\t\t\t
"
,
status
);
/* print label */
if
((
status
=
str2int
(
pos
,
10
,
0
,
LONG_MAX
,(
long
*
)
&
sec
)))
...
...
mysql-test/r/information_schema.result
View file @
79f4ee96
...
...
@@ -363,40 +363,17 @@ NULL test PRIMARY NULL test t1 a 1 NULL NULL NULL
NULL test constraint_1 NULL test t1 a 1 NULL NULL NULL
NULL test key_1 NULL test t1 a 1 NULL NULL NULL
NULL test key_2 NULL test t1 a 1 NULL NULL NULL
drop table t1;
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id),
FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE,
FOREIGN KEY (t1_id) REFERENCES t1(id) ON UPDATE CASCADE) ENGINE=INNODB;
select * from information_schema.TABLE_CONSTRAINTS where
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE CONSTRAINT_METHOD
NULL test PRIMARY test t1 PRIMARY KEY NULL
NULL test PRIMARY test t2 PRIMARY KEY NULL
NULL test t2_ibfk_1 test t2 FOREIGN KEY ON DELETE CASCADE
NULL test t2_ibfk_2 test t2 FOREIGN KEY ON UPDATE CASCADE
select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
NULL test PRIMARY NULL test t1 id 1 NULL NULL NULL
NULL test PRIMARY NULL test t2 id 1 NULL NULL NULL
NULL test t2_ibfk_1 NULL test t2 t1_id 1 NULL id
NULL test t2_ibfk_2 NULL test t2 t1_id 1 NULL id
select table_name from information_schema.TABLES where table_schema like "test%";
table_name
t1
t2
select table_name,column_name from information_schema.COLUMNS where table_schema like "test%";
table_name column_name
t1 id
t2 id
t2 t1_id
t1 a
select ROUTINE_NAME from information_schema.ROUTINES;
ROUTINE_NAME
sel2
sub1
delete from mysql.user where user='mysqltest_1';
drop table t2;
drop table t1;
drop procedure sel2;
drop function sub1;
...
...
mysql-test/r/information_schema_inno.result
0 → 100644
View file @
79f4ee96
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id),
FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE,
FOREIGN KEY (t1_id) REFERENCES t1(id) ON UPDATE CASCADE) ENGINE=INNODB;
select * from information_schema.TABLE_CONSTRAINTS where
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE CONSTRAINT_METHOD
NULL test PRIMARY test t1 PRIMARY KEY NULL
NULL test PRIMARY test t2 PRIMARY KEY NULL
NULL test t2_ibfk_1 test t2 FOREIGN KEY ON DELETE CASCADE
NULL test t2_ibfk_2 test t2 FOREIGN KEY ON UPDATE CASCADE
select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
NULL test PRIMARY NULL test t1 id 1 NULL NULL NULL
NULL test PRIMARY NULL test t2 id 1 NULL NULL NULL
NULL test t2_ibfk_1 NULL test t2 t1_id 1 NULL id
NULL test t2_ibfk_2 NULL test t2 t1_id 1 NULL id
drop table t2, t1;
mysql-test/t/information_schema.test
View file @
79f4ee96
...
...
@@ -162,16 +162,7 @@ select * from information_schema.TABLE_CONSTRAINTS where
TABLE_SCHEMA
=
"test"
;
select
*
from
information_schema
.
KEY_COLUMN_USAGE
where
TABLE_SCHEMA
=
"test"
;
drop
table
t1
;
CREATE
TABLE
t1
(
id
INT
NOT
NULL
,
PRIMARY
KEY
(
id
))
ENGINE
=
INNODB
;
CREATE
TABLE
t2
(
id
INT
PRIMARY
KEY
,
t1_id
INT
,
INDEX
par_ind
(
t1_id
),
FOREIGN
KEY
(
t1_id
)
REFERENCES
t1
(
id
)
ON
DELETE
CASCADE
,
FOREIGN
KEY
(
t1_id
)
REFERENCES
t1
(
id
)
ON
UPDATE
CASCADE
)
ENGINE
=
INNODB
;
select
*
from
information_schema
.
TABLE_CONSTRAINTS
where
TABLE_SCHEMA
=
"test"
;
select
*
from
information_schema
.
KEY_COLUMN_USAGE
where
TABLE_SCHEMA
=
"test"
;
connect
(
user1
,
localhost
,
mysqltest_1
,,);
connection
user1
;
...
...
@@ -181,7 +172,6 @@ select ROUTINE_NAME from information_schema.ROUTINES;
disconnect
user1
;
connection
default
;
delete
from
mysql
.
user
where
user
=
'mysqltest_1'
;
drop
table
t2
;
drop
table
t1
;
drop
procedure
sel2
;
drop
function
sub1
;
...
...
mysql-test/t/information_schema_inno.test
0 → 100644
View file @
79f4ee96
--
source
include
/
have_innodb
.
inc
#
# Test for KEY_COLUMN_USAGE & TABLE_CONSTRAINTS tables
#
CREATE
TABLE
t1
(
id
INT
NOT
NULL
,
PRIMARY
KEY
(
id
))
ENGINE
=
INNODB
;
CREATE
TABLE
t2
(
id
INT
PRIMARY
KEY
,
t1_id
INT
,
INDEX
par_ind
(
t1_id
),
FOREIGN
KEY
(
t1_id
)
REFERENCES
t1
(
id
)
ON
DELETE
CASCADE
,
FOREIGN
KEY
(
t1_id
)
REFERENCES
t1
(
id
)
ON
UPDATE
CASCADE
)
ENGINE
=
INNODB
;
select
*
from
information_schema
.
TABLE_CONSTRAINTS
where
TABLE_SCHEMA
=
"test"
;
select
*
from
information_schema
.
KEY_COLUMN_USAGE
where
TABLE_SCHEMA
=
"test"
;
drop
table
t2
,
t1
;
sql/sql_show.cc
View file @
79f4ee96
...
...
@@ -2909,12 +2909,13 @@ ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx)
0 Can't create table
*/
TABLE
*
create_schema_table
(
THD
*
thd
,
ST_SCHEMA_TABLE
*
schema_table
)
TABLE
*
create_schema_table
(
THD
*
thd
,
TABLE_LIST
*
table_list
)
{
int
field_count
=
0
;
Item
*
item
;
TABLE
*
table
;
List
<
Item
>
field_list
;
ST_SCHEMA_TABLE
*
schema_table
=
table_list
->
schema_table
;
ST_FIELD_INFO
*
fields_info
=
schema_table
->
fields_info
;
CHARSET_INFO
*
cs
=
system_charset_info
;
DBUG_ENTER
(
"create_schema_table"
);
...
...
@@ -2959,8 +2960,7 @@ TABLE *create_schema_table(THD *thd, ST_SCHEMA_TABLE *schema_table)
field_list
,
(
ORDER
*
)
0
,
0
,
0
,
(
select_lex
->
options
|
thd
->
options
|
TMP_TABLE_ALL_COLUMNS
),
HA_POS_ERROR
,
(
char
*
)
schema_table
->
table_name
)))
HA_POS_ERROR
,
table_list
->
real_name
)))
DBUG_RETURN
(
0
);
DBUG_RETURN
(
table
);
}
...
...
@@ -3130,8 +3130,7 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
{
TABLE
*
table
;
DBUG_ENTER
(
"mysql_schema_table"
);
if
(
!
(
table
=
table_list
->
schema_table
->
create_table
(
thd
,
table_list
->
schema_table
)))
if
(
!
(
table
=
table_list
->
schema_table
->
create_table
(
thd
,
table_list
)))
{
DBUG_RETURN
(
1
);
}
...
...
@@ -3292,7 +3291,7 @@ ST_FIELD_INFO columns_fields_info[]=
{
"ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"COLUMN_DEFAULT"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Default"
},
{
"IS_NULLABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Null"
},
{
"DATA_TYPE"
,
65535
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"DATA_TYPE"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"CHARACTER_MAXIMUM_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"CHARACTER_OCTET_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"NUMERIC_PRECISION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
},
...
...
sql/table.h
View file @
79f4ee96
...
...
@@ -243,7 +243,7 @@ typedef struct st_schema_table
const
char
*
table_name
;
ST_FIELD_INFO
*
fields_info
;
/* Create information_schema table */
TABLE
*
(
*
create_table
)
(
THD
*
thd
,
struct
st_
schema_table
*
schema_table
);
TABLE
*
(
*
create_table
)
(
THD
*
thd
,
struct
st_
table_list
*
table_list
);
/* Fill table with data */
int
(
*
fill_table
)
(
THD
*
thd
,
struct
st_table_list
*
tables
,
COND
*
cond
);
/* Handle fileds for old SHOW */
...
...
tests/client_test.c
View file @
79f4ee96
...
...
@@ -694,6 +694,7 @@ static void verify_prepare_field(MYSQL_RES *result,
as utf8. Field length is calculated as number of characters * maximum
number of bytes a character can occupy.
*/
if
(
length
)
DIE_UNLESS
(
field
->
length
==
length
*
cs
->
mbmaxlen
);
if
(
def
)
DIE_UNLESS
(
strcmp
(
field
->
def
,
def
)
==
0
);
...
...
@@ -7280,7 +7281,7 @@ static void test_explain_bug()
MYSQL_TYPE_STRING
,
0
,
0
,
""
,
192
,
0
);
verify_prepare_field
(
result
,
1
,
"Type"
,
"COLUMN_TYPE"
,
MYSQL_TYPE_BLOB
,
0
,
0
,
""
,
193203
,
0
);
MYSQL_TYPE_BLOB
,
0
,
0
,
""
,
0
,
0
);
verify_prepare_field
(
result
,
2
,
"Null"
,
"IS_NULLABLE"
,
MYSQL_TYPE_STRING
,
0
,
0
,
""
,
9
,
0
);
...
...
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