Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3a03bb1d
Commit
3a03bb1d
authored
Sep 13, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql-4.0 into mashka.mysql.fi:/home/my/mysql-4.0
parents
2f7f0982
87a43166
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
25 deletions
+33
-25
Docs/manual.texi
Docs/manual.texi
+26
-24
sql/opt_range.cc
sql/opt_range.cc
+7
-1
No files found.
Docs/manual.texi
View file @
3a03bb1d
...
@@ -27175,9 +27175,9 @@ statement, a dedicated table object is allocated for the thread.
...
@@ -27175,9 +27175,9 @@ statement, a dedicated table object is allocated for the thread.
This table object is not shared by other threads an will not be closed
This table object is not shared by other threads an will not be closed
until the thread calls @code{HANDLER table_name CLOSE} or the thread dies.
until the thread calls @code{HANDLER table_name CLOSE} or the thread dies.
@xref{HANDLER, , @code{HANDLER}}. When this happens, the table is put
@xref{HANDLER, , @code{HANDLER}}. When this happens, the table is put
back in the table
_
cache (if it isn't full).
back in the table
cache (if it isn't full).
You can check if your table cache is too small by checking the
mysqld
You can check if your table cache is too small by checking the
@code{mysqld}
variable @code{Opened_tables}. If this is quite big, even if you
variable @code{Opened_tables}. If this is quite big, even if you
haven't done a lot of @code{FLUSH TABLES}, you should increase your table
haven't done a lot of @code{FLUSH TABLES}, you should increase your table
cache. @xref{SHOW STATUS, , @code{SHOW STATUS}}.
cache. @xref{SHOW STATUS, , @code{SHOW STATUS}}.
...
@@ -27770,9 +27770,11 @@ you would write:
...
@@ -27770,9 +27770,11 @@ you would write:
@example
@example
mysql> SET PASSWORD FOR bob@@"%.loc.gov" = PASSWORD("newpass");
mysql> SET PASSWORD FOR bob@@"%.loc.gov" = PASSWORD("newpass");
@end example
or
Which is equivalent to:
@example
mysql> UPDATE mysql.user SET password=PASSWORD("newpass")
mysql> UPDATE mysql.user SET password=PASSWORD("newpass")
-> WHERE user="bob' AND host="%.loc.gov";
-> WHERE user="bob' AND host="%.loc.gov";
@end example
@end example
...
@@ -27956,8 +27958,8 @@ inode and by this will avoid some disk seeks.
...
@@ -27956,8 +27958,8 @@ inode and by this will avoid some disk seeks.
@item
@item
On Linux, you can get much more performance (up to 100% under load is
On Linux, you can get much more performance (up to 100% under load is
not uncommon) by using
hdparm
to configure your disk's interface! The
not uncommon) by using
@code{hdparm}
to configure your disk's interface! The
following should be quite good
hdparm
options for MySQL (and
following should be quite good
@code{hdparm}
options for MySQL (and
probably many other applications):
probably many other applications):
@example
@example
...
@@ -27971,15 +27973,15 @@ man page for more information! If @code{hdparm} is not used wisely,
...
@@ -27971,15 +27973,15 @@ man page for more information! If @code{hdparm} is not used wisely,
filesystem corruption may result. Backup everything before experimenting!
filesystem corruption may result. Backup everything before experimenting!
@item
@item
On many operating systems you can mount the disks with the
'async' flag to
On many operating systems you can mount the disks with the
@code{-o async}
set the filesystem to be updated asynchronously. If your computer is
option to
set the filesystem to be updated asynchronously. If your computer is
reasonabl
e
stable, this should give you more performance without sacrificing
reasonabl
y
stable, this should give you more performance without sacrificing
too much reliability. (This flag is on by default on Linux.)
too much reliability. (This flag is on by default on Linux.)
@item
@item
If you don't need to know when a file was last accessed (which is not
If you don't need to know when a file was last accessed (which is not
really useful on a database server), you can mount your filesystems
really useful on a database server), you can mount your filesystems
with the @code{
noatime} flag
.
with the @code{
-o noatime} option
.
@end itemize
@end itemize
@menu
@menu
...
@@ -33606,7 +33608,7 @@ non-magic value (that is, a value that is not @code{NULL} and not @code{0}).
...
@@ -33606,7 +33608,7 @@ non-magic value (that is, a value that is not @code{NULL} and not @code{0}).
If you insert many rows at the same time with an insert statement,
If you insert many rows at the same time with an insert statement,
@code{LAST_INSERT_ID()} returns the value for the first inserted row.
@code{LAST_INSERT_ID()} returns the value for the first inserted row.
The reason for this is
so that you it makes
it possible to easily reproduce
The reason for this is
to make
it possible to easily reproduce
the same @code{INSERT} statement against some other server.
the same @code{INSERT} statement against some other server.
@cindex sequence emulation
@cindex sequence emulation
...
@@ -37682,7 +37684,7 @@ You can combine many statements and accept these all in one go with
...
@@ -37682,7 +37684,7 @@ You can combine many statements and accept these all in one go with
the @code{COMMIT} command.
the @code{COMMIT} command.
@item
@item
You can execute @code{ROLLBACK} to ignore your changes (if you are not
You can execute @code{ROLLBACK} to ignore your changes (if you are not
running in auto
commit mode).
running in auto
-
commit mode).
@item
@item
If an update fails, all your changes will be restored. (With NTST tables all
If an update fails, all your changes will be restored. (With NTST tables all
changes that have taken place are permanent)
changes that have taken place are permanent)
...
@@ -38261,7 +38263,7 @@ kind of benefits.)
...
@@ -38261,7 +38263,7 @@ kind of benefits.)
@item
@item
Do more efficient searches. If you know exactly what you are looking
Do more efficient searches. If you know exactly what you are looking
after, you can search in just one of the split tables for some queries
after, you can search in just one of the split tables for some queries
and use @code{MERGE} table for others. You can even have many
and use
a
@code{MERGE} table for others. You can even have many
different @code{MERGE} tables active, with possible overlapping files.
different @code{MERGE} tables active, with possible overlapping files.
@item
@item
More efficient repairs. It's easier to repair the individual files that
More efficient repairs. It's easier to repair the individual files that
...
@@ -38296,7 +38298,7 @@ You can only use identical @code{MyISAM} tables for a @code{MERGE} table.
...
@@ -38296,7 +38298,7 @@ You can only use identical @code{MyISAM} tables for a @code{MERGE} table.
@code{REPLACE} doesn't work.
@code{REPLACE} doesn't work.
@item
@item
@code{MERGE} tables uses more file descriptors. If you are using a
@code{MERGE} tables uses more file descriptors. If you are using a
@code{MERGE} that maps over 10 tables and 10 users are using this, you
@code{MERGE} t
able t
hat maps over 10 tables and 10 users are using this, you
are using 10*10 + 10 file descriptors. (10 datafiles for 10 users
are using 10*10 + 10 file descriptors. (10 datafiles for 10 users
and 10 shared index files.)
and 10 shared index files.)
@item
@item
...
@@ -38452,8 +38454,8 @@ recovery}.
...
@@ -38452,8 +38454,8 @@ recovery}.
@end itemize
@end itemize
Most of the things true for @code{MyISAM} tables are also true for @code{ISAM}
Most of the things true for @code{MyISAM} tables are also true for @code{ISAM}
tables. @xref{MyISAM
}. The major differences compared to @code{MyISAM}
tables. @xref{MyISAM
, , @code{MyISAM} tables}. The major differences compared
tables are:
t
o @code{MyISAM} t
ables are:
@itemize @bullet
@itemize @bullet
@item @code{ISAM} tables are not binary portable across OS/Platforms.
@item @code{ISAM} tables are not binary portable across OS/Platforms.
...
@@ -38529,7 +38531,7 @@ are 100% dynamic (on inserting). No overflow areas and no extra key
...
@@ -38529,7 +38531,7 @@ are 100% dynamic (on inserting). No overflow areas and no extra key
space are needed. Deleted rows are put in a linked list and are
space are needed. Deleted rows are put in a linked list and are
reused when you insert new data into the table.
reused when you insert new data into the table.
@item
@item
You need enough extra memory for all
HEAP
tables that you want to use at
You need enough extra memory for all
@code{HEAP}
tables that you want to use at
the same time.
the same time.
@item
@item
To free memory, you should execute @code{DELETE FROM heap_table},
To free memory, you should execute @code{DELETE FROM heap_table},
...
@@ -39458,7 +39460,7 @@ the relevant files. If the formats are different and your tables
...
@@ -39458,7 +39460,7 @@ the relevant files. If the formats are different and your tables
contain floating-point data, you have to use @file{mysqldump}
contain floating-point data, you have to use @file{mysqldump}
and @file{mysqlimport} to move those tables.
and @file{mysqlimport} to move those tables.
A performance tip is to switch off
the auto commit
when you import
A performance tip is to switch off
auto-commit mode
when you import
data into your database, assuming your tablespace has enough space for
data into your database, assuming your tablespace has enough space for
the big rollback segment the big import transaction will generate.
the big rollback segment the big import transaction will generate.
Do the commit only after importing a whole table or a segment of
Do the commit only after importing a whole table or a segment of
...
@@ -39479,7 +39481,7 @@ without InnoDB running out of memory.
...
@@ -39479,7 +39481,7 @@ without InnoDB running out of memory.
In InnoDB all user activity happens inside transactions. If the
In InnoDB all user activity happens inside transactions. If the
auto-commit mode is used in MySQL, then each SQL statement
auto-commit mode is used in MySQL, then each SQL statement
will form a single transaction. If the auto
commit mode is
will form a single transaction. If the auto
-
commit mode is
switched off, then we can think that a user always has a transaction
switched off, then we can think that a user always has a transaction
open. If he issues
open. If he issues
the SQL @code{COMMIT} or @code{ROLLBACK} statement, that
the SQL @code{COMMIT} or @code{ROLLBACK} statement, that
...
@@ -40791,8 +40793,8 @@ In this case you have to rebuild MySQL without @code{BDB} table support.
...
@@ -40791,8 +40793,8 @@ In this case you have to rebuild MySQL without @code{BDB} table support.
Note: The following list is not complete; we will update it as we
Note: The following list is not complete; we will update it as we
receive more information about this.
receive more information about this.
Currently we know that
@code{BDB} tables work with the following operat
ing
Currently we know that
the @code{BDB} handler works with the follow
ing
system.
operating systems:
@itemize @bullet
@itemize @bullet
@item
@item
...
@@ -40823,7 +40825,7 @@ Here follows the restrictions you have when using @code{BDB} tables:
...
@@ -40823,7 +40825,7 @@ Here follows the restrictions you have when using @code{BDB} tables:
@item
@item
@code{BDB} tables store in the @file{.db} file the path to the file as it was
@code{BDB} tables store in the @file{.db} file the path to the file as it was
created.
created.
This was done to be able to detect locks in a multi-user
(
This was done to be able to detect locks in a multi-user
environment that supports symlinks).
environment that supports symlinks).
The effect of this is that @code{BDB} tables are not movable between directories!
The effect of this is that @code{BDB} tables are not movable between directories!
...
@@ -40852,9 +40854,9 @@ file format. In this case you have to delete all @code{BDB} logs
...
@@ -40852,9 +40854,9 @@ file format. In this case you have to delete all @code{BDB} logs
from your database directory (the files with names that have the format
from your database directory (the files with names that have the format
@code{log.XXXXXXXXXX}) and restart @code{mysqld}. We would also
@code{log.XXXXXXXXXX}) and restart @code{mysqld}. We would also
recommend you to do a @code{mysqldump --opt} of your old @code{BDB}
recommend you to do a @code{mysqldump --opt} of your old @code{BDB}
tables, delete the old table and restore the dump.
tables, delete the old table
s,
and restore the dump.
@item
@item
If you are
running in not @code{auto_commit}
mode and delete a table you
If you are
not running in auto-commit
mode and delete a table you
are using by another thread you may get the following error messages in
are using by another thread you may get the following error messages in
the MySQL error file:
the MySQL error file:
...
@@ -40865,7 +40867,7 @@ the MySQL error file:
...
@@ -40865,7 +40867,7 @@ the MySQL error file:
@end example
@end example
This is not fatal but we don't recommend that you delete tables if you are
This is not fatal but we don't recommend that you delete tables if you are
not in
@code{auto_commit}
mode, until this problem is fixed (the fix is
not in
auto-commit
mode, until this problem is fixed (the fix is
not trivial).
not trivial).
@end itemize
@end itemize
sql/opt_range.cc
View file @
3a03bb1d
...
@@ -2623,13 +2623,19 @@ int QUICK_SELECT_DESC::get_next()
...
@@ -2623,13 +2623,19 @@ int QUICK_SELECT_DESC::get_next()
}
}
else
else
{
{
/* Heikki changed Sept 11, 2002: since InnoDB does not store the cursor
position if READ_KEY_EXACT is used to a primary key with all
key columns specified, we must use below HA_READ_KEY_OR_NEXT,
so that InnoDB stores the cursor position and is able to move
the cursor one step backward after the search. */
DBUG_ASSERT
(
range
->
flag
&
NEAR_MAX
||
range_reads_after_key
(
range
));
DBUG_ASSERT
(
range
->
flag
&
NEAR_MAX
||
range_reads_after_key
(
range
));
/* Note: even if max_key is only a prefix, HA_READ_AFTER_KEY will
/* Note: even if max_key is only a prefix, HA_READ_AFTER_KEY will
* do the right thing - go past all keys which match the prefix */
* do the right thing - go past all keys which match the prefix */
result
=
file
->
index_read
(
record
,
(
byte
*
)
range
->
max_key
,
result
=
file
->
index_read
(
record
,
(
byte
*
)
range
->
max_key
,
range
->
max_length
,
range
->
max_length
,
((
range
->
flag
&
NEAR_MAX
)
?
((
range
->
flag
&
NEAR_MAX
)
?
HA_READ_KEY_
EXAC
T
:
HA_READ_AFTER_KEY
));
HA_READ_KEY_
OR_NEX
T
:
HA_READ_AFTER_KEY
));
result
=
file
->
index_prev
(
record
);
result
=
file
->
index_prev
(
record
);
}
}
if
(
result
)
if
(
result
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment