Merge lp://staging/~diego-fmpwizard/drizzle/plugin-functions-error-messages into lp://staging/~drizzle-trunk/drizzle/development

Proposed by fmpwizard
Status: Superseded
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
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+10665@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2009-08-25.

To post a comment you must log in.
Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

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.

Revision history for this message
Monty Taylor (mordred) wrote :

-----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_PARAMCOUNT_TO_NATIVE_FCT to
ER_WRONG_PARAMCOUNT_TO_FUNCTION might also be nice? I'm not sure we're
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-developers)
>
> 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.
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqUBUEACgkQ2Jv7/VK1RgGS/wCgpIOaImCZ99aD8IocPByEXZM7
4m8AnRn5B4jGP6q8i6EVtZnF21yItRns
=K8RJ
-----END PGP SIGNATURE-----

Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

> -----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_PARAMCOUNT_TO_NATIVE_FCT to
> ER_WRONG_PARAMCOUNT_TO_FUNCTION might also be nice? I'm not sure we're
> going to end up with a real distinction between native and non-native
> functions anymore.
>

Sounds good, I'll rename them to ER_WRONG_PARAMCOUNT_TO_FUNCTION

Thanks

   -Diego

> fmpwizard wrote:
> > fmpwizard has proposed merging lp:~diego-fmpwizard/drizzle/plugin-functions-
> error-messages into lp:drizzle.
> >
> > Requested reviews:
> > Drizzle-developers (drizzle-developers)
> >
> > 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.
> >
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkqUBUEACgkQ2Jv7/VK1RgGS/wCgpIOaImCZ99aD8IocPByEXZM7
> 4m8AnRn5B4jGP6q8i6EVtZnF21yItRns
> =K8RJ
> -----END PGP SIGNATURE-----

1126. By Diego Medina <email address hidden>

Renamed ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT to ER_WRONG_PARAMCOUNT_TO_FUNCTION

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/item/create.cc'
2--- drizzled/item/create.cc 2009-08-17 20:54:05 +0000
3+++ drizzled/item/create.cc 2009-08-25 14:58:48 +0000
4@@ -1480,7 +1480,7 @@
5
6 if(!func->check_argument_count(arg_count))
7 {
8- my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), func->func_name());
9+ my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), func->func_name());
10 return NULL;
11 }
12
13
14=== modified file 'tests/r/crc32.result'
15--- tests/r/crc32.result 2009-06-09 03:59:56 +0000
16+++ tests/r/crc32.result 2009-08-25 14:58:48 +0000
17@@ -14,9 +14,9 @@
18 CRC32("I love testing") = CRC32(some_text)
19 1
20 SELECT CRC32();
21-ERROR 42000: Incorrect parameters in the call to native function 'crc32'
22+ERROR 42000: Incorrect parameter count in the call to native function 'crc32'
23 SELECT CRC32('foo','bar','zoo');
24-ERROR 42000: Incorrect parameters in the call to native function 'crc32'
25+ERROR 42000: Incorrect parameter count in the call to native function 'crc32'
26 SELECT CRC32('');
27 CRC32('')
28 0
29
30=== modified file 'tests/r/func_compress.result'
31--- tests/r/func_compress.result 2009-04-24 20:44:50 +0000
32+++ tests/r/func_compress.result 2009-08-25 14:58:48 +0000
33@@ -116,14 +116,14 @@
34 drop table t1;
35 End of 5.0 tests
36 select compress();
37-ERROR 42000: Incorrect parameters in the call to native function 'compress'
38+ERROR 42000: Incorrect parameter count in the call to native function 'compress'
39 select uncompress();
40-ERROR 42000: Incorrect parameters in the call to native function 'uncompress'
41+ERROR 42000: Incorrect parameter count in the call to native function 'uncompress'
42 select uncompressed_length();
43-ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length'
44+ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length'
45 select compress('aeou', 'aoeu', 'aoeu');
46-ERROR 42000: Incorrect parameters in the call to native function 'compress'
47+ERROR 42000: Incorrect parameter count in the call to native function 'compress'
48 select uncompress('aoenuthn', 'aoeu');
49-ERROR 42000: Incorrect parameters in the call to native function 'uncompress'
50+ERROR 42000: Incorrect parameter count in the call to native function 'uncompress'
51 select uncompressed_length('aneohusa','naohuntah','onh');
52-ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length'
53+ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length'
54
55=== modified file 'tests/t/crc32.test'
56--- tests/t/crc32.test 2009-06-09 03:59:56 +0000
57+++ tests/t/crc32.test 2009-08-25 14:58:48 +0000
58@@ -18,9 +18,9 @@
59 SELECT CRC32("I love testing") = CRC32(some_text) FROM t1;
60
61 # Check for error if no parameter provided
62---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
63+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
64 SELECT CRC32();
65---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
66+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
67 SELECT CRC32('foo','bar','zoo');
68
69 # Check that various inputs are processed correctly
70
71=== modified file 'tests/t/func_compress.test'
72--- tests/t/func_compress.test 2009-04-24 20:44:50 +0000
73+++ tests/t/func_compress.test 2009-08-25 14:58:48 +0000
74@@ -86,16 +86,16 @@
75
76 # parameter count
77
78---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
79+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
80 select compress();
81---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
82+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
83 select uncompress();
84---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
85+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
86 select uncompressed_length();
87
88---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
89+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
90 select compress('aeou', 'aoeu', 'aoeu');
91---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
92+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
93 select uncompress('aoenuthn', 'aoeu');
94---error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
95+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
96 select uncompressed_length('aneohusa','naohuntah','onh');
97\ No newline at end of file