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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
243e76a1
Commit
243e76a1
authored
May 04, 2005
by
tulin@dl145b.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
parents
01082e26
f972fd2e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
117 additions
and
13 deletions
+117
-13
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+2
-0
cmd-line-utils/libedit/Makefile.am
cmd-line-utils/libedit/Makefile.am
+1
-1
sql/item.cc
sql/item.cc
+67
-1
sql/item.h
sql/item.h
+6
-0
sql/item_subselect.h
sql/item_subselect.h
+3
-0
sql/opt_range.cc
sql/opt_range.cc
+19
-6
sql/opt_range.h
sql/opt_range.h
+4
-2
sql/sql_base.cc
sql/sql_base.cc
+11
-0
sql/sql_select.cc
sql/sql_select.cc
+2
-1
storage/ndb/src/common/portlib/gcc.cpp
storage/ndb/src/common/portlib/gcc.cpp
+1
-1
storage/ndb/src/common/util/new.cpp
storage/ndb/src/common/util/new.cpp
+1
-1
No files found.
BitKeeper/etc/logging_ok
View file @
243e76a1
...
...
@@ -32,6 +32,7 @@ bar@mysql.com
bar@noter.intranet.mysql.r18.ru
bell@51.0.168.192.in-addr.arpa
bell@52.0.168.192.in-addr.arpa
bell@book.sanja.is.com.ua
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
...
...
@@ -268,6 +269,7 @@ tonu@x153.internalnet
tonu@x3.internalnet
tsmith@build.mysql.com
tulin@build.mysql.com
tulin@dl145b.mysql.com
tulin@mysql.com
ulli@morbus.(none)
venu@hundin.mysql.fi
...
...
cmd-line-utils/libedit/Makefile.am
View file @
243e76a1
...
...
@@ -22,7 +22,7 @@ libedit_a_DEPENDENCIES = @LIBEDIT_LOBJECTS@
pkginclude_HEADERS
=
readline/readline.h
noinst_HEADERS
=
chared.h el.h histedit.h key.h parse.h refresh.h sig.h
\
noinst_HEADERS
=
chared.h el.h
el_term.h
histedit.h key.h parse.h refresh.h sig.h
\
sys.h tokenizer.h config.h hist.h map.h prompt.h read.h
\
search.h tty.h libedit_term.h
...
...
sql/item.cc
View file @
243e76a1
...
...
@@ -454,6 +454,7 @@ void Item_ident::cleanup()
db_name
=
orig_db_name
;
table_name
=
orig_table_name
;
field_name
=
orig_field_name
;
depended_from
=
0
;
DBUG_VOID_RETURN
;
}
...
...
@@ -2334,7 +2335,7 @@ bool Item_ref_null_helper::get_date(TIME *ltime, uint fuzzydate)
*/
static
void
mark_as_dependent
(
THD
*
thd
,
SELECT_LEX
*
last
,
SELECT_LEX
*
current
,
Item_ident
*
resolved_item
,
Item_ident
*
resolved_item
,
Item_ident
*
mark_item
)
{
const
char
*
db_name
=
(
resolved_item
->
db_name
?
...
...
@@ -2359,6 +2360,71 @@ static void mark_as_dependent(THD *thd, SELECT_LEX *last, SELECT_LEX *current,
}
/*
Mark range of selects and resolved identifier (field/reference) item as
dependent
SYNOPSIS
mark_select_range_as_dependent()
thd - thread handler
last_select - select where resolved_item was resolved
current_sel - current select (select where resolved_item was placed)
found_field - field which was found during resolving
found_item - Item which was found during resolving (if resolved
identifier belongs to VIEW)
resolved_item - Identifier which was resolved
NOTE:
We have to mark all items between current_sel (including) and
last_select (excluding) as dependend (select before last_select should
be marked with actual table mask used by resolved item, all other with
OUTER_REF_TABLE_BIT) and also write dependence information to Item of
resolved identifier.
*/
void
mark_select_range_as_dependent
(
THD
*
thd
,
SELECT_LEX
*
last_select
,
SELECT_LEX
*
current_sel
,
Field
*
found_field
,
Item
*
found_item
,
Item_ident
*
resolved_item
)
{
/*
Go from current SELECT to SELECT where field was resolved (it
have to be reachable from current SELECT, because it was already
done once when we resolved this field and cached result of
resolving)
*/
SELECT_LEX
*
previous_select
=
current_sel
;
for
(;
previous_select
->
outer_select
()
!=
last_select
;
previous_select
=
previous_select
->
outer_select
())
{
Item_subselect
*
prev_subselect_item
=
previous_select
->
master_unit
()
->
item
;
prev_subselect_item
->
used_tables_cache
|=
OUTER_REF_TABLE_BIT
;
prev_subselect_item
->
const_item_cache
=
0
;
}
{
Item_subselect
*
prev_subselect_item
=
previous_select
->
master_unit
()
->
item
;
Item_ident
*
dependent
=
resolved_item
;
if
(
found_field
==
view_ref_found
)
{
Item
::
Type
type
=
found_item
->
type
();
prev_subselect_item
->
used_tables_cache
|=
found_item
->
used_tables
();
dependent
=
((
type
==
Item
::
REF_ITEM
||
type
==
Item
::
FIELD_ITEM
)
?
(
Item_ident
*
)
found_item
:
0
);
}
else
prev_subselect_item
->
used_tables_cache
|=
found_field
->
table
->
map
;
prev_subselect_item
->
const_item_cache
=
0
;
mark_as_dependent
(
thd
,
last_select
,
current_sel
,
resolved_item
,
dependent
);
}
}
/*
...
...
sql/item.h
View file @
243e76a1
...
...
@@ -1800,6 +1800,12 @@ class Item_type_holder: public Item
static
enum_field_types
get_real_type
(
Item
*
);
};
class
st_select_lex
;
void
mark_select_range_as_dependent
(
THD
*
thd
,
st_select_lex
*
last_select
,
st_select_lex
*
current_sel
,
Field
*
found_field
,
Item
*
found_item
,
Item_ident
*
resolved_item
);
extern
Item_buff
*
new_Item_buff
(
Item
*
item
);
extern
Item_result
item_cmp_type
(
Item_result
a
,
Item_result
b
);
...
...
sql/item_subselect.h
View file @
243e76a1
...
...
@@ -122,6 +122,9 @@ class Item_subselect :public Item_result_field
friend
bool
Item_field
::
fix_fields
(
THD
*
,
TABLE_LIST
*
,
Item
**
);
friend
bool
Item_ref
::
fix_fields
(
THD
*
,
TABLE_LIST
*
,
Item
**
);
friend
bool
Item_param
::
fix_fields
(
THD
*
,
TABLE_LIST
*
,
Item
**
);
friend
void
mark_select_range_as_dependent
(
THD
*
,
st_select_lex
*
,
st_select_lex
*
,
Field
*
,
Item
*
,
Item_ident
*
);
};
/* single value subselect */
...
...
sql/opt_range.cc
View file @
243e76a1
...
...
@@ -5513,14 +5513,26 @@ bool QUICK_ROR_UNION_SELECT::check_if_keys_used(List<Item> *fields)
}
/****************************************************************************
Create a QUICK RANGE based on a key
This allocates things in a new memory root, as this may be called many times
during a query.
****************************************************************************/
/*
Create quick select from ref/ref_or_null scan.
SYNOPSIS
get_quick_select_for_ref()
thd Thread handle
table Table to access
ref ref[_or_null] scan parameters
records Estimate of number of records (needed only to construct
quick select)
NOTES
This allocates things in a new memory root, as this may be called many
times during a query.
RETURN
Quick select that retrieves the same rows as passed ref scan
NULL on error.
*/
QUICK_RANGE_SELECT
*
get_quick_select_for_ref
(
THD
*
thd
,
TABLE
*
table
,
TABLE_REF
*
ref
)
TABLE_REF
*
ref
,
ha_rows
records
)
{
MEM_ROOT
*
old_root
=
thd
->
mem_root
;
/* The following call may change thd->mem_root */
...
...
@@ -5537,6 +5549,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
delete
quick
;
goto
err
;
}
quick
->
records
=
records
;
if
(
cp_buffer_from_ref
(
thd
,
ref
)
&&
thd
->
is_fatal_error
||
!
(
range
=
new
QUICK_RANGE
()))
...
...
sql/opt_range.h
View file @
243e76a1
...
...
@@ -281,7 +281,8 @@ class QUICK_RANGE_SELECT : public QUICK_SELECT_I
friend
class
TRP_ROR_INTERSECT
;
friend
QUICK_RANGE_SELECT
*
get_quick_select_for_ref
(
THD
*
thd
,
TABLE
*
table
,
struct
st_table_ref
*
ref
);
struct
st_table_ref
*
ref
,
ha_rows
records
);
friend
bool
get_quick_keys
(
struct
st_qsel_param
*
param
,
QUICK_RANGE_SELECT
*
quick
,
KEY_PART
*
key
,
SEL_ARG
*
key_tree
,
...
...
@@ -709,5 +710,6 @@ class FT_SELECT: public QUICK_RANGE_SELECT {
};
QUICK_RANGE_SELECT
*
get_quick_select_for_ref
(
THD
*
thd
,
TABLE
*
table
,
struct
st_table_ref
*
ref
);
struct
st_table_ref
*
ref
,
ha_rows
records
);
#endif
sql/sql_base.cc
View file @
243e76a1
...
...
@@ -2689,6 +2689,17 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
{
if
(
found
==
WRONG_GRANT
)
return
(
Field
*
)
0
;
{
SELECT_LEX
*
current_sel
=
thd
->
lex
->
current_select
;
SELECT_LEX
*
last_select
=
item
->
cached_table
->
select_lex
;
/*
If the field was an outer referencee, mark all selects using this
sub query as dependent of the outer query
*/
if
(
current_sel
!=
last_select
)
mark_select_range_as_dependent
(
thd
,
last_select
,
current_sel
,
found
,
*
ref
,
item
);
}
return
found
;
}
}
...
...
sql/sql_select.cc
View file @
243e76a1
...
...
@@ -11002,7 +11002,8 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
*/
if
(
!
(
select
->
quick
=
(
tab
->
type
==
JT_FT
?
new
FT_SELECT
(
thd
,
table
,
tab
->
ref
.
key
)
:
get_quick_select_for_ref
(
thd
,
table
,
&
tab
->
ref
))))
get_quick_select_for_ref
(
thd
,
table
,
&
tab
->
ref
,
tab
->
found_records
))))
goto
err
;
}
}
...
...
storage/ndb/src/common/portlib/gcc.cpp
View file @
243e76a1
...
...
@@ -2,6 +2,6 @@
/**
* GCC linking problem...
*/
#if
def DEFINE_CXA_PURE_VIRTUAL
#if
0
extern "C" { int __cxa_pure_virtual() { return 0;} }
#endif
storage/ndb/src/common/util/new.cpp
View file @
243e76a1
...
...
@@ -6,7 +6,7 @@ extern "C" {
void
(
*
ndb_new_handler
)()
=
0
;
}
#if
def USE_MYSYS_NEW
#if
0
void *operator new (size_t sz)
{
...
...
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