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
dc87075f
Commit
dc87075f
authored
Mar 30, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postmerge fixes
parent
c64efa60
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+4
-4
sql/item.cc
sql/item.cc
+22
-16
No files found.
mysql-test/r/metadata.result
View file @
dc87075f
...
...
@@ -65,22 +65,22 @@ insert into t1 values (1,'one');
insert into t1 values (2,'two');
set @arg00=1 ;
select @arg00 FROM t1 where a=1 union distinct select 1 FROM t1 where a=1;
Catalog Database Table Table_alias Column Column_alias
Name
Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg00 @arg00 8 20 1 Y 32768 0 63
@arg00
1
select * from (select @arg00) aaa;
Catalog Database Table Table_alias Column Column_alias
Name
Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def aaa @arg00 @arg00 8 20 1 Y 32768 0 63
@arg00
1
select 1 union select 1;
Catalog Database Table Table_alias Column Column_alias
Name
Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def 1 1 8 20 1 N 32769 0 63
1
1
select * from (select 1 union select 1) aaa;
Catalog Database Table Table_alias Column Column_alias
Name
Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def aaa 1 1 8 20 1 N 32769 0 63
1
1
...
...
sql/item.cc
View file @
dc87075f
...
...
@@ -2908,24 +2908,30 @@ uint32 Item_type_holder::display_length(Item *item)
Field
*
Item_type_holder
::
make_field_by_type
(
TABLE
*
table
)
{
if
(
fld_type
==
MYSQL_TYPE_ENUM
||
fld_type
==
MYSQL_TYPE_SET
)
{
DBUG_ASSERT
(
enum_set_typelib
);
/*
The field functions defines a field to be not null if null_ptr is not 0
*/
uchar
*
null_ptr
=
maybe_null
?
(
uchar
*
)
""
:
0
;
if
(
fld_type
==
MYSQL_TYPE_ENUM
)
switch
(
fld_type
)
{
case
MYSQL_TYPE_ENUM
:
DBUG_ASSERT
(
enum_set_typelib
);
return
new
Field_enum
((
char
*
)
0
,
max_length
,
null_ptr
,
0
,
Field
::
NONE
,
name
,
table
,
get_enum_pack_length
(
enum_set_typelib
->
count
),
enum_set_typelib
,
collation
.
collation
);
else
case
MYSQL_TYPE_SET
:
DBUG_ASSERT
(
enum_set_typelib
);
return
new
Field_set
((
char
*
)
0
,
max_length
,
null_ptr
,
0
,
Field
::
NONE
,
name
,
table
,
get_set_pack_length
(
enum_set_typelib
->
count
),
enum_set_typelib
,
collation
.
collation
);
case
MYSQL_TYPE_VAR_STRING
:
table
->
db_create_options
|=
HA_OPTION_PACK_RECORD
;
return
new
Field_string
(
max_length
,
maybe_null
,
name
,
table
,
collation
.
collation
);
default:
break
;
}
return
tmp_table_field_from_field_type
(
table
);
}
...
...
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