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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8f605428
Commit
8f605428
authored
Jul 18, 2005
by
reggie@linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into linux.site:/home/reggie/bk/bug7142
parents
8b3d3916
8a68788c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
26 deletions
+62
-26
mysql-test/r/ps_1general.result
mysql-test/r/ps_1general.result
+6
-6
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+3
-3
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+3
-3
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+3
-3
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+6
-6
sql/item.cc
sql/item.cc
+8
-1
sql/sql_show.cc
sql/sql_show.cc
+30
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+3
-3
No files found.
mysql-test/r/ps_1general.result
View file @
8f605428
...
@@ -470,12 +470,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -470,12 +470,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 14 N 1 31 8
def Extra 25
2
255 14 N 1 31 8
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 t1 ALL NULL NULL NULL NULL 4 Using filesort
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
SET @arg00=1 ;
SET @arg00=1 ;
...
@@ -486,12 +486,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -486,12 +486,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 5 Y 0 31 8
def type 253 10 5 Y 0 31 8
def possible_keys 25
3
4096 7 Y 0 31 8
def possible_keys 25
2
4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key_len 8 3 1 Y 32928 0 63
def key_len 8 3 1 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 27 N 1 31 8
def Extra 25
2
255 27 N 1 31 8
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 t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
drop table if exists t2;
drop table if exists t2;
...
...
mysql-test/r/ps_2myisam.result
View file @
8f605428
...
@@ -1153,12 +1153,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -1153,12 +1153,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 0 N 1 31 8
def Extra 25
2
255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
drop table if exists t2 ;
drop table if exists t2 ;
...
...
mysql-test/r/ps_3innodb.result
View file @
8f605428
...
@@ -1153,12 +1153,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -1153,12 +1153,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 0 N 1 31 8
def Extra 25
2
255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
test_sequence
...
...
mysql-test/r/ps_4heap.result
View file @
8f605428
...
@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -1154,12 +1154,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 0 N 1 31 8
def Extra 25
2
255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
test_sequence
...
...
mysql-test/r/ps_5merge.result
View file @
8f605428
...
@@ -1196,12 +1196,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -1196,12 +1196,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 0 N 1 31 8
def Extra 25
2
255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
test_sequence
...
@@ -4210,12 +4210,12 @@ def id 8 3 1 N 32929 0 63
...
@@ -4210,12 +4210,12 @@ def id 8 3 1 N 32929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 25
3
4096 0 Y 0 31 8
def possible_keys 25
2
4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32928 0 63
def key_len 8 3 0 Y 32928 0 63
def ref 25
3
1024 0 Y 0 31 8
def ref 25
2
1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 25
3
255 0 N 1 31 8
def Extra 25
2
255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
test_sequence
...
...
sql/item.cc
View file @
8f605428
...
@@ -1772,7 +1772,14 @@ void Item::make_field(Send_field *tmp_field)
...
@@ -1772,7 +1772,14 @@ void Item::make_field(Send_field *tmp_field)
void
Item_empty_string
::
make_field
(
Send_field
*
tmp_field
)
void
Item_empty_string
::
make_field
(
Send_field
*
tmp_field
)
{
{
init_make_field
(
tmp_field
,
FIELD_TYPE_VAR_STRING
);
enum_field_types
type
=
FIELD_TYPE_VAR_STRING
;
if
(
max_length
>=
16777216
)
type
=
FIELD_TYPE_LONG_BLOB
;
else
if
(
max_length
>=
65536
)
type
=
FIELD_TYPE_MEDIUM_BLOB
;
else
if
(
max_length
>=
256
)
type
=
FIELD_TYPE_BLOB
;
init_make_field
(
tmp_field
,
type
);
}
}
...
...
sql/sql_show.cc
View file @
8f605428
...
@@ -638,6 +638,30 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
...
@@ -638,6 +638,30 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
/*
returns the length of the longest type on the given table.
This is used so that show fields will return the data using the proper
lengths instead of forcing columns such as type to always return with a
given length.
*/
uint
get_longest_type_in_table
(
TABLE
*
table
,
const
char
*
wild
)
{
Field
**
ptr
,
*
field
;
char
tmp
[
MAX_FIELD_WIDTH
];
uint
max_len
=
0
;
for
(
ptr
=
table
->
field
;
(
field
=
*
ptr
);
ptr
++
)
{
if
(
!
wild
||
!
wild
[
0
]
||
!
wild_case_compare
(
system_charset_info
,
field
->
field_name
,
wild
))
{
String
type
(
tmp
,
sizeof
(
tmp
),
system_charset_info
);
field
->
sql_type
(
type
);
max_len
=
max
(
max_len
,
type
.
length
());
}
}
return
max_len
;
}
/***************************************************************************
/***************************************************************************
** List all columns in a table_list->real_name
** List all columns in a table_list->real_name
...
@@ -667,9 +691,14 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
...
@@ -667,9 +691,14 @@ mysqld_show_fields(THD *thd, TABLE_LIST *table_list,const char *wild,
#ifndef NO_EMBEDDED_ACCESS_CHECKS
#ifndef NO_EMBEDDED_ACCESS_CHECKS
(
void
)
get_table_grant
(
thd
,
table_list
);
(
void
)
get_table_grant
(
thd
,
table_list
);
#endif
#endif
/* we scan for the longest since long enum types can exceed 40 */
uint
max_len
=
get_longest_type_in_table
(
table
,
wild
);
List
<
Item
>
field_list
;
List
<
Item
>
field_list
;
field_list
.
push_back
(
new
Item_empty_string
(
"Field"
,
NAME_LEN
));
field_list
.
push_back
(
new
Item_empty_string
(
"Field"
,
NAME_LEN
));
field_list
.
push_back
(
new
Item_empty_string
(
"Type"
,
40
));
field_list
.
push_back
(
new
Item_empty_string
(
"Type"
,
max_len
>
40
?
max_len
:
40
));
if
(
verbose
)
if
(
verbose
)
field_list
.
push_back
(
new
Item_empty_string
(
"Collation"
,
40
));
field_list
.
push_back
(
new
Item_empty_string
(
"Collation"
,
40
));
field_list
.
push_back
(
new
Item_empty_string
(
"Null"
,
1
));
field_list
.
push_back
(
new
Item_empty_string
(
"Null"
,
1
));
...
...
tests/mysql_client_test.c
View file @
8f605428
...
@@ -7181,7 +7181,7 @@ static void test_explain_bug()
...
@@ -7181,7 +7181,7 @@ static void test_explain_bug()
verify_prepare_field
(
result
,
3
,
"type"
,
""
,
MYSQL_TYPE_VAR_STRING
,
verify_prepare_field
(
result
,
3
,
"type"
,
""
,
MYSQL_TYPE_VAR_STRING
,
""
,
""
,
""
,
10
,
0
);
""
,
""
,
""
,
10
,
0
);
verify_prepare_field
(
result
,
4
,
"possible_keys"
,
""
,
MYSQL_TYPE_
VAR_STRING
,
verify_prepare_field
(
result
,
4
,
"possible_keys"
,
""
,
MYSQL_TYPE_
BLOB
,
""
,
""
,
""
,
NAME_LEN
*
64
,
0
);
""
,
""
,
""
,
NAME_LEN
*
64
,
0
);
verify_prepare_field
(
result
,
5
,
"key"
,
""
,
MYSQL_TYPE_VAR_STRING
,
verify_prepare_field
(
result
,
5
,
"key"
,
""
,
MYSQL_TYPE_VAR_STRING
,
...
@@ -7194,13 +7194,13 @@ static void test_explain_bug()
...
@@ -7194,13 +7194,13 @@ static void test_explain_bug()
(
mysql_get_server_version
(
mysql
)
<=
50000
?
3
:
4096
),
(
mysql_get_server_version
(
mysql
)
<=
50000
?
3
:
4096
),
0
);
0
);
verify_prepare_field
(
result
,
7
,
"ref"
,
""
,
MYSQL_TYPE_
VAR_STRING
,
verify_prepare_field
(
result
,
7
,
"ref"
,
""
,
MYSQL_TYPE_
BLOB
,
""
,
""
,
""
,
NAME_LEN
*
16
,
0
);
""
,
""
,
""
,
NAME_LEN
*
16
,
0
);
verify_prepare_field
(
result
,
8
,
"rows"
,
""
,
MYSQL_TYPE_LONGLONG
,
verify_prepare_field
(
result
,
8
,
"rows"
,
""
,
MYSQL_TYPE_LONGLONG
,
""
,
""
,
""
,
10
,
0
);
""
,
""
,
""
,
10
,
0
);
verify_prepare_field
(
result
,
9
,
"Extra"
,
""
,
MYSQL_TYPE_
VAR_STRING
,
verify_prepare_field
(
result
,
9
,
"Extra"
,
""
,
MYSQL_TYPE_
BLOB
,
""
,
""
,
""
,
255
,
0
);
""
,
""
,
""
,
255
,
0
);
mysql_free_result
(
result
);
mysql_free_result
(
result
);
...
...
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