~stewart/haildb/remove-univ-static

« back to all changes in this revision

Viewing changes to row/row0merge.c

  • Committer: Stewart Smith
  • Date: 2010-08-05 23:28:45 UTC
  • Revision ID: stewart@flamingspork.com-20100805232845-ihsae6mc5teon6n3
remove UNIV_STATIC. It's no longer in the innodb_plugin, replace just with 'static'

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
/** Set these in order ot enable debug printout. */
69
69
/* @{ */
70
70
/** Log the outcome of each row_merge_cmp() call, comparing records. */
71
 
UNIV_STATIC ibool       row_merge_print_cmp;
 
71
static ibool    row_merge_print_cmp;
72
72
/** Log each record read from temporary file. */
73
 
UNIV_STATIC ibool       row_merge_print_read;
 
73
static ibool    row_merge_print_read;
74
74
/** Log each record write to temporary file. */
75
 
UNIV_STATIC ibool       row_merge_print_write;
 
75
static ibool    row_merge_print_write;
76
76
/** Log each row_merge_blocks() call, merging two blocks of records to
77
77
a bigger one. */
78
 
UNIV_STATIC ibool       row_merge_print_block;
79
 
/** Log each block read from temporary file. */
80
 
UNIV_STATIC ibool       row_merge_print_block_read;
81
 
/** Log each block read from temporary file. */
82
 
UNIV_STATIC ibool       row_merge_print_block_write;
 
78
static ibool    row_merge_print_block;
 
79
/** Log each block read from temporary file. */
 
80
static ibool    row_merge_print_block_read;
 
81
/** Log each block read from temporary file. */
 
82
static ibool    row_merge_print_block_write;
83
83
/* @} */
84
84
#endif /* UNIV_DEBUG */
85
85
 
137
137
#ifdef UNIV_DEBUG
138
138
/******************************************************//**
139
139
Display a merge tuple. */
140
 
UNIV_STATIC
 
140
static
141
141
void
142
142
row_merge_tuple_print(
143
143
/*==================*/
174
174
/******************************************************//**
175
175
Allocate a sort buffer.
176
176
@return own: sort buffer */
177
 
UNIV_STATIC
 
177
static
178
178
row_merge_buf_t*
179
179
row_merge_buf_create_low(
180
180
/*=====================*/
203
203
/******************************************************//**
204
204
Allocate a sort buffer.
205
205
@return own: sort buffer */
206
 
UNIV_STATIC
 
206
static
207
207
row_merge_buf_t*
208
208
row_merge_buf_create(
209
209
/*=================*/
229
229
/******************************************************//**
230
230
Empty a sort buffer.
231
231
@return sort buffer */
232
 
UNIV_STATIC
 
232
static
233
233
row_merge_buf_t*
234
234
row_merge_buf_empty(
235
235
/*================*/
249
249
 
250
250
/******************************************************//**
251
251
Deallocate a sort buffer. */
252
 
UNIV_STATIC
 
252
static
253
253
void
254
254
row_merge_buf_free(
255
255
/*===============*/
261
261
/******************************************************//**
262
262
Insert a data tuple into a sort buffer.
263
263
@return TRUE if added, FALSE if out of space */
264
 
UNIV_STATIC
 
264
static
265
265
ibool
266
266
row_merge_buf_add(
267
267
/*==============*/
425
425
 
426
426
/*************************************************************//**
427
427
Report a duplicate key. */
428
 
UNIV_STATIC
 
428
static
429
429
void
430
430
row_merge_dup_report(
431
431
/*=================*/
468
468
/*************************************************************//**
469
469
Compare two tuples.
470
470
@return 1, 0, -1 if a is greater, equal, less, respectively, than b */
471
 
UNIV_STATIC
 
471
static
472
472
int
473
473
row_merge_tuple_cmp(
474
474
/*================*/
525
525
 
526
526
/**********************************************************************//**
527
527
Merge sort the tuple buffer in main memory. */
528
 
UNIV_STATIC
 
528
static
529
529
void
530
530
row_merge_tuple_sort(
531
531
/*=================*/
546
546
 
547
547
/******************************************************//**
548
548
Sort a buffer. */
549
 
UNIV_STATIC
 
549
static
550
550
void
551
551
row_merge_buf_sort(
552
552
/*===============*/
561
561
 
562
562
/******************************************************//**
563
563
Write a buffer to a block. */
564
 
UNIV_STATIC
 
564
static
565
565
void
566
566
row_merge_buf_write(
567
567
/*================*/
642
642
/******************************************************//**
643
643
Create a memory heap and allocate space for row_merge_rec_offsets().
644
644
@return memory heap */
645
 
UNIV_STATIC
 
645
static
646
646
mem_heap_t*
647
647
row_merge_heap_create(
648
648
/*==================*/
667
667
Search an index object by name and column names.  If several indexes match,
668
668
return the index with the max id.
669
669
@return matching index, NULL if not found */
670
 
UNIV_STATIC
 
670
static
671
671
dict_index_t*
672
672
row_merge_dict_table_get_index(
673
673
/*===========================*/
695
695
/********************************************************************//**
696
696
Read a merge block from the file system.
697
697
@return TRUE if request was successful, FALSE if fail */
698
 
UNIV_STATIC
 
698
static
699
699
ibool
700
700
row_merge_read(
701
701
/*===========*/
729
729
/********************************************************************//**
730
730
Read a merge block from the file system.
731
731
@return TRUE if request was successful, FALSE if fail */
732
 
UNIV_STATIC
 
732
static
733
733
ibool
734
734
row_merge_write(
735
735
/*============*/
756
756
/********************************************************************//**
757
757
Read a merge record.
758
758
@return pointer to next record, or NULL on I/O error or end of list */
759
 
UNIV_STATIC __attribute__((nonnull))
 
759
static __attribute__((nonnull))
760
760
const byte*
761
761
row_merge_read_rec(
762
762
/*===============*/
925
925
 
926
926
/********************************************************************//**
927
927
Write a merge record. */
928
 
UNIV_STATIC
 
928
static
929
929
void
930
930
row_merge_write_rec_low(
931
931
/*====================*/
969
969
/********************************************************************//**
970
970
Write a merge record.
971
971
@return pointer to end of block, or NULL on error */
972
 
UNIV_STATIC
 
972
static
973
973
byte*
974
974
row_merge_write_rec(
975
975
/*================*/
1036
1036
/********************************************************************//**
1037
1037
Write an end-of-list marker.
1038
1038
@return pointer to end of block, or NULL on error */
1039
 
UNIV_STATIC
 
1039
static
1040
1040
byte*
1041
1041
row_merge_write_eof(
1042
1042
/*================*/
1076
1076
/*************************************************************//**
1077
1077
Compare two merge records.
1078
1078
@return 1, 0, -1 if mrec1 is greater, equal, less, respectively, than mrec2 */
1079
 
UNIV_STATIC
 
1079
static
1080
1080
int
1081
1081
row_merge_cmp(
1082
1082
/*==========*/
1109
1109
Reads clustered index of the table and create temporary files
1110
1110
containing the index entries for the indexes to be built.
1111
1111
@return DB_SUCCESS or error */
1112
 
UNIV_STATIC __attribute__((nonnull))
 
1112
static __attribute__((nonnull))
1113
1113
ulint
1114
1114
row_merge_read_clustered_index(
1115
1115
/*===========================*/
1389
1389
/*************************************************************//**
1390
1390
Merge two blocks of records on disk and write a bigger block.
1391
1391
@return DB_SUCCESS or error code */
1392
 
UNIV_STATIC
 
1392
static
1393
1393
ulint
1394
1394
row_merge_blocks(
1395
1395
/*=============*/
1500
1500
/*************************************************************//**
1501
1501
Copy a block of index entries.
1502
1502
@return TRUE on success, FALSE on failure */
1503
 
UNIV_STATIC __attribute__((nonnull))
 
1503
static __attribute__((nonnull))
1504
1504
ibool
1505
1505
row_merge_blocks_copy(
1506
1506
/*==================*/
1571
1571
/*************************************************************//**
1572
1572
Merge disk files.
1573
1573
@return DB_SUCCESS or error code */
1574
 
UNIV_STATIC __attribute__((nonnull))
 
1574
static __attribute__((nonnull))
1575
1575
ulint
1576
1576
row_merge(
1577
1577
/*======*/
1680
1680
/*************************************************************//**
1681
1681
Merge disk files.
1682
1682
@return DB_SUCCESS or error code */
1683
 
UNIV_STATIC
 
1683
static
1684
1684
ulint
1685
1685
row_merge_sort(
1686
1686
/*===========*/
1720
1720
 
1721
1721
/*************************************************************//**
1722
1722
Copy externally stored columns to the data tuple. */
1723
 
UNIV_STATIC
 
1723
static
1724
1724
void
1725
1725
row_merge_copy_blobs(
1726
1726
/*=================*/
1760
1760
Read sorted file containing index data tuples and insert these data
1761
1761
tuples to the index
1762
1762
@return DB_SUCCESS or error number */
1763
 
UNIV_STATIC
 
1763
static
1764
1764
ulint
1765
1765
row_merge_insert_index_tuples(
1766
1766
/*==========================*/
1917
1917
 
1918
1918
/*********************************************************************//**
1919
1919
Create a merge file. */
1920
 
UNIV_STATIC
 
1920
static
1921
1921
void
1922
1922
row_merge_file_create(
1923
1923
/*==================*/
1930
1930
 
1931
1931
/*********************************************************************//**
1932
1932
Destroy a merge file. */
1933
 
UNIV_STATIC
 
1933
static
1934
1934
void
1935
1935
row_merge_file_destroy(
1936
1936
/*===================*/