~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_create.cc

fix pthread atomics. operator precedence is important. The unit test now passes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* Create a MyISAM table */
17
17
 
265
265
        case HA_KEYTYPE_ULONG_INT:
266
266
        case HA_KEYTYPE_LONGLONG:
267
267
        case HA_KEYTYPE_ULONGLONG:
 
268
        case HA_KEYTYPE_UINT24:
268
269
          keyseg->flag|= HA_SWAP_KEY;
269
270
          break;
270
271
        case HA_KEYTYPE_VARTEXT1:
467
468
  if (! (flags & HA_DONT_TOUCH_DATA))
468
469
    share.state.create_time= (long) time((time_t*) 0);
469
470
 
470
 
  THR_LOCK_myisam.lock();
 
471
  pthread_mutex_lock(&THR_LOCK_myisam);
471
472
 
472
473
  /*
473
474
    NOTE: For test_if_reopen() we need a real path name. Hence we need
670
671
      goto err;
671
672
  }
672
673
  errpos=0;
673
 
  THR_LOCK_myisam.unlock();
 
674
  pthread_mutex_unlock(&THR_LOCK_myisam);
674
675
  if (internal::my_close(file,MYF(0)))
675
676
    goto err;
676
677
  free((char*) rec_per_key_part);
677
678
  return(0);
678
679
 
679
680
err:
680
 
  THR_LOCK_myisam.unlock();
 
681
  pthread_mutex_unlock(&THR_LOCK_myisam);
681
682
  save_errno=errno;
682
683
  switch (errpos) {
683
684
  case 3: