~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/my_handler.h

  • Committer: Jay Pipes
  • Date: 2009-01-30 04:01:12 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130040112-svbn774guj98pwi4
To remain in compatibility with MySQL, added ability to interpret
decimal arguments as datetime strings for temporal functions.

Fixed YEAR(), MONTH(), DAYOFMONTH(), DAYOFYEAR(), HOUR(), MINUTE(), SECOND(), and MICROSECOND()
to accept decimal parameters and interpret them the same way as MySQL.

Fixed an issue with the TemporalFormat::matches() method which was 
incorrectly assuming all microsecond arguments were specified as 6 digits.
Added power of 10 multiplier to usecond calculation. This fixes issues with
failures in type_date and func_sapdb test cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
   You should have received a copy of the GNU Library General Public
14
14
   License along with this library; if not, write to the Free
15
 
   Software Foundation, Inc., 51 Franklin Place - Suite 330, Boston,
16
 
   MA 02110-1301, USA */
17
 
 
18
 
#ifndef PLUGIN_MYISAM_MY_HANDLER_H
19
 
#define PLUGIN_MYISAM_MY_HANDLER_H
20
 
 
21
 
#include "drizzled/charset_info.h"
22
 
#include <plugin/myisam/myisampack.h>
 
15
   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
16
   MA 02111-1307, USA */
 
17
 
 
18
#ifndef _my_handler_h
 
19
#define _my_handler_h
 
20
 
 
21
#include <mystrings/m_ctype.h>
 
22
#include <storage/myisam/myisampack.h>
 
23
#ifdef  __cplusplus
 
24
extern "C" {
 
25
#endif
23
26
 
24
27
/*
25
28
  There is a hard limit for the maximum number of keys as there are only
45
48
 
46
49
typedef struct st_HA_KEYSEG             /* Key-portion */
47
50
{
48
 
  const drizzled::CHARSET_INFO *charset;
 
51
  const CHARSET_INFO *charset;
49
52
  uint32_t start;                               /* Start of key in record */
50
53
  uint32_t null_pos;                    /* position to NULL indicator */
51
54
  uint16_t bit_pos;                       /* Position to bit part */
104
107
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
105
108
  set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
106
109
 
107
 
extern int ha_compare_text(const drizzled::CHARSET_INFO * const, unsigned char *, uint, unsigned char *, uint, bool, bool);
 
110
extern int ha_compare_text(const CHARSET_INFO * const, unsigned char *, uint, unsigned char *, uint, bool, bool);
108
111
 
109
112
extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, unsigned char *a);
110
113
void my_handler_error_register(void);
 
114
void my_handler_error_unregister(void);
111
115
extern int ha_key_cmp(HA_KEYSEG *keyseg, unsigned char *a,unsigned char *b,
112
116
                      uint32_t key_length,uint32_t nextflag,uint32_t *diff_length);
113
117
 
117
121
  this amount of bytes.
118
122
*/
119
123
#define portable_sizeof_char_ptr 8
 
124
#ifdef  __cplusplus
 
125
}
 
126
#endif
120
127
 
121
 
#endif /* PLUGIN_MYISAM_MY_HANDLER_H */
 
128
#endif /* _my_handler_h */