diff options
author | Marc Alff <marc.alff@sun.com> | 2009-12-04 18:26:15 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-12-04 18:26:15 -0700 |
commit | 57fd11788e800ca016ceb50e93c0c70eec0f6dd6 (patch) | |
tree | 9ca152d7f2ac50cfd8b7fca83f87cb06148d97a0 /storage/csv/transparent_file.cc | |
parent | 34436edb4dd38f30d0f155e0a5fe484754ec5846 (diff) | |
download | mariadb-git-57fd11788e800ca016ceb50e93c0c70eec0f6dd6.tar.gz |
WL#2360 Performance schema
Part II, engines instrumentation
Diffstat (limited to 'storage/csv/transparent_file.cc')
-rw-r--r-- | storage/csv/transparent_file.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/storage/csv/transparent_file.cc b/storage/csv/transparent_file.cc index 3d7afae85d4..937f1fb292a 100644 --- a/storage/csv/transparent_file.cc +++ b/storage/csv/transparent_file.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (C) 2003 MySQL AB, 2008-2009 Sun Microsystems, Inc This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,9 +35,9 @@ void Transparent_file::init_buff(File filedes_arg) filedes= filedes_arg; /* read the beginning of the file */ lower_bound= 0; - my_seek(filedes, 0, MY_SEEK_SET, MYF(0)); + mysql_file_seek(filedes, 0, MY_SEEK_SET, MYF(0)); if (filedes && buff) - upper_bound= my_read(filedes, buff, buff_size, MYF(0)); + upper_bound= mysql_file_read(filedes, buff, buff_size, MYF(0)); } uchar *Transparent_file::ptr() @@ -63,7 +63,8 @@ my_off_t Transparent_file::read_next() No need to seek here, as the file managed by Transparent_file class always points to upper_bound byte */ - if ((bytes_read= my_read(filedes, buff, buff_size, MYF(0))) == MY_FILE_ERROR) + if ((bytes_read= mysql_file_read(filedes, buff, buff_size, MYF(0))) + == MY_FILE_ERROR) return (my_off_t) -1; /* end of file */ @@ -85,10 +86,10 @@ char Transparent_file::get_value(my_off_t offset) if ((lower_bound <= offset) && (((my_off_t) offset) < upper_bound)) return buff[offset - lower_bound]; - my_seek(filedes, offset, MY_SEEK_SET, MYF(0)); + mysql_file_seek(filedes, offset, MY_SEEK_SET, MYF(0)); /* read appropriate portion of the file */ - if ((bytes_read= my_read(filedes, buff, buff_size, - MYF(0))) == MY_FILE_ERROR) + if ((bytes_read= mysql_file_read(filedes, buff, buff_size, + MYF(0))) == MY_FILE_ERROR) return 0; lower_bound= offset; |