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
d845108f
Commit
d845108f
authored
Aug 21, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into gleb.loc:/home/uchum/work/bk/5.0-opt
parents
42aa480b
792145ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
sql/item.cc
sql/item.cc
+2
-0
sql/sql_select.cc
sql/sql_select.cc
+8
-11
sql/sql_view.cc
sql/sql_view.cc
+6
-0
No files found.
sql/item.cc
View file @
d845108f
...
@@ -1765,6 +1765,8 @@ void Item_field::set_field(Field *field_par)
...
@@ -1765,6 +1765,8 @@ void Item_field::set_field(Field *field_par)
unsigned_flag
=
test
(
field_par
->
flags
&
UNSIGNED_FLAG
);
unsigned_flag
=
test
(
field_par
->
flags
&
UNSIGNED_FLAG
);
collation
.
set
(
field_par
->
charset
(),
field_par
->
derivation
());
collation
.
set
(
field_par
->
charset
(),
field_par
->
derivation
());
fixed
=
1
;
fixed
=
1
;
if
(
field
->
table
->
s
->
tmp_table
==
SYSTEM_TMP_TABLE
)
any_privileges
=
0
;
}
}
...
...
sql/sql_select.cc
View file @
d845108f
...
@@ -9155,7 +9155,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9155,7 +9155,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
bool
using_unique_constraint
=
0
;
bool
using_unique_constraint
=
0
;
bool
use_packed_rows
=
0
;
bool
use_packed_rows
=
0
;
bool
not_all_columns
=
!
(
select_options
&
TMP_TABLE_ALL_COLUMNS
);
bool
not_all_columns
=
!
(
select_options
&
TMP_TABLE_ALL_COLUMNS
);
char
*
tmpname
,
*
tmppath
,
path
[
FN_REFLEN
],
table_name
[
NAME_LEN
+
1
];
char
*
tmpname
,
path
[
FN_REFLEN
];
byte
*
pos
,
*
group_buff
;
byte
*
pos
,
*
group_buff
;
uchar
*
null_flags
;
uchar
*
null_flags
;
Field
**
reg_field
,
**
from_field
,
**
default_field
;
Field
**
reg_field
,
**
from_field
,
**
default_field
;
...
@@ -9178,12 +9178,12 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9178,12 +9178,12 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
temp_pool_slot
=
bitmap_set_next
(
&
temp_pool
);
temp_pool_slot
=
bitmap_set_next
(
&
temp_pool
);
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
// we got a slot
if
(
temp_pool_slot
!=
MY_BIT_NONE
)
// we got a slot
sprintf
(
table_name
,
"%s_%lx_%i"
,
tmp_file_prefix
,
sprintf
(
path
,
"%s_%lx_%i"
,
tmp_file_prefix
,
current_pid
,
temp_pool_slot
);
current_pid
,
temp_pool_slot
);
else
else
{
{
/* if we run out of slots or we are not using tempool */
/* if we run out of slots or we are not using tempool */
sprintf
(
table_name
,
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
sprintf
(
path
,
"%s%lx_%lx_%x"
,
tmp_file_prefix
,
current_pid
,
thd
->
thread_id
,
thd
->
tmp_table
++
);
thd
->
thread_id
,
thd
->
tmp_table
++
);
}
}
...
@@ -9191,8 +9191,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9191,8 +9191,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
No need to change table name to lower case as we are only creating
No need to change table name to lower case as we are only creating
MyISAM or HEAP tables here
MyISAM or HEAP tables here
*/
*/
fn_format
(
path
,
table_name
,
mysql_tmpdir
,
""
,
fn_format
(
path
,
path
,
mysql_tmpdir
,
""
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
if
(
group
)
if
(
group
)
{
{
...
@@ -9237,8 +9237,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9237,8 +9237,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
sizeof
(
*
key_part_info
)
*
(
param
->
group_parts
+
1
),
sizeof
(
*
key_part_info
)
*
(
param
->
group_parts
+
1
),
&
param
->
start_recinfo
,
&
param
->
start_recinfo
,
sizeof
(
*
param
->
recinfo
)
*
(
field_count
*
2
+
4
),
sizeof
(
*
param
->
recinfo
)
*
(
field_count
*
2
+
4
),
&
tmppath
,
(
uint
)
strlen
(
path
)
+
1
,
&
tmpname
,
(
uint
)
strlen
(
path
)
+
1
,
&
tmpname
,
(
uint
)
strlen
(
table_name
)
+
1
,
&
group_buff
,
group
&&
!
using_unique_constraint
?
&
group_buff
,
group
&&
!
using_unique_constraint
?
param
->
group_length
:
0
,
param
->
group_length
:
0
,
NullS
))
NullS
))
...
@@ -9256,8 +9255,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9256,8 +9255,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
DBUG_RETURN
(
NULL
);
/* purecov: inspected */
}
}
param
->
items_to_copy
=
copy_func
;
param
->
items_to_copy
=
copy_func
;
strmov
(
tmppath
,
path
);
strmov
(
tmpname
,
path
);
strmov
(
tmpname
,
table_name
);
/* make table according to fields */
/* make table according to fields */
bzero
((
char
*
)
table
,
sizeof
(
*
table
));
bzero
((
char
*
)
table
,
sizeof
(
*
table
));
...
@@ -9283,8 +9281,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -9283,8 +9281,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
table
->
s
=
&
table
->
share_not_to_be_used
;
table
->
s
=
&
table
->
share_not_to_be_used
;
table
->
s
->
blob_field
=
blob_field
;
table
->
s
->
blob_field
=
blob_field
;
table
->
s
->
table_name
=
tmpname
;
table
->
s
->
table_name
=
table
->
s
->
path
=
tmpname
;
table
->
s
->
path
=
tmppath
;
table
->
s
->
db
=
""
;
table
->
s
->
db
=
""
;
table
->
s
->
blob_ptr_size
=
mi_portable_sizeof_char_ptr
;
table
->
s
->
blob_ptr_size
=
mi_portable_sizeof_char_ptr
;
table
->
s
->
tmp_table
=
NON_TRANSACTIONAL_TMP_TABLE
;
table
->
s
->
tmp_table
=
NON_TRANSACTIONAL_TMP_TABLE
;
...
...
sql/sql_view.cc
View file @
d845108f
...
@@ -397,9 +397,15 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
...
@@ -397,9 +397,15 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
{
{
Item_field
*
field
;
Item_field
*
field
;
if
((
field
=
item
->
filed_for_view_update
()))
if
((
field
=
item
->
filed_for_view_update
()))
{
/*
any_privileges may be reset later by the Item_field::set_field
method in case of a system temporary table.
*/
field
->
any_privileges
=
1
;
field
->
any_privileges
=
1
;
}
}
}
}
}
#endif
#endif
if
(
open_and_lock_tables
(
thd
,
tables
))
if
(
open_and_lock_tables
(
thd
,
tables
))
...
...
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