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
3143daf8
Commit
3143daf8
authored
Jan 10, 2006
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
parents
16004acc
3c808fe9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
29 deletions
+15
-29
sql/sql_handler.cc
sql/sql_handler.cc
+7
-28
sql/sql_select.cc
sql/sql_select.cc
+8
-1
No files found.
sql/sql_handler.cc
View file @
3143daf8
...
@@ -384,27 +384,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -384,27 +384,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
DBUG_PRINT
(
"info-in-hash"
,(
"'%s'.'%s' as '%s' tab %p"
,
DBUG_PRINT
(
"info-in-hash"
,(
"'%s'.'%s' as '%s' tab %p"
,
hash_tables
->
db
,
hash_tables
->
real_name
,
hash_tables
->
db
,
hash_tables
->
real_name
,
hash_tables
->
alias
,
table
));
hash_tables
->
alias
,
table
));
/* Table might have been flushed. */
if
(
table
&&
(
table
->
version
!=
refresh_version
))
{
/*
We must follow the thd->handler_tables chain, as we need the
address of the 'next' pointer referencing this table
for close_thread_table().
*/
for
(
table_ptr
=
&
(
thd
->
handler_tables
);
*
table_ptr
&&
(
*
table_ptr
!=
table
);
table_ptr
=
&
(
*
table_ptr
)
->
next
)
{}
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
if
(
close_thread_table
(
thd
,
table_ptr
))
{
/* Tell threads waiting for refresh that something has happened */
VOID
(
pthread_cond_broadcast
(
&
COND_refresh
));
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
table
=
hash_tables
->
table
=
NULL
;
}
if
(
!
table
)
if
(
!
table
)
{
{
/*
/*
...
@@ -451,6 +430,13 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -451,6 +430,13 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
}
}
tables
->
table
=
table
;
tables
->
table
=
table
;
HANDLER_TABLES_HACK
(
thd
);
lock
=
mysql_lock_tables
(
thd
,
&
tables
->
table
,
1
,
0
);
HANDLER_TABLES_HACK
(
thd
);
if
(
!
lock
)
goto
err0
;
// mysql_lock_tables() printed error message already
if
(
cond
&&
((
!
cond
->
fixed
&&
if
(
cond
&&
((
!
cond
->
fixed
&&
cond
->
fix_fields
(
thd
,
tables
,
&
cond
))
||
cond
->
check_cols
(
1
)))
cond
->
fix_fields
(
thd
,
tables
,
&
cond
))
||
cond
->
check_cols
(
1
)))
goto
err0
;
goto
err0
;
...
@@ -471,13 +457,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -471,13 +457,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
select_limit
+=
offset_limit
;
select_limit
+=
offset_limit
;
protocol
->
send_fields
(
&
list
,
1
);
protocol
->
send_fields
(
&
list
,
1
);
HANDLER_TABLES_HACK
(
thd
);
lock
=
mysql_lock_tables
(
thd
,
&
tables
->
table
,
1
,
0
);
HANDLER_TABLES_HACK
(
thd
);
if
(
!
lock
)
goto
err0
;
// mysql_lock_tables() printed error message already
/*
/*
In ::external_lock InnoDB resets the fields which tell it that
In ::external_lock InnoDB resets the fields which tell it that
the handle is used in the HANDLER interface. Tell it again that
the handle is used in the HANDLER interface. Tell it again that
...
...
sql/sql_select.cc
View file @
3143daf8
...
@@ -5292,7 +5292,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -5292,7 +5292,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
*
(
reg_field
++
)
=
new_field
;
*
(
reg_field
++
)
=
new_field
;
}
}
if
(
!--
hidden_field_count
)
if
(
!--
hidden_field_count
)
{
hidden_null_count
=
null_count
;
hidden_null_count
=
null_count
;
/*
We need to update hidden_field_count as we may have stored group
functions with constant arguments
*/
param
->
hidden_field_count
=
(
uint
)
(
reg_field
-
table
->
field
);
}
}
}
DBUG_ASSERT
(
field_count
>=
(
uint
)
(
reg_field
-
table
->
field
));
DBUG_ASSERT
(
field_count
>=
(
uint
)
(
reg_field
-
table
->
field
));
field_count
=
(
uint
)
(
reg_field
-
table
->
field
);
field_count
=
(
uint
)
(
reg_field
-
table
->
field
);
...
@@ -5488,7 +5495,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -5488,7 +5495,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
}
}
}
}
if
(
distinct
)
if
(
distinct
&&
field_count
!=
param
->
hidden_field_count
)
{
{
/*
/*
Create an unique key or an unique constraint over all columns
Create an unique key or an unique constraint over all columns
...
...
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