~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/null.cc

  • Committer: Jay Pipes
  • Date: 2009-03-16 15:20:27 UTC
  • mto: (934.3.7 mordred)
  • mto: This revision was merged to the branch mainline in revision 938.
  • Revision ID: jpipes@serialcoder-20090316152027-njlreaim8vxqta6c
Fixes ENUM field type to throw an error on bad data input.  0 is now not
allowed on insertion.  MySQL allows 0, in the manual it states 0 is "the
null string error index" whatever that means.  Drizzle doesn't allow it.

Corrected test cases.

Also cleans up indentation on JOIN::exec() which was bothering me.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
 
22
 
#include "config.h"
 
22
#include <drizzled/server_includes.h>
23
23
#include <drizzled/field/null.h>
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
unsigned char Field_null::null[1]={1};
29
26
 
30
27
/****************************************************************************
36
33
  res.set_ascii(STRING_WITH_LEN("null"));
37
34
}
38
35
 
39
 
} /* namespace drizzled */