~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to storage/myisammrg/myrg_open.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2006 MySQL AB
 
1
/*
 
2
   Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2
3
 
3
4
   This program is free software; you can redistribute it and/or modify
4
5
   it under the terms of the GNU General Public License as published by
11
12
 
12
13
   You should have received a copy of the GNU General Public License
13
14
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
16
*/
15
17
 
16
18
/* open a MyISAM MERGE table */
17
19
 
221
223
                            int (*callback)(void*, const char*),
222
224
                            void *callback_param)
223
225
{
224
 
  MYRG_INFO *m_info;
 
226
  MYRG_INFO *UNINIT_VAR(m_info);
225
227
  int       rc;
226
228
  int       errpos;
227
229
  int       save_errno;
228
230
  int       insert_method;
229
231
  uint      length;
230
 
  uint      dir_length;
231
232
  uint      child_count;
232
 
  size_t    name_buff_length;
233
233
  File      fd;
234
234
  IO_CACHE  file_cache;
235
235
  char      parent_name_buff[FN_REFLEN * 2];
299
299
  }
300
300
 
301
301
  /* Call callback for each child. */
302
 
  dir_length= dirname_part(parent_name_buff, parent_name, &name_buff_length);
303
302
  my_b_seek(&file_cache, 0);
304
303
  while ((length= my_b_gets(&file_cache, child_name_buff, FN_REFLEN - 1)))
305
304
  {
379
378
{
380
379
  ulonglong  file_offset;
381
380
  MI_INFO    *myisam;
382
 
  int        rc;
383
381
  int        errpos;
384
382
  int        save_errno;
385
383
  uint       idx;
398
396
    here and in ha_myisammrg::store_lock() forces consistent data.
399
397
  */
400
398
  pthread_mutex_lock(&m_info->mutex);
401
 
  rc= 1;
402
399
  errpos= 0;
403
400
  file_offset= 0;
404
401
  min_keys= 0;