Add the feature of fetching data from mysql database at any offset and in any size.Fix some bugs