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
ed47a1da
Commit
ed47a1da
authored
Feb 21, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@work.mysql.com:/home/bk/mysql
into sinisa.nasamreza.org:/mnt/work/mysql
parents
614bc5a1
5b15b39c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
14 deletions
+21
-14
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+10
-8
sql/sql_analyse.cc
sql/sql_analyse.cc
+4
-0
sql/sql_analyse.h
sql/sql_analyse.h
+6
-5
sql/sql_class.cc
sql/sql_class.cc
+1
-1
No files found.
sql/item_cmpfunc.h
View file @
ed47a1da
...
...
@@ -449,17 +449,19 @@ class Item_func_isnull :public Item_bool_func
void
update_used_tables
()
{
if
(
!
args
[
0
]
->
maybe_null
)
used_tables_cache
=
0
;
/* is always false */
else
{
args
[
0
]
->
update_used_tables
();
used_tables_cache
=
args
[
0
]
->
used_tables
()
;
used_tables_cache
=
0
;
/* is always false */
cached_value
=
(
longlong
)
0
;
}
if
(
!
used_tables_cache
)
else
{
/* Remember if the value is always NULL or never NULL */
args
[
0
]
->
val
();
cached_value
=
args
[
0
]
->
null_value
?
(
longlong
)
1
:
(
longlong
)
0
;
args
[
0
]
->
update_used_tables
();
if
(
!
(
used_tables_cache
=
args
[
0
]
->
used_tables
()))
{
/* Remember if the value is always NULL or never NULL */
args
[
0
]
->
val
();
cached_value
=
args
[
0
]
->
null_value
?
(
longlong
)
1
:
(
longlong
)
0
;
}
}
}
optimize_type
select_optimize
()
const
{
return
OPTIMIZE_NULL
;
}
...
...
sql/sql_analyse.cc
View file @
ed47a1da
...
...
@@ -58,6 +58,7 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
if
((
*
param
->
item
)
->
type
()
!=
Item
::
INT_ITEM
||
(
*
param
->
item
)
->
val
()
<
0
)
{
delete
pc
;
net_printf
(
&
thd
->
net
,
ER_WRONG_PARAMETERS_TO_PROCEDURE
,
proc_name
);
return
0
;
}
...
...
@@ -65,6 +66,7 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
param
=
param
->
next
;
if
(
param
->
next
)
// no third parameter possible
{
delete
pc
;
net_printf
(
&
thd
->
net
,
ER_WRONG_PARAMCOUNT_TO_PROCEDURE
,
proc_name
);
return
0
;
}
...
...
@@ -72,6 +74,7 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
if
((
*
param
->
item
)
->
type
()
!=
Item
::
INT_ITEM
||
(
*
param
->
item
)
->
val
()
<
0
)
{
delete
pc
;
net_printf
(
&
thd
->
net
,
ER_WRONG_PARAMETERS_TO_PROCEDURE
,
proc_name
);
return
0
;
}
...
...
@@ -80,6 +83,7 @@ proc_analyse_init(THD *thd, ORDER *param, select_result *result,
else
if
((
*
param
->
item
)
->
type
()
!=
Item
::
INT_ITEM
||
(
*
param
->
item
)
->
val
()
<
0
)
{
delete
pc
;
net_printf
(
&
thd
->
net
,
ER_WRONG_PARAMETERS_TO_PROCEDURE
,
proc_name
);
return
0
;
}
...
...
sql/sql_analyse.h
View file @
ed47a1da
...
...
@@ -288,13 +288,14 @@ class analyse: public Procedure
public:
uint
max_tree_elements
,
max_treemem
;
analyse
(
select_result
*
res
)
:
Procedure
(
res
,
PROC_NO_SORT
),
rows
(
0
),
output_str_length
(
0
)
{}
analyse
(
select_result
*
res
)
:
Procedure
(
res
,
PROC_NO_SORT
),
f_info
(
0
),
rows
(
0
),
output_str_length
(
0
)
{}
~
analyse
()
{
for
(
field_info
**
f
=
f_info
;
f
!=
f_end
;
f
++
)
delete
(
*
f
);
{
if
(
f_info
)
for
(
field_info
**
f
=
f_info
;
f
!=
f_end
;
f
++
)
delete
(
*
f
);
}
virtual
void
add
()
{}
virtual
bool
change_columns
(
List
<
Item
>
&
fields
);
...
...
sql/sql_class.cc
View file @
ed47a1da
...
...
@@ -156,7 +156,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
*/
{
pthread_mutex_lock
(
&
LOCK_thread_count
);
ulong
tmp
=
(
ulong
)
(
rnd
(
&
sql_rand
)
*
((
ulong
)
~
0L
));
ulong
tmp
=
(
ulong
)
(
rnd
(
&
sql_rand
)
*
((
ulong
)
0xffffffff
));
randominit
(
&
rand
,
tmp
+
(
ulong
)
start_time
,
tmp
+
(
ulong
)
thread_id
);
pthread_mutex_unlock
(
&
LOCK_thread_count
);
...
...
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