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
90946487
Commit
90946487
authored
Jul 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-alloc_group-4.1
parents
54313be5
9f661429
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
27 deletions
+24
-27
client/get_password.c
client/get_password.c
+0
-1
sql/item.cc
sql/item.cc
+7
-1
sql/item.h
sql/item.h
+0
-3
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+3
-8
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+0
-2
sql/item_func.cc
sql/item_func.cc
+12
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
sql/sql_analyse.cc
sql/sql_analyse.cc
+0
-6
sql/sql_analyse.h
sql/sql_analyse.h
+1
-4
No files found.
client/get_password.c
View file @
90946487
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include "mysql.h"
#include "mysql.h"
#include <m_string.h>
#include <m_string.h>
#include <m_ctype.h>
#include <m_ctype.h>
#include <dbug.h>
#if defined(HAVE_BROKEN_GETPASS) && !defined(HAVE_GETPASSPHRASE)
#if defined(HAVE_BROKEN_GETPASS) && !defined(HAVE_GETPASSPHRASE)
#undef HAVE_GETPASS
#undef HAVE_GETPASS
...
...
sql/item.cc
View file @
90946487
...
@@ -50,7 +50,13 @@ Item::Item():
...
@@ -50,7 +50,13 @@ Item::Item():
next
=
thd
->
free_list
;
// Put in free list
next
=
thd
->
free_list
;
// Put in free list
thd
->
free_list
=
this
;
thd
->
free_list
=
this
;
loop_id
=
0
;
loop_id
=
0
;
if
(
thd
->
lex
.
current_select
->
parsing_place
==
SELECT_LEX_NODE
::
SELECT_LIST
)
/*
Item constructor can be called during execution other tnen SQL_COM
command => we should check thd->lex.current_select on zero (thd->lex
can be uninitialised)
*/
if
(
thd
->
lex
.
current_select
&&
thd
->
lex
.
current_select
->
parsing_place
==
SELECT_LEX_NODE
::
SELECT_LIST
)
thd
->
lex
.
current_select
->
select_items
++
;
thd
->
lex
.
current_select
->
select_items
++
;
}
}
...
...
sql/item.h
View file @
90946487
...
@@ -185,9 +185,6 @@ public:
...
@@ -185,9 +185,6 @@ public:
collation
.
collation
=
collation_arg
->
collation
;
collation
.
collation
=
collation_arg
->
collation
;
collation
.
derivation
=
collation_arg
->
derivation
;
collation
.
derivation
=
collation_arg
->
derivation
;
}
}
bool
binary
()
const
{
return
charset
()
->
state
&
MY_CS_BINSORT
?
1
:
0
;
}
virtual
void
set_outer_resolving
()
{}
virtual
void
set_outer_resolving
()
{}
// Row emulation
// Row emulation
...
...
sql/item_cmpfunc.cc
View file @
90946487
...
@@ -380,12 +380,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
...
@@ -380,12 +380,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
return
1
;
return
1
;
if
(
args
[
0
]
->
maybe_null
)
if
(
args
[
0
]
->
maybe_null
)
maybe_null
=
1
;
maybe_null
=
1
;
/*
TODO: Check if following is right
(set_charset set type of result, not how compare should be used)
*/
if
(
args
[
0
]
->
binary
())
set_charset
(
&
my_charset_bin
);
with_sum_func
=
args
[
0
]
->
with_sum_func
;
with_sum_func
=
args
[
0
]
->
with_sum_func
;
used_tables_cache
=
args
[
0
]
->
used_tables
();
used_tables_cache
=
args
[
0
]
->
used_tables
();
const_item_cache
=
args
[
0
]
->
const_item
();
const_item_cache
=
args
[
0
]
->
const_item
();
...
@@ -933,7 +928,7 @@ Item *Item_func_case::find_item(String *str)
...
@@ -933,7 +928,7 @@ Item *Item_func_case::find_item(String *str)
if
((
tmp
=
args
[
i
]
->
val_str
(
str
)))
// If not null
if
((
tmp
=
args
[
i
]
->
val_str
(
str
)))
// If not null
{
{
/* QQ: COERCIBILITY */
/* QQ: COERCIBILITY */
if
(
first_expr_is_binary
||
args
[
i
]
->
binary
(
))
if
(
first_expr_is_binary
||
(
args
[
i
]
->
charset
()
->
state
&
MY_CS_BINSORT
))
{
{
if
(
sortcmp
(
tmp
,
first_expr_str
,
&
my_charset_bin
)
==
0
)
if
(
sortcmp
(
tmp
,
first_expr_str
,
&
my_charset_bin
)
==
0
)
return
args
[
i
+
1
];
return
args
[
i
+
1
];
...
@@ -1044,7 +1039,7 @@ Item_func_case::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
...
@@ -1044,7 +1039,7 @@ Item_func_case::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
used_tables_cache
|=
(
first_expr
)
->
used_tables
();
used_tables_cache
|=
(
first_expr
)
->
used_tables
();
const_item_cache
&=
(
first_expr
)
->
const_item
();
const_item_cache
&=
(
first_expr
)
->
const_item
();
with_sum_func
=
with_sum_func
||
(
first_expr
)
->
with_sum_func
;
with_sum_func
=
with_sum_func
||
(
first_expr
)
->
with_sum_func
;
first_expr_is_binary
=
first_expr
->
binary
()
;
first_expr_is_binary
=
first_expr
->
charset
()
->
state
&
MY_CS_BINSORT
;
}
}
if
(
else_expr
)
if
(
else_expr
)
{
{
...
...
sql/item_cmpfunc.h
View file @
90946487
...
@@ -129,8 +129,6 @@ public:
...
@@ -129,8 +129,6 @@ public:
bool
have_rev_func
()
const
{
return
rev_functype
()
!=
UNKNOWN_FUNC
;
}
bool
have_rev_func
()
const
{
return
rev_functype
()
!=
UNKNOWN_FUNC
;
}
void
print
(
String
*
str
)
{
Item_func
::
print_op
(
str
);
}
void
print
(
String
*
str
)
{
Item_func
::
print_op
(
str
);
}
bool
is_null
()
{
return
test
(
args
[
0
]
->
is_null
()
||
args
[
1
]
->
is_null
());
}
bool
is_null
()
{
return
test
(
args
[
0
]
->
is_null
()
||
args
[
1
]
->
is_null
());
}
virtual
bool
binary
()
const
{
return
test
(
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
);
}
static
Item_bool_func2
*
eq_creator
(
Item
*
a
,
Item
*
b
);
static
Item_bool_func2
*
eq_creator
(
Item
*
a
,
Item
*
b
);
static
Item_bool_func2
*
ne_creator
(
Item
*
a
,
Item
*
b
);
static
Item_bool_func2
*
ne_creator
(
Item
*
a
,
Item
*
b
);
...
...
sql/item_func.cc
View file @
90946487
...
@@ -1353,7 +1353,18 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func,
...
@@ -1353,7 +1353,18 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func,
Item
*
item
=
*
arg
;
Item
*
item
=
*
arg
;
if
(
item
->
fix_fields
(
thd
,
tables
,
arg
)
||
item
->
check_cols
(
1
))
if
(
item
->
fix_fields
(
thd
,
tables
,
arg
)
||
item
->
check_cols
(
1
))
return
1
;
return
1
;
if
(
item
->
binary
())
/*
TODO: We should think about this. It is not always
right way just to set an UDF result to return my_charset_bin
if one argument has binary sorting order.
The result collation should be calculated according to arguments
derivations in some cases and should not in other cases.
Moreover, some arguments can represent a numeric input
which doesn't effect the result character set and collation.
There is no a general rule for UDF. Everything depends on
the particular user definted function.
*/
if
(
item
->
charset
()
->
state
&
MY_CS_BINSORT
)
func
->
set_charset
(
&
my_charset_bin
);
func
->
set_charset
(
&
my_charset_bin
);
if
(
item
->
maybe_null
)
if
(
item
->
maybe_null
)
func
->
maybe_null
=
1
;
func
->
maybe_null
=
1
;
...
...
sql/item_strfunc.cc
View file @
90946487
...
@@ -748,7 +748,7 @@ String *Item_func_replace::val_str(String *str)
...
@@ -748,7 +748,7 @@ String *Item_func_replace::val_str(String *str)
res
->
set_charset
(
collation
.
collation
);
res
->
set_charset
(
collation
.
collation
);
#ifdef USE_MB
#ifdef USE_MB
binary_cmp
=
(
args
[
0
]
->
binary
()
||
args
[
1
]
->
binary
(
)
||
!
use_mb
(
res
->
charset
()));
binary_cmp
=
(
(
res
->
charset
()
->
state
&
MY_CS_BINSORT
)
||
!
use_mb
(
res
->
charset
()));
#endif
#endif
if
(
res2
->
length
()
==
0
)
if
(
res2
->
length
()
==
0
)
...
...
sql/sql_analyse.cc
View file @
90946487
...
@@ -44,12 +44,6 @@ int sortcmp2(void* cmp_arg __attribute__((unused)),
...
@@ -44,12 +44,6 @@ int sortcmp2(void* cmp_arg __attribute__((unused)),
return
sortcmp
(
a
,
b
,
a
->
charset
());
return
sortcmp
(
a
,
b
,
a
->
charset
());
}
}
int
stringcmp2
(
void
*
cmp_arg
__attribute__
((
unused
)),
const
String
*
a
,
const
String
*
b
)
{
return
sortcmp
(
a
,
b
,
&
my_charset_bin
);
}
int
compare_double2
(
void
*
cmp_arg
__attribute__
((
unused
)),
int
compare_double2
(
void
*
cmp_arg
__attribute__
((
unused
)),
const
double
*
s
,
const
double
*
t
)
const
double
*
s
,
const
double
*
t
)
{
{
...
...
sql/sql_analyse.h
View file @
90946487
...
@@ -99,8 +99,6 @@ int collect_string(String *element, element_count count,
...
@@ -99,8 +99,6 @@ int collect_string(String *element, element_count count,
int
sortcmp2
(
void
*
cmp_arg
__attribute__
((
unused
)),
int
sortcmp2
(
void
*
cmp_arg
__attribute__
((
unused
)),
const
String
*
a
,
const
String
*
b
);
const
String
*
a
,
const
String
*
b
);
int
stringcmp2
(
void
*
cmp_arg
__attribute__
((
unused
)),
const
String
*
a
,
const
String
*
b
);
class
field_str
:
public
field_info
class
field_str
:
public
field_info
{
{
...
@@ -117,8 +115,7 @@ public:
...
@@ -117,8 +115,7 @@ public:
max_arg
(
""
,
default_charset_info
),
sum
(
0
),
max_arg
(
""
,
default_charset_info
),
sum
(
0
),
must_be_blob
(
0
),
was_zero_fill
(
0
),
must_be_blob
(
0
),
was_zero_fill
(
0
),
was_maybe_zerofill
(
0
),
can_be_still_num
(
1
)
was_maybe_zerofill
(
0
),
can_be_still_num
(
1
)
{
init_tree
(
&
tree
,
0
,
0
,
sizeof
(
String
),
a
->
binary
()
?
{
init_tree
(
&
tree
,
0
,
0
,
sizeof
(
String
),
(
qsort_cmp2
)
sortcmp2
,
(
qsort_cmp2
)
stringcmp2
:
(
qsort_cmp2
)
sortcmp2
,
0
,
(
tree_element_free
)
free_string
,
NULL
);
};
0
,
(
tree_element_free
)
free_string
,
NULL
);
};
void
add
();
void
add
();
...
...
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