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
1d29092e
Commit
1d29092e
authored
Jun 26, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New messages for 3-adic and N-adic operations
REPLACE() now processed arguments collations according to standard
parent
11e9c572
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
86 additions
and
22 deletions
+86
-22
include/mysqld_error.h
include/mysqld_error.h
+4
-2
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+13
-7
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-1
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+21
-11
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+2
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+2
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+2
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+2
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+2
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+2
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+2
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+2
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+2
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+2
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+2
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+2
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+2
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+2
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+2
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+2
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+2
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+2
-0
sql/share/serbian/errmsg.txt
sql/share/serbian/errmsg.txt
+2
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+2
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+2
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+2
-0
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+2
-0
No files found.
include/mysqld_error.h
View file @
1d29092e
...
...
@@ -281,7 +281,9 @@
#define ER_WARN_DATA_OUT_OF_RANGE 1262
#define ER_WARN_DATA_TRUNCATED 1263
#define ER_WARN_USING_OTHER_HANDLER 1264
#define ER_CANT_AGGREGATE_COLLATIONS 1265
#define ER_CANT_AGGREGATE_
2
COLLATIONS 1265
#define ER_DROP_USER 1266
#define ER_REVOKE_GRANTS 1267
#define ER_ERROR_MESSAGES 266
#define ER_CANT_AGGREGATE_3COLLATIONS 1268
#define ER_CANT_AGGREGATE_NCOLLATIONS 1269
#define ER_ERROR_MESSAGES 270
sql/item_cmpfunc.cc
View file @
1d29092e
...
...
@@ -26,7 +26,7 @@
static
void
my_coll_agg_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
const
char
*
fname
)
{
my_error
(
ER_CANT_AGGREGATE_COLLATIONS
,
MYF
(
0
),
my_error
(
ER_CANT_AGGREGATE_
2
COLLATIONS
,
MYF
(
0
),
c1
.
collation
->
name
,
c1
.
derivation_name
(),
c2
.
collation
->
name
,
c2
.
derivation_name
(),
fname
);
...
...
@@ -1968,7 +1968,12 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
with_sum_func
=
args
[
0
]
->
with_sum_func
||
args
[
1
]
->
with_sum_func
;
max_length
=
1
;
decimals
=
0
;
binary_cmp
=
(
args
[
0
]
->
binary
()
||
args
[
1
]
->
binary
());
if
(
cmp_collation
.
set
(
args
[
0
]
->
collation
,
args
[
1
]
->
collation
))
{
my_coll_agg_error
(
args
[
0
]
->
collation
,
args
[
1
]
->
collation
,
func_name
());
return
1
;
}
used_tables_cache
=
args
[
0
]
->
used_tables
()
|
args
[
1
]
->
used_tables
();
const_item_cache
=
args
[
0
]
->
const_item
()
&&
args
[
1
]
->
const_item
();
...
...
@@ -1984,9 +1989,10 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
}
int
error
;
if
((
error
=
regcomp
(
&
preg
,
res
->
c_ptr
(),
binary_cmp
?
REG_EXTENDED
|
REG_NOSUB
:
(
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
?
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
res
->
charset
()
)))
cmp_collation
.
collation
)))
{
(
void
)
regerror
(
error
,
&
preg
,
buff
,
sizeof
(
buff
));
my_printf_error
(
ER_REGEXP_ERROR
,
ER
(
ER_REGEXP_ERROR
),
MYF
(
0
),
buff
);
...
...
@@ -2033,10 +2039,10 @@ longlong Item_func_regex::val_int()
regex_compiled
=
0
;
}
if
(
regcomp
(
&
preg
,
res2
->
c_ptr
(),
binary_cmp
?
REG_EXTENDED
|
REG_NOSUB
:
(
cmp_collation
.
collation
->
state
&
MY_CS_BINSORT
)
?
REG_EXTENDED
|
REG_NOSUB
:
REG_EXTENDED
|
REG_NOSUB
|
REG_ICASE
,
res
->
charset
()))
cmp_collation
.
collation
))
{
null_value
=
1
;
return
0
;
...
...
sql/item_cmpfunc.h
View file @
1d29092e
...
...
@@ -747,7 +747,7 @@ class Item_func_regex :public Item_bool_func
bool
regex_compiled
;
bool
regex_is_const
;
String
prev_regexp
;
bool
binary_cmp
;
DTCollation
cmp_collation
;
public:
Item_func_regex
(
Item
*
a
,
Item
*
b
)
:
Item_bool_func
(
a
,
b
),
regex_compiled
(
0
),
regex_is_const
(
0
)
{}
...
...
sql/item_func.cc
View file @
1d29092e
...
...
@@ -33,7 +33,7 @@
static
void
my_coll_agg_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
const
char
*
fname
)
{
my_error
(
ER_CANT_AGGREGATE_COLLATIONS
,
MYF
(
0
),
my_error
(
ER_CANT_AGGREGATE_
2
COLLATIONS
,
MYF
(
0
),
c1
.
collation
->
name
,
c1
.
derivation_name
(),
c2
.
collation
->
name
,
c2
.
derivation_name
(),
fname
);
...
...
sql/item_strfunc.cc
View file @
1d29092e
...
...
@@ -38,12 +38,24 @@ String empty_string("",default_charset_info);
static
void
my_coll_agg_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
const
char
*
fname
)
{
my_error
(
ER_CANT_AGGREGATE_COLLATIONS
,
MYF
(
0
),
my_error
(
ER_CANT_AGGREGATE_
2
COLLATIONS
,
MYF
(
0
),
c1
.
collation
->
name
,
c1
.
derivation_name
(),
c2
.
collation
->
name
,
c2
.
derivation_name
(),
fname
);
}
static
void
my_coll_agg3_error
(
DTCollation
&
c1
,
DTCollation
&
c2
,
DTCollation
&
c3
,
const
char
*
fname
)
{
my_error
(
ER_CANT_AGGREGATE_3COLLATIONS
,
MYF
(
0
),
c1
.
collation
->
name
,
c1
.
derivation_name
(),
c2
.
collation
->
name
,
c2
.
derivation_name
(),
c3
.
collation
->
name
,
c3
.
derivation_name
(),
fname
);
}
uint
nr_of_decimals
(
const
char
*
str
)
{
if
((
str
=
strchr
(
str
,
'.'
)))
...
...
@@ -733,6 +745,8 @@ String *Item_func_replace::val_str(String *str)
if
(
args
[
1
]
->
null_value
)
goto
null
;
res
->
set_charset
(
collation
.
collation
);
#ifdef USE_MB
binary_cmp
=
(
args
[
0
]
->
binary
()
||
args
[
1
]
->
binary
()
||
!
use_mb
(
res
->
charset
()));
#endif
...
...
@@ -813,7 +827,6 @@ null:
void
Item_func_replace
::
fix_length_and_dec
()
{
uint
i
;
max_length
=
args
[
0
]
->
max_length
;
int
diff
=
(
int
)
(
args
[
2
]
->
max_length
-
args
[
1
]
->
max_length
);
if
(
diff
>
0
&&
args
[
1
]
->
max_length
)
...
...
@@ -828,14 +841,12 @@ void Item_func_replace::fix_length_and_dec()
}
collation
.
set
(
args
[
0
]
->
collation
);
for
(
i
=
1
;
i
<
3
;
i
++
)
{
if
(
collation
.
aggregate
(
args
[
i
]
->
collation
))
{
my_coll_agg_error
(
collation
,
args
[
i
]
->
collation
,
func_name
());
break
;
}
}
if
(
!
collation
.
aggregate
(
args
[
1
]
->
collation
))
collation
.
aggregate
(
args
[
2
]
->
collation
);
if
(
collation
.
derivation
==
DERIVATION_NONE
)
my_coll_agg3_error
(
args
[
0
]
->
collation
,
args
[
1
]
->
collation
,
args
[
2
]
->
collation
,
func_name
());
}
...
...
@@ -931,7 +942,6 @@ String *Item_func_left::val_str(String *str)
if
(
!
res
->
alloced_length
())
{
// Don't change const str
str_value
=
*
res
;
// Not malloced string
set_charset
(
res
->
charset
());
res
=
&
str_value
;
}
res
->
length
((
uint
)
length
);
...
...
sql/share/czech/errmsg.txt
View file @
1d29092e
...
...
@@ -273,3 +273,5 @@ v/*
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/danish/errmsg.txt
View file @
1d29092e
...
...
@@ -267,3 +267,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/dutch/errmsg.txt
View file @
1d29092e
...
...
@@ -275,3 +275,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/english/errmsg.txt
View file @
1d29092e
...
...
@@ -269,3 +269,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/estonian/errmsg.txt
View file @
1d29092e
...
...
@@ -269,3 +269,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/french/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/german/errmsg.txt
View file @
1d29092e
...
...
@@ -273,3 +273,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/greek/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/hungarian/errmsg.txt
View file @
1d29092e
...
...
@@ -266,3 +266,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/italian/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/japanese/errmsg.txt
View file @
1d29092e
...
...
@@ -266,3 +266,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/korean/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/norwegian-ny/errmsg.txt
View file @
1d29092e
...
...
@@ -266,3 +266,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/norwegian/errmsg.txt
View file @
1d29092e
...
...
@@ -266,3 +266,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/polish/errmsg.txt
View file @
1d29092e
...
...
@@ -268,3 +268,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/portuguese/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Combinação ilegal de collations (%s,%s) e (%s,%s) para operação '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/romanian/errmsg.txt
View file @
1d29092e
...
...
@@ -268,3 +268,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/russian/errmsg.txt
View file @
1d29092e
...
...
@@ -266,3 +266,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/serbian/errmsg.txt
View file @
1d29092e
...
...
@@ -260,3 +260,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/slovak/errmsg.txt
View file @
1d29092e
...
...
@@ -272,3 +272,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/spanish/errmsg.txt
View file @
1d29092e
...
...
@@ -265,3 +265,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/swedish/errmsg.txt
View file @
1d29092e
...
...
@@ -264,3 +264,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
sql/share/ukrainian/errmsg.txt
View file @
1d29092e
...
...
@@ -269,3 +269,5 @@
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users"
"Can't revoke all privileges, grant for one or more of the requested users"
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
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