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
5742b2bf
Commit
5742b2bf
authored
Oct 23, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into example.com:/work/bug23037/my51
parents
5a99fea6
9655547b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+14
-0
mysql-test/t/information_schema.test
mysql-test/t/information_schema.test
+39
-0
sql/sql_show.cc
sql/sql_show.cc
+1
-1
No files found.
mysql-test/r/information_schema.result
View file @
5742b2bf
...
@@ -759,6 +759,7 @@ select table_schema,table_name, column_name from
...
@@ -759,6 +759,7 @@ select table_schema,table_name, column_name from
information_schema.columns
information_schema.columns
where data_type = 'longtext';
where data_type = 'longtext';
table_schema table_name column_name
table_schema table_name column_name
information_schema COLUMNS COLUMN_DEFAULT
information_schema COLUMNS COLUMN_TYPE
information_schema COLUMNS COLUMN_TYPE
information_schema EVENTS EVENT_DEFINITION
information_schema EVENTS EVENT_DEFINITION
information_schema EVENTS SQL_MODE
information_schema EVENTS SQL_MODE
...
@@ -1315,6 +1316,19 @@ WHERE table_name=(SELECT MAX(table_name)
...
@@ -1315,6 +1316,19 @@ WHERE table_name=(SELECT MAX(table_name)
FROM information_schema.tables);
FROM information_schema.tables);
table_name
table_name
VIEWS
VIEWS
DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT)
fld1 7cf7a6782be951a1f2464a350da926a5 65532
SELECT MD5(get_value());
MD5(get_value())
7cf7a6782be951a1f2464a350da926a5
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT), COLUMN_DEFAULT=get_value() FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT) COLUMN_DEFAULT=get_value()
fld1 7cf7a6782be951a1f2464a350da926a5 65532 1
DROP TABLE bug23037;
DROP FUNCTION get_value;
End of 5.0 tests.
End of 5.0 tests.
select * from information_schema.engines WHERE ENGINE="MyISAM";
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
...
...
mysql-test/t/information_schema.test
View file @
5742b2bf
...
@@ -934,7 +934,46 @@ SELECT MAX(table_name) FROM information_schema.tables;
...
@@ -934,7 +934,46 @@ SELECT MAX(table_name) FROM information_schema.tables;
SELECT
table_name
from
information_schema
.
tables
SELECT
table_name
from
information_schema
.
tables
WHERE
table_name
=
(
SELECT
MAX
(
table_name
)
WHERE
table_name
=
(
SELECT
MAX
(
table_name
)
FROM
information_schema
.
tables
);
FROM
information_schema
.
tables
);
#
# Bug #23037: Bug in field "Default" of query "SHOW COLUMNS FROM table"
#
# Note, MyISAM/InnoDB can't take more that 65532 chars, because the row
# size is limited to 65535 bytes (BLOBs not counted)
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
bug23037
;
DROP
FUNCTION
IF
EXISTS
get_value
;
--
enable_warnings
--
disable_query_log
DELIMITER
|
;
CREATE
FUNCTION
get_value
()
RETURNS
TEXT
DETERMINISTIC
BEGIN
DECLARE
col1
,
col2
,
col3
,
col4
,
col6
CHAR
(
255
);
DECLARE
default_val
VARCHAR
(
65532
);
DECLARE
done
INT
DEFAULT
0
;
DECLARE
cur1
CURSOR
FOR
SHOW
COLUMNS
FROM
bug23037
;
DECLARE
CONTINUE
HANDLER
FOR
SQLSTATE
'02000'
SET
done
=
1
;
OPEN
cur1
;
FETCH
cur1
INTO
col1
,
col2
,
col3
,
col4
,
default_val
,
col6
;
CLOSE
cur1
;
RETURN
default_val
;
end
|
DELIMITER
;
|
let
$body
=
`SELECT REPEAT('A', 65532)`
;
eval
CREATE
TABLE
bug23037
(
fld1
VARCHAR
(
65532
)
CHARACTER
SET
latin1
DEFAULT
"
$body
"
);
--
enable_query_log
SELECT
COLUMN_NAME
,
MD5
(
COLUMN_DEFAULT
),
LENGTH
(
COLUMN_DEFAULT
)
FROM
INFORMATION_SCHEMA
.
COLUMNS
WHERE
TABLE_NAME
=
'bug23037'
;
SELECT
MD5
(
get_value
());
SELECT
COLUMN_NAME
,
MD5
(
COLUMN_DEFAULT
),
LENGTH
(
COLUMN_DEFAULT
),
COLUMN_DEFAULT
=
get_value
()
FROM
INFORMATION_SCHEMA
.
COLUMNS
WHERE
TABLE_NAME
=
'bug23037'
;
DROP
TABLE
bug23037
;
DROP
FUNCTION
get_value
;
--
echo
End
of
5.0
tests
.
--
echo
End
of
5.0
tests
.
#
#
# Show engines
# Show engines
...
...
sql/sql_show.cc
View file @
5742b2bf
...
@@ -5247,7 +5247,7 @@ ST_FIELD_INFO columns_fields_info[]=
...
@@ -5247,7 +5247,7 @@ ST_FIELD_INFO columns_fields_info[]=
{
"TABLE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"TABLE_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"COLUMN_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Field"
},
{
"COLUMN_NAME"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Field"
},
{
"ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"ORDINAL_POSITION"
,
21
,
MYSQL_TYPE_LONG
,
0
,
0
,
0
},
{
"COLUMN_DEFAULT"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Default"
},
{
"COLUMN_DEFAULT"
,
MAX_FIELD_VARCHARLENGTH
,
MYSQL_TYPE_STRING
,
0
,
1
,
"Default"
},
{
"IS_NULLABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Null"
},
{
"IS_NULLABLE"
,
3
,
MYSQL_TYPE_STRING
,
0
,
0
,
"Null"
},
{
"DATA_TYPE"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"DATA_TYPE"
,
NAME_LEN
,
MYSQL_TYPE_STRING
,
0
,
0
,
0
},
{
"CHARACTER_MAXIMUM_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
0
},
{
"CHARACTER_MAXIMUM_LENGTH"
,
21
,
MYSQL_TYPE_LONG
,
0
,
1
,
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