Merge lp://staging/~diego-fmpwizard/drizzle/plugin-functions-error-messages into lp://staging/~drizzle-trunk/drizzle/development
- plugin-functions-error-messages
- Merge into development
Status: | Merged |
---|---|
Approved by: | Jay Pipes |
Approved revision: | 1126 |
Merged at revision: | not available |
Proposed branch: | lp://staging/~diego-fmpwizard/drizzle/plugin-functions-error-messages |
Merge into: | lp://staging/~drizzle-trunk/drizzle/development |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~diego-fmpwizard/drizzle/plugin-functions-error-messages |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Monty Taylor | Approve | ||
Review via email: mp+10680@code.staging.launchpad.net |
This proposal supersedes a proposal from 2009-08-25.
Commit message
Description of the change
fmpwizard (diego-fmpwizard) wrote : Posted in a previous version of this proposal | # |
Monty Taylor (mordred) wrote : Posted in a previous version of this proposal | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Could we change the error message and remove the word native? For that
matter, renaming the define from ER_WRONG_
ER_WRONG_
going to end up with a real distinction between native and non-native
functions anymore.
fmpwizard wrote:
> fmpwizard has proposed merging lp:~diego-fmpwizard/drizzle/plugin-functions-error-messages into lp:drizzle.
>
> Requested reviews:
> Drizzle-developers (drizzle-
>
> UDF plugin functions and built-in function use the same error message when they both receive an incorrect number of parameters.
>
> See https:/
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq
4m8AnRn5B4jGP6q
=K8RJ
-----END PGP SIGNATURE-----
fmpwizard (diego-fmpwizard) wrote : Posted in a previous version of this proposal | # |
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Could we change the error message and remove the word native? For that
> matter, renaming the define from ER_WRONG_
> ER_WRONG_
> going to end up with a real distinction between native and non-native
> functions anymore.
>
Sounds good, I'll rename them to ER_WRONG_
Thanks
-Diego
> fmpwizard wrote:
> > fmpwizard has proposed merging lp:~diego-fmpwizard/drizzle/plugin-functions-
> error-messages into lp:drizzle.
> >
> > Requested reviews:
> > Drizzle-developers (drizzle-
> >
> > UDF plugin functions and built-in function use the same error message when
> they both receive an incorrect number of parameters.
> >
> > See https:/
> consistent-errors for more information.
> >
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://
>
> iEYEARECAAYFAkq
> 4m8AnRn5B4jGP6q
> =K8RJ
> -----END PGP SIGNATURE-----
Monty Taylor (mordred) wrote : | # |
Love it. Merging.
Stewart Smith (stewart) : | # |
Preview Diff
1 | === modified file 'client/errname.cc' | |||
2 | --- client/errname.cc 2009-08-05 22:50:03 +0000 | |||
3 | +++ client/errname.cc 2009-08-25 18:22:32 +0000 | |||
4 | @@ -615,7 +615,7 @@ | |||
5 | 615 | { "ER_UNSUPORTED_LOG_ENGINE",1579 }, | 615 | { "ER_UNSUPORTED_LOG_ENGINE",1579 }, |
6 | 616 | { "ER_BAD_LOG_STATEMENT",1580 }, | 616 | { "ER_BAD_LOG_STATEMENT",1580 }, |
7 | 617 | { "ER_CANT_RENAME_LOG_TABLE",1581 }, | 617 | { "ER_CANT_RENAME_LOG_TABLE",1581 }, |
9 | 618 | { "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT",1582 }, | 618 | { "ER_WRONG_PARAMCOUNT_TO_FUNCTION",1582 }, |
10 | 619 | { "ER_WRONG_PARAMETERS_TO_NATIVE_FCT",1583 }, | 619 | { "ER_WRONG_PARAMETERS_TO_NATIVE_FCT",1583 }, |
11 | 620 | { "ER_WRONG_PARAMETERS_TO_STORED_FCT",1584 }, | 620 | { "ER_WRONG_PARAMETERS_TO_STORED_FCT",1584 }, |
12 | 621 | { "ER_NATIVE_FCT_NAME_COLLISION",1585 }, | 621 | { "ER_NATIVE_FCT_NAME_COLLISION",1585 }, |
13 | 622 | 622 | ||
14 | === modified file 'drizzled/error.cc' | |||
15 | --- drizzled/error.cc 2009-06-26 06:25:57 +0000 | |||
16 | +++ drizzled/error.cc 2009-08-25 18:22:32 +0000 | |||
17 | @@ -1194,7 +1194,7 @@ | |||
18 | 1194 | N_("You cannot '%s' a log table if logging is enabled"), | 1194 | N_("You cannot '%s' a log table if logging is enabled"), |
19 | 1195 | /* ER_CANT_RENAME_LOG_TABLE */ | 1195 | /* ER_CANT_RENAME_LOG_TABLE */ |
20 | 1196 | N_("Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'"), | 1196 | N_("Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'"), |
22 | 1197 | /* ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000 */ | 1197 | /* ER_WRONG_PARAMCOUNT_TO_FUNCTION 42000 */ |
23 | 1198 | N_("Incorrect parameter count in the call to native function '%-.192s'"), | 1198 | N_("Incorrect parameter count in the call to native function '%-.192s'"), |
24 | 1199 | /* ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 */ | 1199 | /* ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 */ |
25 | 1200 | N_("Incorrect parameters in the call to native function '%-.192s'"), | 1200 | N_("Incorrect parameters in the call to native function '%-.192s'"), |
26 | 1201 | 1201 | ||
27 | === modified file 'drizzled/error.h' | |||
28 | --- drizzled/error.h 2009-06-16 03:02:59 +0000 | |||
29 | +++ drizzled/error.h 2009-08-25 18:22:32 +0000 | |||
30 | @@ -611,7 +611,7 @@ | |||
31 | 611 | ER_UNSUPORTED_LOG_ENGINE, | 611 | ER_UNSUPORTED_LOG_ENGINE, |
32 | 612 | ER_BAD_LOG_STATEMENT, | 612 | ER_BAD_LOG_STATEMENT, |
33 | 613 | ER_CANT_RENAME_LOG_TABLE, | 613 | ER_CANT_RENAME_LOG_TABLE, |
35 | 614 | ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, | 614 | ER_WRONG_PARAMCOUNT_TO_FUNCTION, |
36 | 615 | ER_WRONG_PARAMETERS_TO_NATIVE_FCT, | 615 | ER_WRONG_PARAMETERS_TO_NATIVE_FCT, |
37 | 616 | ER_WRONG_PARAMETERS_TO_STORED_FCT, | 616 | ER_WRONG_PARAMETERS_TO_STORED_FCT, |
38 | 617 | ER_NATIVE_FCT_NAME_COLLISION, | 617 | ER_NATIVE_FCT_NAME_COLLISION, |
39 | 618 | 618 | ||
40 | === modified file 'drizzled/item/create.cc' | |||
41 | --- drizzled/item/create.cc 2009-08-17 20:54:05 +0000 | |||
42 | +++ drizzled/item/create.cc 2009-08-25 18:22:32 +0000 | |||
43 | @@ -1480,7 +1480,7 @@ | |||
44 | 1480 | 1480 | ||
45 | 1481 | if(!func->check_argument_count(arg_count)) | 1481 | if(!func->check_argument_count(arg_count)) |
46 | 1482 | { | 1482 | { |
48 | 1483 | my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), func->func_name()); | 1483 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), func->func_name()); |
49 | 1484 | return NULL; | 1484 | return NULL; |
50 | 1485 | } | 1485 | } |
51 | 1486 | 1486 | ||
52 | @@ -1514,7 +1514,7 @@ | |||
53 | 1514 | 1514 | ||
54 | 1515 | if (arg_count != 0) | 1515 | if (arg_count != 0) |
55 | 1516 | { | 1516 | { |
57 | 1517 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1517 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
58 | 1518 | return NULL; | 1518 | return NULL; |
59 | 1519 | } | 1519 | } |
60 | 1520 | 1520 | ||
61 | @@ -1532,7 +1532,7 @@ | |||
62 | 1532 | 1532 | ||
63 | 1533 | if (arg_count != 1) | 1533 | if (arg_count != 1) |
64 | 1534 | { | 1534 | { |
66 | 1535 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1535 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
67 | 1536 | return NULL; | 1536 | return NULL; |
68 | 1537 | } | 1537 | } |
69 | 1538 | 1538 | ||
70 | @@ -1558,7 +1558,7 @@ | |||
71 | 1558 | 1558 | ||
72 | 1559 | if (arg_count != 2) | 1559 | if (arg_count != 2) |
73 | 1560 | { | 1560 | { |
75 | 1561 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1561 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
76 | 1562 | return NULL; | 1562 | return NULL; |
77 | 1563 | } | 1563 | } |
78 | 1564 | 1564 | ||
79 | @@ -1586,7 +1586,7 @@ | |||
80 | 1586 | 1586 | ||
81 | 1587 | if (arg_count != 3) | 1587 | if (arg_count != 3) |
82 | 1588 | { | 1588 | { |
84 | 1589 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1589 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
85 | 1590 | return NULL; | 1590 | return NULL; |
86 | 1591 | } | 1591 | } |
87 | 1592 | 1592 | ||
88 | @@ -1660,7 +1660,7 @@ | |||
89 | 1660 | } | 1660 | } |
90 | 1661 | default: | 1661 | default: |
91 | 1662 | { | 1662 | { |
93 | 1663 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1663 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
94 | 1664 | break; | 1664 | break; |
95 | 1665 | } | 1665 | } |
96 | 1666 | } | 1666 | } |
97 | @@ -1710,7 +1710,7 @@ | |||
98 | 1710 | 1710 | ||
99 | 1711 | if (arg_count < 1) | 1711 | if (arg_count < 1) |
100 | 1712 | { | 1712 | { |
102 | 1713 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1713 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
103 | 1714 | return NULL; | 1714 | return NULL; |
104 | 1715 | } | 1715 | } |
105 | 1716 | 1716 | ||
106 | @@ -1732,7 +1732,7 @@ | |||
107 | 1732 | /* "WS" stands for "With Separator": this function takes 2+ arguments */ | 1732 | /* "WS" stands for "With Separator": this function takes 2+ arguments */ |
108 | 1733 | if (arg_count < 2) | 1733 | if (arg_count < 2) |
109 | 1734 | { | 1734 | { |
111 | 1735 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1735 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
112 | 1736 | return NULL; | 1736 | return NULL; |
113 | 1737 | } | 1737 | } |
114 | 1738 | 1738 | ||
115 | @@ -1848,7 +1848,7 @@ | |||
116 | 1848 | 1848 | ||
117 | 1849 | if (arg_count < 2) | 1849 | if (arg_count < 2) |
118 | 1850 | { | 1850 | { |
120 | 1851 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1851 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
121 | 1852 | return NULL; | 1852 | return NULL; |
122 | 1853 | } | 1853 | } |
123 | 1854 | 1854 | ||
124 | @@ -1909,7 +1909,7 @@ | |||
125 | 1909 | } | 1909 | } |
126 | 1910 | default: | 1910 | default: |
127 | 1911 | { | 1911 | { |
129 | 1912 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1912 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
130 | 1913 | break; | 1913 | break; |
131 | 1914 | } | 1914 | } |
132 | 1915 | } | 1915 | } |
133 | @@ -1931,7 +1931,7 @@ | |||
134 | 1931 | 1931 | ||
135 | 1932 | if (arg_count < 2) | 1932 | if (arg_count < 2) |
136 | 1933 | { | 1933 | { |
138 | 1934 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 1934 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
139 | 1935 | return NULL; | 1935 | return NULL; |
140 | 1936 | } | 1936 | } |
141 | 1937 | 1937 | ||
142 | @@ -2013,7 +2013,7 @@ | |||
143 | 2013 | } | 2013 | } |
144 | 2014 | default: | 2014 | default: |
145 | 2015 | { | 2015 | { |
147 | 2016 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2016 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
148 | 2017 | break; | 2017 | break; |
149 | 2018 | } | 2018 | } |
150 | 2019 | } | 2019 | } |
151 | @@ -2035,7 +2035,7 @@ | |||
152 | 2035 | 2035 | ||
153 | 2036 | if (arg_count < 2) | 2036 | if (arg_count < 2) |
154 | 2037 | { | 2037 | { |
156 | 2038 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2038 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
157 | 2039 | return NULL; | 2039 | return NULL; |
158 | 2040 | } | 2040 | } |
159 | 2041 | 2041 | ||
160 | @@ -2114,7 +2114,7 @@ | |||
161 | 2114 | } | 2114 | } |
162 | 2115 | default: | 2115 | default: |
163 | 2116 | { | 2116 | { |
165 | 2117 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2117 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
166 | 2118 | break; | 2118 | break; |
167 | 2119 | } | 2119 | } |
168 | 2120 | } | 2120 | } |
169 | @@ -2145,7 +2145,7 @@ | |||
170 | 2145 | 2145 | ||
171 | 2146 | if (arg_count < 2) | 2146 | if (arg_count < 2) |
172 | 2147 | { | 2147 | { |
174 | 2148 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2148 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
175 | 2149 | return NULL; | 2149 | return NULL; |
176 | 2150 | } | 2150 | } |
177 | 2151 | 2151 | ||
178 | @@ -2203,7 +2203,7 @@ | |||
179 | 2203 | } | 2203 | } |
180 | 2204 | default: | 2204 | default: |
181 | 2205 | { | 2205 | { |
183 | 2206 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2206 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
184 | 2207 | break; | 2207 | break; |
185 | 2208 | } | 2208 | } |
186 | 2209 | } | 2209 | } |
187 | @@ -2240,7 +2240,7 @@ | |||
188 | 2240 | } | 2240 | } |
189 | 2241 | default: | 2241 | default: |
190 | 2242 | { | 2242 | { |
192 | 2243 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2243 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
193 | 2244 | break; | 2244 | break; |
194 | 2245 | } | 2245 | } |
195 | 2246 | } | 2246 | } |
196 | @@ -2307,7 +2307,7 @@ | |||
197 | 2307 | 2307 | ||
198 | 2308 | if (arg_count < 2) | 2308 | if (arg_count < 2) |
199 | 2309 | { | 2309 | { |
201 | 2310 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2310 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
202 | 2311 | return NULL; | 2311 | return NULL; |
203 | 2312 | } | 2312 | } |
204 | 2313 | 2313 | ||
205 | @@ -2435,7 +2435,7 @@ | |||
206 | 2435 | } | 2435 | } |
207 | 2436 | default: | 2436 | default: |
208 | 2437 | { | 2437 | { |
210 | 2438 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2438 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
211 | 2439 | break; | 2439 | break; |
212 | 2440 | } | 2440 | } |
213 | 2441 | } | 2441 | } |
214 | @@ -2473,7 +2473,7 @@ | |||
215 | 2473 | } | 2473 | } |
216 | 2474 | default: | 2474 | default: |
217 | 2475 | { | 2475 | { |
219 | 2476 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2476 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
220 | 2477 | break; | 2477 | break; |
221 | 2478 | } | 2478 | } |
222 | 2479 | } | 2479 | } |
223 | @@ -2651,7 +2651,7 @@ | |||
224 | 2651 | } | 2651 | } |
225 | 2652 | default: | 2652 | default: |
226 | 2653 | { | 2653 | { |
228 | 2654 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); | 2654 | my_error(ER_WRONG_PARAMCOUNT_TO_FUNCTION, MYF(0), name.str); |
229 | 2655 | break; | 2655 | break; |
230 | 2656 | } | 2656 | } |
231 | 2657 | } | 2657 | } |
232 | 2658 | 2658 | ||
233 | === modified file 'drizzled/sql_state.cc' | |||
234 | --- drizzled/sql_state.cc 2009-07-07 09:06:29 +0000 | |||
235 | +++ drizzled/sql_state.cc 2009-08-25 18:22:32 +0000 | |||
236 | @@ -240,7 +240,7 @@ | |||
237 | 240 | { ER_NON_GROUPING_FIELD_USED ,"42000", "" }, | 240 | { ER_NON_GROUPING_FIELD_USED ,"42000", "" }, |
238 | 241 | { ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" }, | 241 | { ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" }, |
239 | 242 | { ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" }, | 242 | { ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" }, |
241 | 243 | { ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" }, | 243 | { ER_WRONG_PARAMCOUNT_TO_FUNCTION ,"42000", "" }, |
242 | 244 | { ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" }, | 244 | { ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" }, |
243 | 245 | { ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" }, | 245 | { ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" }, |
244 | 246 | { ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" }, | 246 | { ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" }, |
245 | 247 | 247 | ||
246 | === modified file 'tests/r/crc32.result' | |||
247 | --- tests/r/crc32.result 2009-06-09 03:59:56 +0000 | |||
248 | +++ tests/r/crc32.result 2009-08-25 14:58:48 +0000 | |||
249 | @@ -14,9 +14,9 @@ | |||
250 | 14 | CRC32("I love testing") = CRC32(some_text) | 14 | CRC32("I love testing") = CRC32(some_text) |
251 | 15 | 1 | 15 | 1 |
252 | 16 | SELECT CRC32(); | 16 | SELECT CRC32(); |
254 | 17 | ERROR 42000: Incorrect parameters in the call to native function 'crc32' | 17 | ERROR 42000: Incorrect parameter count in the call to native function 'crc32' |
255 | 18 | SELECT CRC32('foo','bar','zoo'); | 18 | SELECT CRC32('foo','bar','zoo'); |
257 | 19 | ERROR 42000: Incorrect parameters in the call to native function 'crc32' | 19 | ERROR 42000: Incorrect parameter count in the call to native function 'crc32' |
258 | 20 | SELECT CRC32(''); | 20 | SELECT CRC32(''); |
259 | 21 | CRC32('') | 21 | CRC32('') |
260 | 22 | 0 | 22 | 0 |
261 | 23 | 23 | ||
262 | === modified file 'tests/r/func_compress.result' | |||
263 | --- tests/r/func_compress.result 2009-04-24 20:44:50 +0000 | |||
264 | +++ tests/r/func_compress.result 2009-08-25 14:58:48 +0000 | |||
265 | @@ -116,14 +116,14 @@ | |||
266 | 116 | drop table t1; | 116 | drop table t1; |
267 | 117 | End of 5.0 tests | 117 | End of 5.0 tests |
268 | 118 | select compress(); | 118 | select compress(); |
270 | 119 | ERROR 42000: Incorrect parameters in the call to native function 'compress' | 119 | ERROR 42000: Incorrect parameter count in the call to native function 'compress' |
271 | 120 | select uncompress(); | 120 | select uncompress(); |
273 | 121 | ERROR 42000: Incorrect parameters in the call to native function 'uncompress' | 121 | ERROR 42000: Incorrect parameter count in the call to native function 'uncompress' |
274 | 122 | select uncompressed_length(); | 122 | select uncompressed_length(); |
276 | 123 | ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length' | 123 | ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length' |
277 | 124 | select compress('aeou', 'aoeu', 'aoeu'); | 124 | select compress('aeou', 'aoeu', 'aoeu'); |
279 | 125 | ERROR 42000: Incorrect parameters in the call to native function 'compress' | 125 | ERROR 42000: Incorrect parameter count in the call to native function 'compress' |
280 | 126 | select uncompress('aoenuthn', 'aoeu'); | 126 | select uncompress('aoenuthn', 'aoeu'); |
282 | 127 | ERROR 42000: Incorrect parameters in the call to native function 'uncompress' | 127 | ERROR 42000: Incorrect parameter count in the call to native function 'uncompress' |
283 | 128 | select uncompressed_length('aneohusa','naohuntah','onh'); | 128 | select uncompressed_length('aneohusa','naohuntah','onh'); |
285 | 129 | ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length' | 129 | ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length' |
286 | 130 | 130 | ||
287 | === modified file 'tests/t/crc32.test' | |||
288 | --- tests/t/crc32.test 2009-06-09 03:59:56 +0000 | |||
289 | +++ tests/t/crc32.test 2009-08-25 18:22:32 +0000 | |||
290 | @@ -18,9 +18,9 @@ | |||
291 | 18 | SELECT CRC32("I love testing") = CRC32(some_text) FROM t1; | 18 | SELECT CRC32("I love testing") = CRC32(some_text) FROM t1; |
292 | 19 | 19 | ||
293 | 20 | # Check for error if no parameter provided | 20 | # Check for error if no parameter provided |
295 | 21 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 21 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
296 | 22 | SELECT CRC32(); | 22 | SELECT CRC32(); |
298 | 23 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 23 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
299 | 24 | SELECT CRC32('foo','bar','zoo'); | 24 | SELECT CRC32('foo','bar','zoo'); |
300 | 25 | 25 | ||
301 | 26 | # Check that various inputs are processed correctly | 26 | # Check that various inputs are processed correctly |
302 | 27 | 27 | ||
303 | === modified file 'tests/t/func_compress.test' | |||
304 | --- tests/t/func_compress.test 2009-04-24 20:44:50 +0000 | |||
305 | +++ tests/t/func_compress.test 2009-08-25 18:22:32 +0000 | |||
306 | @@ -86,16 +86,16 @@ | |||
307 | 86 | 86 | ||
308 | 87 | # parameter count | 87 | # parameter count |
309 | 88 | 88 | ||
311 | 89 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 89 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
312 | 90 | select compress(); | 90 | select compress(); |
314 | 91 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 91 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
315 | 92 | select uncompress(); | 92 | select uncompress(); |
317 | 93 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 93 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
318 | 94 | select uncompressed_length(); | 94 | select uncompressed_length(); |
319 | 95 | 95 | ||
321 | 96 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 96 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
322 | 97 | select compress('aeou', 'aoeu', 'aoeu'); | 97 | select compress('aeou', 'aoeu', 'aoeu'); |
324 | 98 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 98 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
325 | 99 | select uncompress('aoenuthn', 'aoeu'); | 99 | select uncompress('aoenuthn', 'aoeu'); |
327 | 100 | --error ER_WRONG_PARAMETERS_TO_NATIVE_FCT | 100 | --error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
328 | 101 | select uncompressed_length('aneohusa','naohuntah','onh'); | 101 | select uncompressed_length('aneohusa','naohuntah','onh'); |
329 | 102 | \ No newline at end of file | 102 | \ No newline at end of file |
330 | 103 | 103 | ||
331 | === modified file 'tests/t/parser.test' | |||
332 | --- tests/t/parser.test 2009-02-21 16:00:06 +0000 | |||
333 | +++ tests/t/parser.test 2009-08-25 18:22:32 +0000 | |||
334 | @@ -346,94 +346,94 @@ | |||
335 | 346 | 346 | ||
336 | 347 | # Test coverage with edge conditions | 347 | # Test coverage with edge conditions |
337 | 348 | 348 | ||
339 | 349 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 349 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
340 | 350 | select pi(3.14); | 350 | select pi(3.14); |
341 | 351 | 351 | ||
343 | 352 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 352 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
344 | 353 | select tan(); | 353 | select tan(); |
346 | 354 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 354 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
347 | 355 | select tan(1, 2); | 355 | select tan(1, 2); |
348 | 356 | 356 | ||
350 | 357 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 357 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
351 | 358 | select makedate(1); | 358 | select makedate(1); |
353 | 359 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 359 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
354 | 360 | select makedate(1, 2, 3); | 360 | select makedate(1, 2, 3); |
355 | 361 | 361 | ||
357 | 362 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 362 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
358 | 363 | select atan(); | 363 | select atan(); |
360 | 364 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 364 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
361 | 365 | select atan2(1, 2, 3); | 365 | select atan2(1, 2, 3); |
362 | 366 | 366 | ||
364 | 367 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 367 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
365 | 368 | select concat(); | 368 | select concat(); |
366 | 369 | select concat("foo"); | 369 | select concat("foo"); |
367 | 370 | 370 | ||
369 | 371 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 371 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
370 | 372 | select concat_ws(); | 372 | select concat_ws(); |
372 | 373 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 373 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
373 | 374 | select concat_ws("foo"); | 374 | select concat_ws("foo"); |
374 | 375 | 375 | ||
376 | 376 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 376 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
377 | 377 | select elt(); | 377 | select elt(); |
379 | 378 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 378 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
380 | 379 | select elt(1); | 379 | select elt(1); |
381 | 380 | 380 | ||
383 | 381 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 381 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
384 | 382 | select export_set(); | 382 | select export_set(); |
386 | 383 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 383 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
387 | 384 | select export_set("p1"); | 384 | select export_set("p1"); |
389 | 385 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 385 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
390 | 386 | select export_set("p1", "p2"); | 386 | select export_set("p1", "p2"); |
392 | 387 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 387 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
393 | 388 | select export_set("p1", "p2", "p3", "p4", "p5", "p6"); | 388 | select export_set("p1", "p2", "p3", "p4", "p5", "p6"); |
394 | 389 | 389 | ||
396 | 390 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 390 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
397 | 391 | select field(); | 391 | select field(); |
399 | 392 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 392 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
400 | 393 | select field("p1"); | 393 | select field("p1"); |
401 | 394 | 394 | ||
403 | 395 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 395 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
404 | 396 | select from_unixtime(); | 396 | select from_unixtime(); |
406 | 397 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 397 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
407 | 398 | select from_unixtime(1, 2, 3); | 398 | select from_unixtime(1, 2, 3); |
408 | 399 | 399 | ||
410 | 400 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 400 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
411 | 401 | select unix_timestamp(1, 2); | 401 | select unix_timestamp(1, 2); |
412 | 402 | 402 | ||
414 | 403 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 403 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
415 | 404 | select greatest(); | 404 | select greatest(); |
417 | 405 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 405 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
418 | 406 | select greatest(12); | 406 | select greatest(12); |
419 | 407 | 407 | ||
421 | 408 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 408 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
422 | 409 | select last_insert_id(1, 2); | 409 | select last_insert_id(1, 2); |
423 | 410 | 410 | ||
425 | 411 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 411 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
426 | 412 | select least(); | 412 | select least(); |
428 | 413 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 413 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
429 | 414 | select least(12); | 414 | select least(12); |
430 | 415 | 415 | ||
432 | 416 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 416 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
433 | 417 | select locate(); | 417 | select locate(); |
435 | 418 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 418 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
436 | 419 | select locate(1); | 419 | select locate(1); |
438 | 420 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 420 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
439 | 421 | select locate(1, 2, 3, 4); | 421 | select locate(1, 2, 3, 4); |
440 | 422 | 422 | ||
442 | 423 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 423 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
443 | 424 | select log(); | 424 | select log(); |
445 | 425 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 425 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
446 | 426 | select log(1, 2, 3); | 426 | select log(1, 2, 3); |
447 | 427 | 427 | ||
449 | 428 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 428 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
450 | 429 | select make_set(); | 429 | select make_set(); |
452 | 430 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 430 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
453 | 431 | select make_set(1); | 431 | select make_set(1); |
454 | 432 | 432 | ||
456 | 433 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 433 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
457 | 434 | select rand(1, 2, 3); | 434 | select rand(1, 2, 3); |
458 | 435 | 435 | ||
460 | 436 | -- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT | 436 | -- error ER_WRONG_PARAMCOUNT_TO_FUNCTION |
461 | 437 | select round(1, 2, 3); | 437 | select round(1, 2, 3); |
462 | 438 | 438 | ||
463 | 439 | # | 439 | # |
UDF plugin functions and built-in function use the same error message when they both receive an incorrect number of parameters.
See https:/ /blueprints. launchpad. net/drizzle/ +spec/functions -plugins- consistent- errors for more information.