mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
This commit is contained in:
347
Docs/manual.texi
347
Docs/manual.texi
@@ -5467,9 +5467,10 @@ something that is of course not true. We could make things even worse
|
|||||||
by just taking the test where PostgreSQL performs worst and claim that
|
by just taking the test where PostgreSQL performs worst and claim that
|
||||||
MySQL is more than 2000 times faster than PostgreSQL.
|
MySQL is more than 2000 times faster than PostgreSQL.
|
||||||
|
|
||||||
The case is that MySQL does a lot of optimizations that PostgreSQL doesn't
|
The case is that MySQL does a lot of optimizations that PostgreSQL
|
||||||
do and the other way around. An SQL optimizer is a very complex thing, and
|
doesn't do. This is of course also true the other way around. An SQL
|
||||||
a company could spend years on just making the optimizer faster and faster.
|
optimizer is a very complex thing, and a company could spend years on
|
||||||
|
just making the optimizer faster and faster.
|
||||||
|
|
||||||
When looking at the benchmark results you should look for things that
|
When looking at the benchmark results you should look for things that
|
||||||
you do in your application and just use these results to decide which
|
you do in your application and just use these results to decide which
|
||||||
@@ -5604,12 +5605,14 @@ MySQL with 2000 simultaneous connections doing 400 queries per second.
|
|||||||
|
|
||||||
It sounded like he was using a Linux kernel that either had some
|
It sounded like he was using a Linux kernel that either had some
|
||||||
problems with many threads, such as kernels before 2.4, which had a problem
|
problems with many threads, such as kernels before 2.4, which had a problem
|
||||||
with this but we have documented how to fix this and Tim should be aware of
|
with many threads on multi-CPU machines. We have documented in this manual
|
||||||
this problem. The other possible problem could have been an old glibc
|
how to fix this and Tim should be aware of this problem.
|
||||||
library and that Tim didn't use a MySQL binary from our site, which is
|
|
||||||
linked with a corrected glibc library, but had compiled a version of his
|
The other possible problem could have been an old glibc library and
|
||||||
own with. In any of the above cases, the symptom would have been exactly
|
that Tim didn't use a MySQL binary from our site, which is linked with
|
||||||
what Tim had measured.
|
a corrected glibc library, but had compiled a version of his own with.
|
||||||
|
In any of the above cases, the symptom would have been exactly what Tim
|
||||||
|
had measured.
|
||||||
|
|
||||||
We asked Tim if we could get access to his data so that we could repeat
|
We asked Tim if we could get access to his data so that we could repeat
|
||||||
the benchmark and if he could check the MySQL version on the machine to
|
the benchmark and if he could check the MySQL version on the machine to
|
||||||
@@ -5618,6 +5621,16 @@ He has not done that yet.
|
|||||||
|
|
||||||
Because of this we can't put any trust in this benchmark either :(
|
Because of this we can't put any trust in this benchmark either :(
|
||||||
|
|
||||||
|
Over time things also changes and the above benchmarks are not that
|
||||||
|
relevant anymore. MySQL now have a couple of different table handlers
|
||||||
|
with different speed/concurrency tradeoffs. @xref{Table types}. It
|
||||||
|
would be interesting to see how the above tests would run with the
|
||||||
|
different transactional table types in MySQL. PostgreSQL has of course
|
||||||
|
also got new features since the test was made. As the above test are
|
||||||
|
not publicly available there is no way for us to know how the
|
||||||
|
database would preform in the same tests today.
|
||||||
|
|
||||||
|
|
||||||
Conclusion:
|
Conclusion:
|
||||||
|
|
||||||
The only benchmarks that exist today that anyone can download and run
|
The only benchmarks that exist today that anyone can download and run
|
||||||
@@ -5632,15 +5645,15 @@ The thing we find strange is that every test we have seen about
|
|||||||
PostgreSQL, that is impossible to reproduce, claims that PostgreSQL is
|
PostgreSQL, that is impossible to reproduce, claims that PostgreSQL is
|
||||||
better in most cases while our tests, which anyone can reproduce,
|
better in most cases while our tests, which anyone can reproduce,
|
||||||
clearly shows otherwise. With this we don't want to say that PostgreSQL
|
clearly shows otherwise. With this we don't want to say that PostgreSQL
|
||||||
isn't good at many things (it is!). We would just like to see a fair test
|
isn't good at many things (it is!) or that it isn't faster than MySQL
|
||||||
where they are very good so that we could get some friendly competition
|
under certain conditions. We would just like to see a fair test where
|
||||||
going!
|
they are very good so that we could get some friendly competition going!
|
||||||
|
|
||||||
For more information about our benchmarks suite @xref{MySQL Benchmarks}.
|
For more information about our benchmarks suite @xref{MySQL Benchmarks}.
|
||||||
|
|
||||||
We are working on an even better benchmark suite, including much better
|
We are working on an even better benchmark suite, including multi user
|
||||||
documentation of what the individual tests really do, and how to add more
|
tests, and a better documentation of what the individual tests really
|
||||||
tests to the suite.
|
do and how to add more tests to the suite.
|
||||||
|
|
||||||
|
|
||||||
@node TODO, , Comparisons, Introduction
|
@node TODO, , Comparisons, Introduction
|
||||||
@@ -6149,9 +6162,9 @@ Nothing; In the long run we plan to be fully ANSI 92 / ANSI 99 compliant.
|
|||||||
@menu
|
@menu
|
||||||
* Quick Standard Installation:: Quick Standard Installation of MySQL
|
* Quick Standard Installation:: Quick Standard Installation of MySQL
|
||||||
* General Installation Issues:: General Installation Issues
|
* General Installation Issues:: General Installation Issues
|
||||||
* Installing source:: Installing a MySQL source distribution
|
* Installing source:: Installing a MySQL source distribution
|
||||||
* Post-installation:: Post-installation setup and testing
|
* Post-installation:: Post-installation setup and testing
|
||||||
* Upgrade:: Upgrading/Downgrading MySQL
|
* Upgrade:: Upgrading/Downgrading MySQL
|
||||||
* Operating System Specific Notes:: Operating System Specific Notes
|
* Operating System Specific Notes:: Operating System Specific Notes
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@@ -6434,13 +6447,13 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
|
|||||||
|
|
||||||
@item
|
@item
|
||||||
@c Added: 990920
|
@c Added: 990920
|
||||||
@c EMAIL: <radek@sopik.cz> (Radek Libovicky)
|
@c EMAIL: radek@sopik.cz (Radek Libovicky)
|
||||||
@image{Flags/czech-republic} Czech Republic [www.sopik.cz] @
|
@image{Flags/czech-republic} Czech Republic [www.sopik.cz] @
|
||||||
@uref{http://www.mysql.cz/, WWW}
|
@uref{http://www.mysql.cz/, WWW}
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@c Added: 000418
|
@c Added: 000418
|
||||||
@c EMAIL: <feela@ipex.cz> (Ondrej Feela Filip)
|
@c EMAIL: feela@ipex.cz (Ondrej Feela Filip)
|
||||||
@image{Flags/czech-republic} Czech Republic [www.gin.cz] @
|
@image{Flags/czech-republic} Czech Republic [www.gin.cz] @
|
||||||
@uref{http://mysql.gin.cz/, WWW}
|
@uref{http://mysql.gin.cz/, WWW}
|
||||||
@uref{ftp://ftp.gin.cz/pub/MIRRORS/www.mysql.com/, FTP}
|
@uref{ftp://ftp.gin.cz/pub/MIRRORS/www.mysql.com/, FTP}
|
||||||
@@ -6448,7 +6461,7 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
|
|||||||
@item
|
@item
|
||||||
@c removed 991020 (no DNS entry). New name 991026. Added 991121
|
@c removed 991020 (no DNS entry). New name 991026. Added 991121
|
||||||
@c Statistics at http://mirror.borsen.dk/
|
@c Statistics at http://mirror.borsen.dk/
|
||||||
@c EMAIL: mirrorman@borsen.dk (Michael Kyed)
|
@c EMAIL: guru@borsen.dk (Jesper Angelo)
|
||||||
@image{Flags/denmark} Denmark [Borsen] @
|
@image{Flags/denmark} Denmark [Borsen] @
|
||||||
@uref{ http://mysql.borsen.dk/, WWW}
|
@uref{ http://mysql.borsen.dk/, WWW}
|
||||||
|
|
||||||
@@ -6648,7 +6661,7 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
|
|||||||
|
|
||||||
@c @item
|
@c @item
|
||||||
@c Not ok 20000919; Non-existent (Matt)
|
@c Not ok 20000919; Non-existent (Matt)
|
||||||
@c EMAIL: Equipa de suporte do Leirianet <support@leirianet.pt>
|
@c EMAIL: support@leirianet.pt (Equipa de suporte do Leirianet)
|
||||||
@c @image{Flags/portugal} Portugal [lerianet] @
|
@c @image{Flags/portugal} Portugal [lerianet] @
|
||||||
@c @uref{http://mysql.leirianet.pt, WWW}
|
@c @uref{http://mysql.leirianet.pt, WWW}
|
||||||
@c @uref{ftp://ftp.leirianet.pt/pub/mysql/,FTP}
|
@c @uref{ftp://ftp.leirianet.pt/pub/mysql/,FTP}
|
||||||
@@ -8202,7 +8215,7 @@ If your client programs are using threads, you need to also compile a
|
|||||||
thread-safe version of the MySQL client library with the
|
thread-safe version of the MySQL client library with the
|
||||||
@code{--with-thread-safe-client} configure options. This will create a
|
@code{--with-thread-safe-client} configure options. This will create a
|
||||||
@code{libmysqlclient_r} library with which you should link your threaded
|
@code{libmysqlclient_r} library with which you should link your threaded
|
||||||
applications. @xref{Thread-safe clients}.
|
applications. @xref{Threaded clients}.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Options that pertain to particular systems can be found in the
|
Options that pertain to particular systems can be found in the
|
||||||
@@ -23603,20 +23616,29 @@ Because the user could issue the @code{FLUSH LOGS} command, we need to
|
|||||||
know which log is currently active and which ones have been rotated out
|
know which log is currently active and which ones have been rotated out
|
||||||
and in what sequence. This information is stored in the binary log index file.
|
and in what sequence. This information is stored in the binary log index file.
|
||||||
The default is `hostname`.index. You can use this option if you want to
|
The default is `hostname`.index. You can use this option if you want to
|
||||||
be a rebel. (Example: @code{log-bin-index=db.index})
|
be a rebel.
|
||||||
|
|
||||||
|
Example: @code{log-bin-index=db.index}.
|
||||||
|
|
||||||
@item @code{sql-bin-update-same} @tab
|
@item @code{sql-bin-update-same} @tab
|
||||||
If set, setting @code{SQL_LOG_BIN} to a value will automatically set
|
If set, setting @code{SQL_LOG_BIN} to a value will automatically set
|
||||||
@code{SQL_LOG_UPDATE} to the same value and vice versa.
|
@code{SQL_LOG_UPDATE} to the same value and vice versa.
|
||||||
|
|
||||||
@item @code{binlog-do-db=database_name} @tab
|
@item @code{binlog-do-db=database_name} @tab
|
||||||
Tells the master it should log updates for the specified database, and
|
Tells the master that it should log updates to the binary log if the
|
||||||
exclude all others not explicitly mentioned.
|
current database is 'database_name'. All others database are ignored.
|
||||||
(Example: @code{binlog-do-db=some_database})
|
Note that if you use this you should ensure that you only do updates in
|
||||||
|
the current database.
|
||||||
|
|
||||||
|
Example: @code{binlog-do-db=some_database}.
|
||||||
|
|
||||||
@item @code{binlog-ignore-db=database_name} @tab
|
@item @code{binlog-ignore-db=database_name} @tab
|
||||||
Tells the master that updates to the given database should not be logged
|
Tells the master that updates where the current database is
|
||||||
to the binary log (Example: @code{binlog-ignore-db=some_database})
|
'database_name' should not be stored in the binary log. Note that if
|
||||||
|
you use this you should ensure that you only do updates in the current
|
||||||
|
database.
|
||||||
|
|
||||||
|
Example: @code{binlog-ignore-db=some_database}
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
The following table has the options you can use for the @strong{SLAVE}:
|
The following table has the options you can use for the @strong{SLAVE}:
|
||||||
@@ -23627,65 +23649,79 @@ The following table has the options you can use for the @strong{SLAVE}:
|
|||||||
@item @code{master-host=host} @tab
|
@item @code{master-host=host} @tab
|
||||||
Master hostname or IP address for replication. If not set, the slave
|
Master hostname or IP address for replication. If not set, the slave
|
||||||
thread will not be started.
|
thread will not be started.
|
||||||
(Example: @code{master-host=db-master.mycompany.com})
|
|
||||||
|
Example: @code{master-host=db-master.mycompany.com}.
|
||||||
|
|
||||||
@item @code{master-user=username} @tab
|
@item @code{master-user=username} @tab
|
||||||
The user the slave thread will us for authentication when connecting to
|
The user the slave thread will us for authentication when connecting to
|
||||||
the master. The user must have @code{FILE} privilege. If the master user
|
the master. The user must have @code{FILE} privilege. If the master user
|
||||||
is not set, user @code{test} is assumed. (Example:
|
is not set, user @code{test} is assumed.
|
||||||
@code{master-user=scott})
|
|
||||||
|
Example: @code{master-user=scott}.
|
||||||
|
|
||||||
@item @code{master-password=password} @tab
|
@item @code{master-password=password} @tab
|
||||||
The password the slave thread will authenticate with when connecting to
|
The password the slave thread will authenticate with when connecting to
|
||||||
the master. If not set, an empty password is assumed. (Example:
|
the master. If not set, an empty password is assumed.
|
||||||
@code{master-password=tiger})
|
|
||||||
|
Example: @code{master-password=tiger}.
|
||||||
|
|
||||||
@item @code{master-port=portnumber} @tab
|
@item @code{master-port=portnumber} @tab
|
||||||
The port the master is listening on. If not set, the compiled setting of
|
The port the master is listening on. If not set, the compiled setting of
|
||||||
@code{MYSQL_PORT} is assumed. If you have not tinkered with
|
@code{MYSQL_PORT} is assumed. If you have not tinkered with
|
||||||
@code{configure} options, this should be 3306. (Example:
|
@code{configure} options, this should be 3306.
|
||||||
@code{master-port=3306})
|
|
||||||
|
Example: @code{master-port=3306}.
|
||||||
|
|
||||||
@item @code{master-connect-retry=seconds} @tab
|
@item @code{master-connect-retry=seconds} @tab
|
||||||
The number of seconds the slave thread will sleep before retrying to
|
The number of seconds the slave thread will sleep before retrying to
|
||||||
connect to the master in case the master goes down or the connection is
|
connect to the master in case the master goes down or the connection is
|
||||||
lost. Default is 60. (Example: @code{master-connect-retry=60})
|
lost. Default is 60.
|
||||||
|
|
||||||
|
Example: @code{master-connect-retry=60}.
|
||||||
|
|
||||||
@item @code{master-info-file=filename} @tab
|
@item @code{master-info-file=filename} @tab
|
||||||
The location of the file that remembers where we left off on the master
|
The location of the file that remembers where we left off on the master
|
||||||
during the replication process. The default is master.info in the data
|
during the replication process. The default is master.info in the data
|
||||||
directory. Sasha: The only reason I see for ever changing the default
|
directory. Sasha: The only reason I see for ever changing the default
|
||||||
is the desire to be rebelious. (Example:
|
is the desire to be rebelious.
|
||||||
@code{master-info-file=master.info})
|
|
||||||
|
Example: @code{master-info-file=master.info}.
|
||||||
|
|
||||||
@item @code{replicate-do-table=db_name.table_name} @tab
|
@item @code{replicate-do-table=db_name.table_name} @tab
|
||||||
Tells the slave thread to restrict replication to the specified database.
|
Tells the slave thread to restrict replication to the specified table.
|
||||||
To specify more than one table, use the directive multiple times,
|
To specify more than one table, use the directive multiple times, once
|
||||||
once for each table. .
|
for each table. This will work for cross-database updates, in
|
||||||
(Example: @code{replicate-do-table=some_db.some_table})
|
contrast to @code{replicate-do-db}.
|
||||||
|
|
||||||
|
Example: @code{replicate-do-table=some_db.some_table}.
|
||||||
|
|
||||||
@item @code{replicate-ignore-table=db_name.table_name} @tab
|
@item @code{replicate-ignore-table=db_name.table_name} @tab
|
||||||
Tells the slave thread to not replicate to the specified table. To
|
Tells the slave thread to not replicate to the specified table. To
|
||||||
specify more than one table to ignore, use the directive multiple
|
specify more than one table to ignore, use the directive multiple times,
|
||||||
times, once for each table.(Example:
|
once for each table. This will work for cross-datbase updates,
|
||||||
@code{replicate-ignore-table=db_name.some_table})
|
in contrast to @code{replicate-ignore-db}.
|
||||||
|
|
||||||
|
Example: @code{replicate-ignore-table=db_name.some_table}.
|
||||||
|
|
||||||
@item @code{replicate-wild-do-table=db_name.table_name} @tab
|
@item @code{replicate-wild-do-table=db_name.table_name} @tab
|
||||||
Tells the slave thread to restrict replication to the tables that match the
|
Tells the slave thread to restrict replication to the tables that match
|
||||||
specified wildcard pattern. .
|
the specified wildcard pattern. To specify more than one table, use the
|
||||||
To specify more than one table, use the directive multiple times,
|
directive multiple times, once for each table. This will work for
|
||||||
once for each table. .
|
cross-database updates.
|
||||||
(Example: @code{replicate-do-table=foo%.bar%} will replicate only updates
|
|
||||||
|
Example: @code{replicate-wild-do-table=foo%.bar%} will replicate only updates
|
||||||
to tables in all databases that start with foo and whose table names
|
to tables in all databases that start with foo and whose table names
|
||||||
start with bar)
|
start with bar.
|
||||||
|
|
||||||
@item @code{replicate-wild-ignore-table=db_name.table_name} @tab
|
@item @code{replicate-wild-ignore-table=db_name.table_name} @tab
|
||||||
Tells the slave thread to not replicate to the tables that match the given
|
Tells the slave thread to not replicate to the tables that match the
|
||||||
wild card pattern. To
|
given wild card pattern. To specify more than one table to ignore, use
|
||||||
specify more than one table to ignore, use the directive multiple
|
the directive multiple times, once for each table. This will work for
|
||||||
times, once for each table.(Example:
|
cross-database updates.
|
||||||
@code{replicate-ignore-table=foo%.bar%} - will not upates to tables in all databases that start with foo and whose table names
|
|
||||||
start with bar)
|
Example: @code{replicate-wild-ignore-table=foo%.bar%} will not do updates
|
||||||
|
to tables in databases that start with foo and whose table names start
|
||||||
|
with bar.
|
||||||
|
|
||||||
@item @code{replicate-ignore-db=database_name} @tab
|
@item @code{replicate-ignore-db=database_name} @tab
|
||||||
Tells the slave thread to not replicate to the specified database. To
|
Tells the slave thread to not replicate to the specified database. To
|
||||||
@@ -23693,19 +23729,21 @@ specify more than one database to ignore, use the directive multiple
|
|||||||
times, once for each database. This option will not work if you use cross
|
times, once for each database. This option will not work if you use cross
|
||||||
database updates. If you need cross database updates to work, make sure
|
database updates. If you need cross database updates to work, make sure
|
||||||
you have 3.23.28 or later, and use
|
you have 3.23.28 or later, and use
|
||||||
@code{replicate-wild-ignore-table=db_name.%}(Example:
|
@code{replicate-wild-ignore-table=db_name.%}
|
||||||
@code{replicate-ignore-db=some_db})
|
|
||||||
|
Example: @code{replicate-ignore-db=some_db}.
|
||||||
|
|
||||||
@item @code{replicate-do-db=database_name} @tab
|
@item @code{replicate-do-db=database_name} @tab
|
||||||
Tells the slave thread to restrict replication to the specified database.
|
|
||||||
To specify more than one database, use the directive multiple times,
|
Tells the slave thread to restrict replication to the specified
|
||||||
once for each database. Note that this will only work if you do not use
|
database. To specify more than one database, use the directive multiple
|
||||||
cross-database queries such as @code{UPDATE some_db.some_table SET
|
times, once for each database. Note that this will only work if you do
|
||||||
foo='bar'} while having selected a different or no database. If you need
|
not use cross-database queries such as @code{UPDATE some_db.some_table
|
||||||
cross database updates to work, make sure
|
SET foo='bar'} while having selected a different or no database. If you
|
||||||
you have 3.23.28 or later, and use
|
need cross database updates to work, make sure you have 3.23.28 or
|
||||||
@code{replicate-wild-do-table=db_name.%}
|
later, and use @code{replicate-wild-do-table=db_name.%}
|
||||||
(Example: @code{replicate-do-db=some_db})
|
|
||||||
|
Example: @code{replicate-do-db=some_db}.
|
||||||
|
|
||||||
@item @code{log-slave-updates} @tab
|
@item @code{log-slave-updates} @tab
|
||||||
Tells the slave to log the updates from the slave thread to the binary
|
Tells the slave to log the updates from the slave thread to the binary
|
||||||
@@ -23713,8 +23751,9 @@ log. Off by default. You will need to turn it on if you plan to
|
|||||||
daisy-chain the slaves.
|
daisy-chain the slaves.
|
||||||
|
|
||||||
@item @code{replicate-rewrite-db=from_name->to_name} @tab
|
@item @code{replicate-rewrite-db=from_name->to_name} @tab
|
||||||
Updates to a database with a different name than the original (Example:
|
Updates to a database with a different name than the original
|
||||||
@code{replicate-rewrite-db=master_db_name->slave_db_name}
|
|
||||||
|
Example: @code{replicate-rewrite-db=master_db_name->slave_db_name}.
|
||||||
|
|
||||||
@item @code{skip-slave-start} @tab
|
@item @code{skip-slave-start} @tab
|
||||||
Tells the slave server not to start the slave on the startup. The user
|
Tells the slave server not to start the slave on the startup. The user
|
||||||
@@ -32578,9 +32617,6 @@ tblTemp1.fldOrder_ID > 100;
|
|||||||
The following conditions hold for an @code{INSERT ... SELECT} statement:
|
The following conditions hold for an @code{INSERT ... SELECT} statement:
|
||||||
|
|
||||||
@itemize @minus
|
@itemize @minus
|
||||||
@item
|
|
||||||
The query cannot contain an @code{ORDER BY} clause.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
The target table of the @code{INSERT} statement cannot appear in the
|
The target table of the @code{INSERT} statement cannot appear in the
|
||||||
@code{FROM} clause of the @code{SELECT} part of the query because it's
|
@code{FROM} clause of the @code{SELECT} part of the query because it's
|
||||||
@@ -38964,9 +39000,10 @@ likely it is that we can fix the problem!
|
|||||||
* C API datatypes:: C API Datatypes
|
* C API datatypes:: C API Datatypes
|
||||||
* C API function overview:: C API Function Overview
|
* C API function overview:: C API Function Overview
|
||||||
* C API functions:: C API Function Descriptions
|
* C API functions:: C API Function Descriptions
|
||||||
|
* C Thread functions::
|
||||||
* C API problems:: Common questions and problems when using the C API
|
* C API problems:: Common questions and problems when using the C API
|
||||||
* Building clients:: Building Client Programs
|
* Building clients:: Building Client Programs
|
||||||
* Thread-safe clients:: How to Make a Thread-safe Client
|
* Threaded clients:: How to Make a Threaded Client
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
The C API code is distributed with MySQL. It is included in the
|
The C API code is distributed with MySQL. It is included in the
|
||||||
@@ -39007,7 +39044,7 @@ the buffer associated with a connection is not decreased until the connection
|
|||||||
is closed, at which time client memory is reclaimed.
|
is closed, at which time client memory is reclaimed.
|
||||||
|
|
||||||
For programming with threads, consult the 'how to make a thread-safe
|
For programming with threads, consult the 'how to make a thread-safe
|
||||||
client' chapter. @xref{Thread-safe clients}.
|
client' chapter. @xref{Threaded clients}.
|
||||||
|
|
||||||
|
|
||||||
@node C API datatypes, C API function overview, C, C
|
@node C API datatypes, C API function overview, C, C
|
||||||
@@ -39455,7 +39492,7 @@ recently invoked function that can succeed or fail, allowing you to determine
|
|||||||
when an error occurred and what it was.
|
when an error occurred and what it was.
|
||||||
|
|
||||||
|
|
||||||
@node C API functions, C API problems, C API function overview, C
|
@node C API functions, C Thread functions, C API function overview, C
|
||||||
@subsection C API Function Descriptions
|
@subsection C API Function Descriptions
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
@@ -40373,7 +40410,7 @@ of @code{mysql_field_count()} whether or not the statement was a
|
|||||||
|
|
||||||
@code{MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)}
|
@code{MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)}
|
||||||
|
|
||||||
* Thread-safe clients:: How to Make a Thread-safe Client
|
* Threaded clients:: How to Make a Threaded Client
|
||||||
@subsubheading Description
|
@subsubheading Description
|
||||||
|
|
||||||
Sets the field cursor to the given offset. The next call to
|
Sets the field cursor to the given offset. The next call to
|
||||||
@@ -41650,8 +41687,71 @@ The connection to the server was lost during the query.
|
|||||||
An unknown error occurred.
|
An unknown error occurred.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@node C Thread functions, C API problems, C API functions, C
|
||||||
|
@subsection C Threaded Function Descriptions
|
||||||
|
|
||||||
@node C API problems, Building clients, C API functions, C
|
You need to use the following functions when you want to create a
|
||||||
|
threaded client. @xref{Threaded clients}.
|
||||||
|
|
||||||
|
@menu
|
||||||
|
* my_init::
|
||||||
|
* my_thread_init()::
|
||||||
|
* my_thread_end()::
|
||||||
|
@end menu
|
||||||
|
|
||||||
|
@node my_init, my_thread_init(), C Thread functions, C Thread functions
|
||||||
|
@subsubsection @code{my_init()}
|
||||||
|
|
||||||
|
@findex @code{my_init()}
|
||||||
|
|
||||||
|
@subsubheading Description
|
||||||
|
|
||||||
|
This function needs to be called once in the program before calling any
|
||||||
|
MySQL function. This initializes some global variables that MySQL
|
||||||
|
needs. If you are using a thread safe client library, this will also
|
||||||
|
call @code{my_thread_init()} for this thread.
|
||||||
|
|
||||||
|
This is automaticly called by @code{mysql_init()}
|
||||||
|
and @code{mysql_connect()}.
|
||||||
|
|
||||||
|
@subsubheading Return Values
|
||||||
|
|
||||||
|
none.
|
||||||
|
|
||||||
|
@node my_thread_init(), my_thread_end(), my_init, C Thread functions
|
||||||
|
@subsubsection @code{my_thread_init()}
|
||||||
|
|
||||||
|
@findex @code{my_thread_init()}
|
||||||
|
|
||||||
|
@subsubheading Description
|
||||||
|
|
||||||
|
This function needs to be called for each created thread to initialize
|
||||||
|
thread specific variables.
|
||||||
|
|
||||||
|
This is automaticly called by @code{my_init()} and @code{mysql_connect()}.
|
||||||
|
|
||||||
|
@subsubheading Return Values
|
||||||
|
|
||||||
|
none.
|
||||||
|
|
||||||
|
@node my_thread_end(), , my_thread_init(), C Thread functions
|
||||||
|
@subsubsection @code{my_thread_end()}
|
||||||
|
|
||||||
|
@findex @code{my_thread_end()}
|
||||||
|
|
||||||
|
@subsubheading Description
|
||||||
|
|
||||||
|
This function needs to be called before calling @code{pthread_exit()} to
|
||||||
|
freed memory allocated by @code{my_thread_init()}.
|
||||||
|
|
||||||
|
Note that this function is NOT invoked automaticly be the client
|
||||||
|
library!
|
||||||
|
|
||||||
|
@subsubheading Return Values
|
||||||
|
|
||||||
|
none.
|
||||||
|
|
||||||
|
@node C API problems, Building clients, C Thread functions, C
|
||||||
@subsection Common questions and problems when using the C API
|
@subsection Common questions and problems when using the C API
|
||||||
|
|
||||||
@tindex @code{mysql_query()}
|
@tindex @code{mysql_query()}
|
||||||
@@ -41806,7 +41906,7 @@ If this happens on your system, you must include the math library by
|
|||||||
adding @code{-lm} to the end of the compile/link line.
|
adding @code{-lm} to the end of the compile/link line.
|
||||||
|
|
||||||
|
|
||||||
@node Building clients, Thread-safe clients, C API problems, C
|
@node Building clients, Threaded clients, C API problems, C
|
||||||
@subsection Building Client Programs
|
@subsection Building Client Programs
|
||||||
|
|
||||||
@cindex client programs, building
|
@cindex client programs, building
|
||||||
@@ -41827,11 +41927,11 @@ For clients that use MySQL header files, you may need to specify a
|
|||||||
files.
|
files.
|
||||||
|
|
||||||
|
|
||||||
@node Thread-safe clients, , Building clients, C
|
@node Threaded clients, , Building clients, C
|
||||||
@subsection How to Make a Thread-safe Client
|
@subsection How to Make a Threaded Client
|
||||||
|
|
||||||
@cindex clients, thread-safe
|
@cindex clients, threaded
|
||||||
@cindex thread-safe clients
|
@cindex threaded clients
|
||||||
|
|
||||||
The client library is almost thread safe. The biggest problem is
|
The client library is almost thread safe. The biggest problem is
|
||||||
that the subroutines in @file{net.c} that read from sockets are not
|
that the subroutines in @file{net.c} that read from sockets are not
|
||||||
@@ -41846,20 +41946,21 @@ Windows binaries are by default compiled to be thread safe).
|
|||||||
Newer binary distributions should have both a normal and a
|
Newer binary distributions should have both a normal and a
|
||||||
thread-safe client library.
|
thread-safe client library.
|
||||||
|
|
||||||
To get a really thread-safe client where you can interrupt the client
|
To get a threaded client where you can interrupt the client from other
|
||||||
from other threads and set timeouts when talking with the MySQL
|
threads and set timeouts when talking with the MySQL server, you should
|
||||||
server, you should use the @code{-lmysys}, @code{-lstring}, and @code{-ldbug}
|
use the @code{-lmysys}, @code{-lstring}, and @code{-ldbug} libraries and
|
||||||
libraries and the @code{net_serv.o} code that the server uses.
|
the @code{net_serv.o} code that the server uses.
|
||||||
|
|
||||||
If you don't need interrupts or timeouts, you can just compile a thread
|
If you don't need interrupts or timeouts, you can just compile a thread
|
||||||
safe client library @code{(mysqlclient_r)} and use this. @xref{C,,
|
safe client library @code{(mysqlclient_r)} and use this. @xref{C,,
|
||||||
MySQL C API}. In this case you don't have to worry about the
|
MySQL C API}. In this case you don't have to worry about the
|
||||||
@code{net_serv.o} object file or the other MySQL libraries.
|
@code{net_serv.o} object file or the other MySQL libraries.
|
||||||
|
|
||||||
When using a threaded client and you want to use timeouts and interrupts,
|
When using a threaded client and you want to use timeouts and
|
||||||
you can make great use of the routines in the @file{thr_alarm.c} file.
|
interrupts, you can make great use of the routines in the
|
||||||
If you are using routines from the @code{mysys} library, the only thing
|
@file{thr_alarm.c} file. If you are using routines from the
|
||||||
you must remember is to call @code{my_init()} first!
|
@code{mysys} library, the only thing you must remember is to call
|
||||||
|
@code{my_init()} first! @xref{C Thread functions}.
|
||||||
|
|
||||||
All functions except @code{mysql_real_connect()} are by default
|
All functions except @code{mysql_real_connect()} are by default
|
||||||
thread safe. The following notes describe how to compile a thread safe
|
thread safe. The following notes describe how to compile a thread safe
|
||||||
@@ -41906,11 +42007,38 @@ If you program with POSIX threads, you can use
|
|||||||
establish and release a mutex lock.
|
establish and release a mutex lock.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
You need to know the following if you have a thread that is calling
|
||||||
|
MySQL functions, but that thread has not created the connection to the
|
||||||
|
MySQL database:
|
||||||
|
|
||||||
|
When you call @code{mysql_init()} or @code{mysql_connect()}, MySQL will
|
||||||
|
create a thread specific variable for the thread that is used by the
|
||||||
|
debug library (among other things).
|
||||||
|
|
||||||
|
If you have in a thread call a MySQL function, before a thread has
|
||||||
|
called @code{mysql_init()} or @code{mysql_connect()}, the thread will
|
||||||
|
not have the necessary thread specific variables in place and you are
|
||||||
|
likely to end up with a core dump sooner or later.
|
||||||
|
|
||||||
|
The get things to work smoothly you have to do the following:
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
@item
|
||||||
|
Call @code{my_init()} at the start of your program if it calls
|
||||||
|
any other MySQL function before calling @code{mysql_real_connect()}.
|
||||||
|
@item
|
||||||
|
Call @code{my_thread_init()} in the thread handler before calling
|
||||||
|
any MySQL function.
|
||||||
|
@item
|
||||||
|
In the thread, call @code{my_thread_end()} before calling
|
||||||
|
@code{pthread_exit()}. This will free the memory used by MySQL thread
|
||||||
|
specific variables.
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
You may get some errors because of undefined symbols when linking your
|
You may get some errors because of undefined symbols when linking your
|
||||||
client with @code{mysqlclient_r}. In most cases this is because you haven't
|
client with @code{mysqlclient_r}. In most cases this is because you haven't
|
||||||
included the thread libraries on the link/compile line.
|
included the thread libraries on the link/compile line.
|
||||||
|
|
||||||
|
|
||||||
@node Cplusplus, Java, C, Clients
|
@node Cplusplus, Java, C, Clients
|
||||||
@section MySQL C++ APIs
|
@section MySQL C++ APIs
|
||||||
|
|
||||||
@@ -44221,34 +44349,6 @@ thread that is waiting on the disk-full condition will allow the other
|
|||||||
threads to continue.
|
threads to continue.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
You need to know the following if you have a thread that is calling
|
|
||||||
MySQL functions, but that thread has not created the connection to the
|
|
||||||
MySQL database:
|
|
||||||
|
|
||||||
When you call @code{mysql_init()} or @code{mysql_connect()}, MySQL will
|
|
||||||
create a thread specific variable for the thread that is used by the
|
|
||||||
debug library (among other things).
|
|
||||||
|
|
||||||
If you have in a thread call a MySQL function, before a thread has
|
|
||||||
called @code{mysql_init()} or @code{mysql_connect()}, the thread will
|
|
||||||
not have the necessary thread specific variables in place and you are
|
|
||||||
likely to end up with a core dump sooner or later.
|
|
||||||
|
|
||||||
The get things to work smoothly you have to do the following:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
Call @code{my_init()} at the start of your program if it calls
|
|
||||||
any other MySQL function before calling @code{mysql_real_connect()}.
|
|
||||||
@item
|
|
||||||
Call @code{my_thread_init()} in the thread handler before calling
|
|
||||||
any MySQL function.
|
|
||||||
@item
|
|
||||||
In the thread, call @code{my_thread_end()} before calling
|
|
||||||
@code{pthread_exit()}. This will free the memory used by MySQL thread
|
|
||||||
specific variables.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
Exceptions to the above behaveour is when you use @code{REPAIR} or
|
Exceptions to the above behaveour is when you use @code{REPAIR} or
|
||||||
@code{OPTIMIZE} or when the indexes are created in a batch after an
|
@code{OPTIMIZE} or when the indexes are created in a batch after an
|
||||||
@code{LOAD DATA INFILE} or after an @code{ALTER TABLE} statement.
|
@code{LOAD DATA INFILE} or after an @code{ALTER TABLE} statement.
|
||||||
@@ -46707,6 +46807,11 @@ not yet 100% confident in this code.
|
|||||||
@appendixsubsec Changes in release 3.23.42
|
@appendixsubsec Changes in release 3.23.42
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
Fixed problem when using @code{LOCK TABLES} and @code{BDB} tables.
|
||||||
|
@item
|
||||||
|
Fixed problem with @code{REPAIR TABLE} on MyISAM tables with row lengths
|
||||||
|
between 65517 - 65520 bytes
|
||||||
|
@item
|
||||||
Fixed rare hang when doing @code{mysqladmin shutdown} when there was
|
Fixed rare hang when doing @code{mysqladmin shutdown} when there was
|
||||||
a lot of activity in other threads.
|
a lot of activity in other threads.
|
||||||
@item
|
@item
|
||||||
|
@@ -47,7 +47,7 @@ __os_rename(dbenv, old, new)
|
|||||||
*/
|
*/
|
||||||
if (MoveFileEx(old, new, MOVEFILE_REPLACE_EXISTING) != TRUE)
|
if (MoveFileEx(old, new, MOVEFILE_REPLACE_EXISTING) != TRUE)
|
||||||
ret = __os_win32_errno();
|
ret = __os_win32_errno();
|
||||||
if (ret == ENOENT && MoveFile(old, new) == TRUE)
|
if ((ret == ENOENT || ret == EIO) && MoveFile(old, new) == TRUE)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
@@ -797,10 +797,8 @@ case $SYSTEM_TYPE in
|
|||||||
*darwin*)
|
*darwin*)
|
||||||
if test "$ac_cv_prog_gcc" = "yes"
|
if test "$ac_cv_prog_gcc" = "yes"
|
||||||
then
|
then
|
||||||
CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS"
|
CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
|
||||||
CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS"
|
CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
|
||||||
CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE"
|
|
||||||
CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE"
|
|
||||||
MAX_C_OPTIMIZE="-O"
|
MAX_C_OPTIMIZE="-O"
|
||||||
with_named_curses=""
|
with_named_curses=""
|
||||||
fi
|
fi
|
||||||
|
@@ -66,7 +66,7 @@ extern void _db_unlock_file();
|
|||||||
#define DEBUGGER_ON _no_db_=0
|
#define DEBUGGER_ON _no_db_=0
|
||||||
#define DBUG_LOCK_FILE { _db_lock_file(); }
|
#define DBUG_LOCK_FILE { _db_lock_file(); }
|
||||||
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
|
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
|
||||||
#define DBUG_ASSERT(A) A
|
#define DBUG_ASSERT(A) assert(A)
|
||||||
#else /* No debugger */
|
#else /* No debugger */
|
||||||
|
|
||||||
#define DBUG_ENTER(a1)
|
#define DBUG_ENTER(a1)
|
||||||
|
@@ -146,6 +146,7 @@ int pthread_mutex_destroy (pthread_mutex_t *);
|
|||||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||||
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
|
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
|
||||||
#define pthread_kill(A,B) pthread_dummy(0)
|
#define pthread_kill(A,B) pthread_dummy(0)
|
||||||
|
#define pthread_exit(A) pthread_dummy()
|
||||||
#endif /* OS2 */
|
#endif /* OS2 */
|
||||||
|
|
||||||
/* Dummy defines for easier code */
|
/* Dummy defines for easier code */
|
||||||
|
@@ -33,7 +33,7 @@ const char *my_raid_type(int raid_type);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_RAID
|
#if defined(USE_RAID) && !defined(DONT_USE_RAID)
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma interface /* gcc class implementation */
|
#pragma interface /* gcc class implementation */
|
||||||
|
@@ -470,7 +470,8 @@ dtuple_convert_big_rec(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (longest < BTR_EXTERN_FIELD_REF_SIZE + 10) {
|
if (longest < BTR_EXTERN_FIELD_REF_SIZE + 10
|
||||||
|
+ REC_1BYTE_OFFS_LIMIT) {
|
||||||
|
|
||||||
/* Cannot shorten more */
|
/* Cannot shorten more */
|
||||||
|
|
||||||
@@ -479,26 +480,18 @@ dtuple_convert_big_rec(
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move data from field longest_i to big rec vector,
|
/* Move data from field longest_i to big rec vector;
|
||||||
but do not let data size of the remaining entry
|
we do not let data size of the remaining entry
|
||||||
drop below 128 which is the limit for the 2-byte
|
drop below 128 which is the limit for the 2-byte
|
||||||
offset storage format in a physical record */
|
offset storage format in a physical record. This
|
||||||
|
we accomplish by storing 128 bytes of data in entry
|
||||||
|
itself, and only the remaining part to big rec vec. */
|
||||||
|
|
||||||
dfield = dtuple_get_nth_field(entry, longest_i);
|
dfield = dtuple_get_nth_field(entry, longest_i);
|
||||||
vector->fields[n_fields].field_no = longest_i;
|
vector->fields[n_fields].field_no = longest_i;
|
||||||
|
|
||||||
if (dtuple_get_data_size(entry) - dfield->len
|
vector->fields[n_fields].len = dfield->len
|
||||||
<= REC_1BYTE_OFFS_LIMIT) {
|
|
||||||
vector->fields[n_fields].len =
|
|
||||||
dtuple_get_data_size(entry)
|
|
||||||
- REC_1BYTE_OFFS_LIMIT;
|
- REC_1BYTE_OFFS_LIMIT;
|
||||||
/* Since dfield will contain at least
|
|
||||||
a 20-byte reference to the extern storage,
|
|
||||||
we know that the data size of entry will be
|
|
||||||
> REC_1BYTE_OFFS_LIMIT */
|
|
||||||
} else {
|
|
||||||
vector->fields[n_fields].len = dfield->len;
|
|
||||||
}
|
|
||||||
|
|
||||||
vector->fields[n_fields].data = mem_heap_alloc(heap,
|
vector->fields[n_fields].data = mem_heap_alloc(heap,
|
||||||
vector->fields[n_fields].len);
|
vector->fields[n_fields].len);
|
||||||
|
@@ -397,6 +397,8 @@ struct trx_struct{
|
|||||||
wait_thrs; /* query threads belonging to this
|
wait_thrs; /* query threads belonging to this
|
||||||
trx that are in the QUE_THR_LOCK_WAIT
|
trx that are in the QUE_THR_LOCK_WAIT
|
||||||
state */
|
state */
|
||||||
|
ulint deadlock_mark; /* a mark field used in deadlock
|
||||||
|
checking algorithm */
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
mem_heap_t* lock_heap; /* memory heap for the locks of the
|
mem_heap_t* lock_heap; /* memory heap for the locks of the
|
||||||
transaction; protected by
|
transaction; protected by
|
||||||
|
@@ -15,6 +15,10 @@ Created 5/7/1996 Heikki Tuuri
|
|||||||
#include "usr0sess.h"
|
#include "usr0sess.h"
|
||||||
#include "trx0purge.h"
|
#include "trx0purge.h"
|
||||||
|
|
||||||
|
/* Restricts the length of search we will do in the waits-for
|
||||||
|
graph of transactions */
|
||||||
|
#define LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK 1000000
|
||||||
|
|
||||||
/* When releasing transaction locks, this specifies how often we release
|
/* When releasing transaction locks, this specifies how often we release
|
||||||
the kernel mutex for a moment to give also others access to it */
|
the kernel mutex for a moment to give also others access to it */
|
||||||
|
|
||||||
@@ -312,11 +316,14 @@ static
|
|||||||
ibool
|
ibool
|
||||||
lock_deadlock_recursive(
|
lock_deadlock_recursive(
|
||||||
/*====================*/
|
/*====================*/
|
||||||
/* out: TRUE if a deadlock was detected */
|
/* out: TRUE if a deadlock was detected
|
||||||
|
or the calculation took too long */
|
||||||
trx_t* start, /* in: recursion starting point */
|
trx_t* start, /* in: recursion starting point */
|
||||||
trx_t* trx, /* in: a transaction waiting for a lock */
|
trx_t* trx, /* in: a transaction waiting for a lock */
|
||||||
lock_t* wait_lock); /* in: the lock trx is waiting to be granted */
|
lock_t* wait_lock, /* in: the lock trx is waiting to be granted */
|
||||||
|
ulint* cost); /* in/out: number of calculation steps thus
|
||||||
|
far: if this exceeds LOCK_MAX_N_STEPS_...
|
||||||
|
we return TRUE */
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Reserves the kernel mutex. This function is used in this module to allow
|
Reserves the kernel mutex. This function is used in this module to allow
|
||||||
monitoring the contention degree on the kernel mutex caused by the lock
|
monitoring the contention degree on the kernel mutex caused by the lock
|
||||||
@@ -2655,12 +2662,25 @@ lock_deadlock_occurs(
|
|||||||
{
|
{
|
||||||
dict_table_t* table;
|
dict_table_t* table;
|
||||||
dict_index_t* index;
|
dict_index_t* index;
|
||||||
|
trx_t* mark_trx;
|
||||||
ibool ret;
|
ibool ret;
|
||||||
|
ulint cost = 0;
|
||||||
|
|
||||||
ut_ad(trx && lock);
|
ut_ad(trx && lock);
|
||||||
ut_ad(mutex_own(&kernel_mutex));
|
ut_ad(mutex_own(&kernel_mutex));
|
||||||
|
|
||||||
ret = lock_deadlock_recursive(trx, trx, lock);
|
/* We check that adding this trx to the waits-for graph
|
||||||
|
does not produce a cycle. First mark all active transactions
|
||||||
|
with 0: */
|
||||||
|
|
||||||
|
mark_trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
|
||||||
|
|
||||||
|
while (mark_trx) {
|
||||||
|
mark_trx->deadlock_mark = 0;
|
||||||
|
mark_trx = UT_LIST_GET_NEXT(trx_list, mark_trx);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = lock_deadlock_recursive(trx, trx, lock, &cost);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (lock_get_type(lock) == LOCK_TABLE) {
|
if (lock_get_type(lock) == LOCK_TABLE) {
|
||||||
@@ -2685,10 +2705,14 @@ static
|
|||||||
ibool
|
ibool
|
||||||
lock_deadlock_recursive(
|
lock_deadlock_recursive(
|
||||||
/*====================*/
|
/*====================*/
|
||||||
/* out: TRUE if a deadlock was detected */
|
/* out: TRUE if a deadlock was detected
|
||||||
|
or the calculation took too long */
|
||||||
trx_t* start, /* in: recursion starting point */
|
trx_t* start, /* in: recursion starting point */
|
||||||
trx_t* trx, /* in: a transaction waiting for a lock */
|
trx_t* trx, /* in: a transaction waiting for a lock */
|
||||||
lock_t* wait_lock) /* in: the lock trx is waiting to be granted */
|
lock_t* wait_lock, /* in: the lock trx is waiting to be granted */
|
||||||
|
ulint* cost) /* in/out: number of calculation steps thus
|
||||||
|
far: if this exceeds LOCK_MAX_N_STEPS_...
|
||||||
|
we return TRUE */
|
||||||
{
|
{
|
||||||
lock_t* lock;
|
lock_t* lock;
|
||||||
ulint bit_no;
|
ulint bit_no;
|
||||||
@@ -2697,6 +2721,20 @@ lock_deadlock_recursive(
|
|||||||
ut_a(trx && start && wait_lock);
|
ut_a(trx && start && wait_lock);
|
||||||
ut_ad(mutex_own(&kernel_mutex));
|
ut_ad(mutex_own(&kernel_mutex));
|
||||||
|
|
||||||
|
if (trx->deadlock_mark == 1) {
|
||||||
|
/* We have already exhaustively searched the subtree starting
|
||||||
|
from this trx */
|
||||||
|
|
||||||
|
return(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
*cost = *cost + 1;
|
||||||
|
|
||||||
|
if (*cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK) {
|
||||||
|
|
||||||
|
return(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
lock = wait_lock;
|
lock = wait_lock;
|
||||||
|
|
||||||
if (lock_get_type(wait_lock) == LOCK_REC) {
|
if (lock_get_type(wait_lock) == LOCK_REC) {
|
||||||
@@ -2719,6 +2757,8 @@ lock_deadlock_recursive(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lock == NULL) {
|
if (lock == NULL) {
|
||||||
|
/* We can mark this subtree as searched */
|
||||||
|
trx->deadlock_mark = 1;
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -2742,7 +2782,7 @@ lock_deadlock_recursive(
|
|||||||
a lock */
|
a lock */
|
||||||
|
|
||||||
if (lock_deadlock_recursive(start, lock_trx,
|
if (lock_deadlock_recursive(start, lock_trx,
|
||||||
lock_trx->wait_lock)) {
|
lock_trx->wait_lock, cost)) {
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
# This file is public domain and comes with NO WARRANTY of any kind
|
# This file is public domain and comes with NO WARRANTY of any kind
|
||||||
|
|
||||||
target = libmysqlclient.la
|
target = libmysqlclient.la
|
||||||
target_defs = -DUNDEF_THREADS_HACK
|
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
INCLUDES = -I$(srcdir)/../include -I../include \
|
INCLUDES = -I$(srcdir)/../include -I../include \
|
||||||
-I$(srcdir)/.. -I$(top_srcdir) -I..
|
-I$(srcdir)/.. -I$(top_srcdir) -I..
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
MA 02111-1307, USA */
|
MA 02111-1307, USA */
|
||||||
|
|
||||||
#define DONT_USE_RAID
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#if defined(__WIN__) || defined(_WIN32) || defined(_WIN64)
|
#if defined(__WIN__) || defined(_WIN32) || defined(_WIN64)
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
target = libmysqlclient_r.la
|
target = libmysqlclient_r.la
|
||||||
target_defs =
|
target_defs = -DDONT_USE_RAID
|
||||||
## LIBS = @LIBS@
|
## LIBS = @LIBS@
|
||||||
|
|
||||||
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \
|
INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \
|
||||||
|
@@ -2480,7 +2480,7 @@ int sort_write_record(SORT_INFO *sort_info)
|
|||||||
info->checksum=mi_checksum(info,sort_info->record);
|
info->checksum=mi_checksum(info,sort_info->record);
|
||||||
reclength=_mi_rec_pack(info,from,sort_info->record);
|
reclength=_mi_rec_pack(info,from,sort_info->record);
|
||||||
info->s->state.checksum+=info->checksum;
|
info->s->state.checksum+=info->checksum;
|
||||||
block_length=reclength+ 3 +test(reclength > 65532L);
|
block_length=reclength+ 3 + test(reclength >= (65520-3));
|
||||||
if (block_length < share->base.min_block_length)
|
if (block_length < share->base.min_block_length)
|
||||||
block_length=share->base.min_block_length;
|
block_length=share->base.min_block_length;
|
||||||
flag=0;
|
flag=0;
|
||||||
|
@@ -178,7 +178,7 @@ static int _mi_find_writepos(MI_INFO *info,
|
|||||||
{
|
{
|
||||||
/* No deleted blocks; Allocate a new block */
|
/* No deleted blocks; Allocate a new block */
|
||||||
*filepos=info->state->data_file_length;
|
*filepos=info->state->data_file_length;
|
||||||
if ((*length=reclength+3 + test(reclength > 65520)) <
|
if ((*length=reclength+3 + test(reclength >= (65520-3))) <
|
||||||
info->s->base.min_block_length)
|
info->s->base.min_block_length)
|
||||||
*length=info->s->base.min_block_length;
|
*length=info->s->base.min_block_length;
|
||||||
else
|
else
|
||||||
|
@@ -524,3 +524,6 @@ a b a b
|
|||||||
a b
|
a b
|
||||||
1 1
|
1 1
|
||||||
1 2
|
1 2
|
||||||
|
id id2 id3 dummy1
|
||||||
|
id id2 id3 dummy1
|
||||||
|
NULL NULL NULL NULL
|
||||||
|
10
mysql-test/r/isam.result
Normal file
10
mysql-test/r/isam.result
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
@@ -1,2 +1,12 @@
|
|||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
@@ -727,13 +727,24 @@ DROP TABLE t1,t2;
|
|||||||
# Test problem with joining table to itself on a multi-part unique key
|
# Test problem with joining table to itself on a multi-part unique key
|
||||||
#
|
#
|
||||||
|
|
||||||
drop table if exists t;
|
drop table if exists t1;
|
||||||
create table t (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb;
|
create table t1 (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb;
|
||||||
|
insert into t1 values (1,1), (1,2);
|
||||||
|
select * from t1 where a = 1;
|
||||||
|
select t1.*, t2.* from t1, t1 t2 where t1.a = t2.a and t2.a = 1;
|
||||||
|
select * from t1 where a = 1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
insert into t values (1,1), (1,2);
|
#
|
||||||
|
# This caused a deadlock in BDB internal locks
|
||||||
|
#
|
||||||
|
|
||||||
select * from t where a = 1;
|
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=bdb;
|
||||||
select t1.*, t2.* from t t1, t t2 where t1.a = t2.a and t2.a = 1;
|
insert into t1 values (0,0,0,'ABCDEFGHIJ');
|
||||||
select * from t where a = 1;
|
create table t2 (id int NOT NULL,primary key (id)) type=bdb;
|
||||||
|
LOCK TABLES t1 WRITE, t2 WRITE;
|
||||||
drop table t;
|
insert into t2 values(1);
|
||||||
|
SELECT t1.* FROM t1 WHERE id IN (1);
|
||||||
|
SELECT t1.* FROM t2 left outer join t1 on (t1.id=t2.id);
|
||||||
|
delete from t1 where id3 >= 0 and id3 <= 0;
|
||||||
|
drop table t1,t2;
|
||||||
|
19
mysql-test/t/isam.test
Normal file
19
mysql-test/t/isam.test
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Test possible problem with rows that are about 65535 bytes long
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
|
||||||
|
|
||||||
|
let $1=100;
|
||||||
|
while ($1)
|
||||||
|
{
|
||||||
|
eval insert into t1 (b) values(repeat(char(65+$1),65540-$1));
|
||||||
|
dec $1;
|
||||||
|
}
|
||||||
|
check table t1;
|
||||||
|
repair table t1;
|
||||||
|
delete from t1 where (a & 1);
|
||||||
|
check table t1;
|
||||||
|
repair table t1;
|
||||||
|
check table t1;
|
||||||
|
drop table t1;
|
@@ -16,3 +16,23 @@ INSERT INTO t1 VALUES ('HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
|
|||||||
INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW');
|
INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW');
|
||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test problem with rows that are 65517-65520 bytes long
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
|
||||||
|
|
||||||
|
let $1=100;
|
||||||
|
while ($1)
|
||||||
|
{
|
||||||
|
eval insert into t1 (b) values(repeat(char(65+$1),65550-$1));
|
||||||
|
dec $1;
|
||||||
|
}
|
||||||
|
check table t1;
|
||||||
|
repair table t1;
|
||||||
|
delete from t1 where (a & 1);
|
||||||
|
check table t1;
|
||||||
|
repair table t1;
|
||||||
|
check table t1;
|
||||||
|
drop table t1;
|
||||||
|
@@ -736,7 +736,7 @@ void thr_unlock(THR_LOCK_DATA *data)
|
|||||||
data->type == TL_WRITE_ALLOW_WRITE));
|
data->type == TL_WRITE_ALLOW_WRITE));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_PRINT("lock",("No locks to free"));
|
DBUG_PRINT("lock",("No waiting read locks to free"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data &&
|
else if (data &&
|
||||||
|
@@ -39,13 +39,21 @@ $opt_loop_count=10000; # Change this to make test harder/easier
|
|||||||
chomp($pwd = `pwd`); $pwd = "." if ($pwd eq '');
|
chomp($pwd = `pwd`); $pwd = "." if ($pwd eq '');
|
||||||
require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
|
require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
|
||||||
|
|
||||||
|
$create_loop_count=$opt_loop_count;
|
||||||
if ($opt_small_test)
|
if ($opt_small_test)
|
||||||
{
|
{
|
||||||
$opt_loop_count/=100;
|
$opt_loop_count/=100;
|
||||||
|
$create_loop_count/=1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_tables=min($limits->{'max_tables'},$opt_loop_count);
|
$max_tables=min($limits->{'max_tables'},$opt_loop_count);
|
||||||
|
|
||||||
|
if ($opt_small_test)
|
||||||
|
{
|
||||||
|
$max_tables=10;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print "Testing the speed of creating and droping tables\n";
|
print "Testing the speed of creating and droping tables\n";
|
||||||
print "Testing with $max_tables tables and $opt_loop_count loop count\n\n";
|
print "Testing with $max_tables tables and $opt_loop_count loop count\n\n";
|
||||||
|
|
||||||
@@ -177,7 +185,7 @@ print "Testing create+drop\n";
|
|||||||
|
|
||||||
$loop_time=new Benchmark;
|
$loop_time=new Benchmark;
|
||||||
|
|
||||||
for ($i=1 ; $i <= $opt_loop_count ; $i++)
|
for ($i=1 ; $i <= $create_loop_count ; $i++)
|
||||||
{
|
{
|
||||||
do_many($dbh,$server->create("bench_$i",
|
do_many($dbh,$server->create("bench_$i",
|
||||||
["i int NOT NULL",
|
["i int NOT NULL",
|
||||||
@@ -190,7 +198,7 @@ for ($i=1 ; $i <= $opt_loop_count ; $i++)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$end_time=new Benchmark;
|
$end_time=new Benchmark;
|
||||||
print "Time for create+drop ($opt_loop_count): " .
|
print "Time for create+drop ($create_loop_count): " .
|
||||||
timestr(timediff($end_time, $loop_time),"all") . "\n";
|
timestr(timediff($end_time, $loop_time),"all") . "\n";
|
||||||
|
|
||||||
if ($opt_fast && defined($server->{vacuum}))
|
if ($opt_fast && defined($server->{vacuum}))
|
||||||
|
@@ -1181,9 +1181,11 @@ int ha_berkeley::remove_key(DB_TXN *trans, uint keynr, const byte *record,
|
|||||||
DBUG_ENTER("remove_key");
|
DBUG_ENTER("remove_key");
|
||||||
DBUG_PRINT("enter",("index: %d",keynr));
|
DBUG_PRINT("enter",("index: %d",keynr));
|
||||||
|
|
||||||
if (keynr == primary_key ||
|
if (keynr == active_index && cursor)
|
||||||
((table->key_info[keynr].flags & (HA_NOSAME | HA_NULL_PART_KEY)) ==
|
error=cursor->c_del(cursor,0);
|
||||||
HA_NOSAME))
|
else if (keynr == primary_key ||
|
||||||
|
((table->key_info[keynr].flags & (HA_NOSAME | HA_NULL_PART_KEY)) ==
|
||||||
|
HA_NOSAME))
|
||||||
{ // Unique key
|
{ // Unique key
|
||||||
dbug_assert(keynr == primary_key || prim_key->data != key_buff2);
|
dbug_assert(keynr == primary_key || prim_key->data != key_buff2);
|
||||||
error=key_file[keynr]->del(key_file[keynr], trans,
|
error=key_file[keynr]->del(key_file[keynr], trans,
|
||||||
@@ -1304,7 +1306,7 @@ int ha_berkeley::delete_row(const byte * record)
|
|||||||
int ha_berkeley::index_init(uint keynr)
|
int ha_berkeley::index_init(uint keynr)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
DBUG_ENTER("index_init");
|
DBUG_ENTER("ha_berkeley::index_init");
|
||||||
DBUG_PRINT("enter",("table: '%s' key: %d", table->real_name, keynr));
|
DBUG_PRINT("enter",("table: '%s' key: %d", table->real_name, keynr));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1312,7 +1314,10 @@ int ha_berkeley::index_init(uint keynr)
|
|||||||
an active cursor at this point
|
an active cursor at this point
|
||||||
*/
|
*/
|
||||||
if (cursor)
|
if (cursor)
|
||||||
|
{
|
||||||
|
DBUG_PRINT("note",("Closing active cursor"));
|
||||||
cursor->c_close(cursor);
|
cursor->c_close(cursor);
|
||||||
|
}
|
||||||
active_index=keynr;
|
active_index=keynr;
|
||||||
if ((error=key_file[keynr]->cursor(key_file[keynr], transaction, &cursor,
|
if ((error=key_file[keynr]->cursor(key_file[keynr], transaction, &cursor,
|
||||||
table->reginfo.lock_type >
|
table->reginfo.lock_type >
|
||||||
@@ -1342,7 +1347,7 @@ int ha_berkeley::index_end()
|
|||||||
int ha_berkeley::read_row(int error, char *buf, uint keynr, DBT *row,
|
int ha_berkeley::read_row(int error, char *buf, uint keynr, DBT *row,
|
||||||
DBT *found_key, bool read_next)
|
DBT *found_key, bool read_next)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("read_row");
|
DBUG_ENTER("ha_berkeley::read_row");
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
if (error == DB_NOTFOUND || error == DB_KEYEMPTY)
|
if (error == DB_NOTFOUND || error == DB_KEYEMPTY)
|
||||||
@@ -1394,6 +1399,7 @@ int ha_berkeley::index_read_idx(byte * buf, uint keynr, const byte * key,
|
|||||||
statistic_increment(ha_read_key_count,&LOCK_status);
|
statistic_increment(ha_read_key_count,&LOCK_status);
|
||||||
DBUG_ENTER("index_read_idx");
|
DBUG_ENTER("index_read_idx");
|
||||||
current_row.flags=DB_DBT_REALLOC;
|
current_row.flags=DB_DBT_REALLOC;
|
||||||
|
active_index= -1;
|
||||||
DBUG_RETURN(read_row(key_file[keynr]->get(key_file[keynr], transaction,
|
DBUG_RETURN(read_row(key_file[keynr]->get(key_file[keynr], transaction,
|
||||||
pack_key(&last_key, keynr, key_buff, key,
|
pack_key(&last_key, keynr, key_buff, key,
|
||||||
key_len),
|
key_len),
|
||||||
@@ -1408,7 +1414,7 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
|
|||||||
DBT row;
|
DBT row;
|
||||||
int error;
|
int error;
|
||||||
KEY *key_info= &table->key_info[active_index];
|
KEY *key_info= &table->key_info[active_index];
|
||||||
DBUG_ENTER("index_read");
|
DBUG_ENTER("ha_berkeley::index_read");
|
||||||
|
|
||||||
statistic_increment(ha_read_key_count,&LOCK_status);
|
statistic_increment(ha_read_key_count,&LOCK_status);
|
||||||
bzero((char*) &row,sizeof(row));
|
bzero((char*) &row,sizeof(row));
|
||||||
@@ -1513,8 +1519,9 @@ int ha_berkeley::index_last(byte * buf)
|
|||||||
|
|
||||||
int ha_berkeley::rnd_init(bool scan)
|
int ha_berkeley::rnd_init(bool scan)
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("rnd_init");
|
||||||
current_row.flags=DB_DBT_REALLOC;
|
current_row.flags=DB_DBT_REALLOC;
|
||||||
return index_init(primary_key);
|
DBUG_RETURN(index_init(primary_key));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ha_berkeley::rnd_end()
|
int ha_berkeley::rnd_end()
|
||||||
@@ -1529,7 +1536,7 @@ int ha_berkeley::rnd_next(byte *buf)
|
|||||||
statistic_increment(ha_read_rnd_next_count,&LOCK_status);
|
statistic_increment(ha_read_rnd_next_count,&LOCK_status);
|
||||||
bzero((char*) &row,sizeof(row));
|
bzero((char*) &row,sizeof(row));
|
||||||
DBUG_RETURN(read_row(cursor->c_get(cursor, &last_key, &row, DB_NEXT),
|
DBUG_RETURN(read_row(cursor->c_get(cursor, &last_key, &row, DB_NEXT),
|
||||||
(char*) buf, active_index, &row, &last_key, 1));
|
(char*) buf, primary_key, &row, &last_key, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1559,10 +1566,11 @@ int ha_berkeley::rnd_pos(byte * buf, byte *pos)
|
|||||||
DBT db_pos;
|
DBT db_pos;
|
||||||
statistic_increment(ha_read_rnd_count,&LOCK_status);
|
statistic_increment(ha_read_rnd_count,&LOCK_status);
|
||||||
|
|
||||||
|
active_index= (uint) -1; // Don't delete via cursor
|
||||||
return read_row(file->get(file, transaction,
|
return read_row(file->get(file, transaction,
|
||||||
get_pos(&db_pos, pos),
|
get_pos(&db_pos, pos),
|
||||||
¤t_row, 0),
|
¤t_row, 0),
|
||||||
(char*) buf, active_index, ¤t_row, (DBT*) 0, 0);
|
(char*) buf, primary_key, ¤t_row, (DBT*) 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ha_berkeley::position(const byte *record)
|
void ha_berkeley::position(const byte *record)
|
||||||
@@ -1577,10 +1585,10 @@ void ha_berkeley::position(const byte *record)
|
|||||||
|
|
||||||
void ha_berkeley::info(uint flag)
|
void ha_berkeley::info(uint flag)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("info");
|
DBUG_ENTER("ha_berkeley::info");
|
||||||
if (flag & HA_STATUS_VARIABLE)
|
if (flag & HA_STATUS_VARIABLE)
|
||||||
{
|
{
|
||||||
records = share->rows; // Just to get optimisations right
|
records = share->rows + changed_rows; // Just to get optimisations right
|
||||||
deleted = 0;
|
deleted = 0;
|
||||||
}
|
}
|
||||||
if ((flag & HA_STATUS_CONST) || version != share->version)
|
if ((flag & HA_STATUS_CONST) || version != share->version)
|
||||||
@@ -1658,12 +1666,15 @@ int ha_berkeley::external_lock(THD *thd, int lock_type)
|
|||||||
{
|
{
|
||||||
if (!thd->transaction.bdb_lock_count++)
|
if (!thd->transaction.bdb_lock_count++)
|
||||||
{
|
{
|
||||||
|
DBUG_ASSERT(thd->transaction.stmt.bdb_tid == 0);
|
||||||
|
transaction=0; // Safety
|
||||||
/* First table lock, start transaction */
|
/* First table lock, start transaction */
|
||||||
if ((thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)) &&
|
if ((thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN |
|
||||||
|
OPTION_TABLE_LOCK)) &&
|
||||||
!thd->transaction.all.bdb_tid)
|
!thd->transaction.all.bdb_tid)
|
||||||
{
|
{
|
||||||
/* We have to start a master transaction */
|
/* We have to start a master transaction */
|
||||||
DBUG_PRINT("trans",("starting transaction"));
|
DBUG_PRINT("trans",("starting transaction all"));
|
||||||
if ((error=txn_begin(db_env, 0,
|
if ((error=txn_begin(db_env, 0,
|
||||||
(DB_TXN**) &thd->transaction.all.bdb_tid,
|
(DB_TXN**) &thd->transaction.all.bdb_tid,
|
||||||
0)))
|
0)))
|
||||||
@@ -1671,8 +1682,10 @@ int ha_berkeley::external_lock(THD *thd, int lock_type)
|
|||||||
thd->transaction.bdb_lock_count--; // We didn't get the lock /* purecov: inspected */
|
thd->transaction.bdb_lock_count--; // We didn't get the lock /* purecov: inspected */
|
||||||
DBUG_RETURN(error); /* purecov: inspected */
|
DBUG_RETURN(error); /* purecov: inspected */
|
||||||
}
|
}
|
||||||
|
if (thd->in_lock_tables)
|
||||||
|
DBUG_RETURN(0); // Don't create stmt trans
|
||||||
}
|
}
|
||||||
DBUG_PRINT("trans",("starting transaction for statement"));
|
DBUG_PRINT("trans",("starting transaction stmt"));
|
||||||
if ((error=txn_begin(db_env,
|
if ((error=txn_begin(db_env,
|
||||||
(DB_TXN*) thd->transaction.all.bdb_tid,
|
(DB_TXN*) thd->transaction.all.bdb_tid,
|
||||||
(DB_TXN**) &thd->transaction.stmt.bdb_tid,
|
(DB_TXN**) &thd->transaction.stmt.bdb_tid,
|
||||||
@@ -1684,12 +1697,12 @@ int ha_berkeley::external_lock(THD *thd, int lock_type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
transaction= (DB_TXN*) thd->transaction.stmt.bdb_tid;
|
transaction= (DB_TXN*) thd->transaction.stmt.bdb_tid;
|
||||||
changed_rows=0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lock.type=TL_UNLOCK; // Unlocked
|
lock.type=TL_UNLOCK; // Unlocked
|
||||||
thread_safe_add(share->rows, changed_rows, &share->mutex);
|
thread_safe_add(share->rows, changed_rows, &share->mutex);
|
||||||
|
changed_rows=0;
|
||||||
if (!--thd->transaction.bdb_lock_count)
|
if (!--thd->transaction.bdb_lock_count)
|
||||||
{
|
{
|
||||||
if (thd->transaction.stmt.bdb_tid)
|
if (thd->transaction.stmt.bdb_tid)
|
||||||
@@ -1722,11 +1735,12 @@ int ha_berkeley::start_stmt(THD *thd)
|
|||||||
DBUG_ENTER("ha_berkeley::start_stmt");
|
DBUG_ENTER("ha_berkeley::start_stmt");
|
||||||
if (!thd->transaction.stmt.bdb_tid)
|
if (!thd->transaction.stmt.bdb_tid)
|
||||||
{
|
{
|
||||||
|
DBUG_PRINT("trans",("starting transaction stmt"));
|
||||||
error=txn_begin(db_env, (DB_TXN*) thd->transaction.all.bdb_tid,
|
error=txn_begin(db_env, (DB_TXN*) thd->transaction.all.bdb_tid,
|
||||||
(DB_TXN**) &thd->transaction.stmt.bdb_tid,
|
(DB_TXN**) &thd->transaction.stmt.bdb_tid,
|
||||||
0);
|
0);
|
||||||
transaction= (DB_TXN*) thd->transaction.stmt.bdb_tid;
|
|
||||||
}
|
}
|
||||||
|
transaction= (DB_TXN*) thd->transaction.stmt.bdb_tid;
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1931,6 +1945,8 @@ longlong ha_berkeley::get_auto_increment()
|
|||||||
longlong nr=1; // Default if error or new key
|
longlong nr=1; // Default if error or new key
|
||||||
int error;
|
int error;
|
||||||
(void) ha_berkeley::extra(HA_EXTRA_KEYREAD);
|
(void) ha_berkeley::extra(HA_EXTRA_KEYREAD);
|
||||||
|
|
||||||
|
/* Set 'active_index' */
|
||||||
ha_berkeley::index_init(table->next_number_index);
|
ha_berkeley::index_init(table->next_number_index);
|
||||||
|
|
||||||
if (!table->next_number_key_offset)
|
if (!table->next_number_key_offset)
|
||||||
|
@@ -93,7 +93,7 @@ class ha_berkeley: public handler
|
|||||||
HA_BLOB_KEY | HA_NOT_EXACT_COUNT |
|
HA_BLOB_KEY | HA_NOT_EXACT_COUNT |
|
||||||
HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE |
|
HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE |
|
||||||
HA_AUTO_PART_KEY),
|
HA_AUTO_PART_KEY),
|
||||||
last_dup_key((uint) -1),version(0),using_ignore(0)
|
changed_rows(0),last_dup_key((uint) -1),version(0),using_ignore(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
~ha_berkeley() {}
|
~ha_berkeley() {}
|
||||||
|
@@ -21,7 +21,7 @@ InnoDB */
|
|||||||
- Ask Monty if strings of different languages can exist in the same
|
- Ask Monty if strings of different languages can exist in the same
|
||||||
database. Answer: in near future yes, but not yet.
|
database. Answer: in near future yes, but not yet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma implementation // gcc: Class implementation
|
#pragma implementation // gcc: Class implementation
|
||||||
#endif
|
#endif
|
||||||
@@ -2844,7 +2844,7 @@ ha_innobase::info(
|
|||||||
if (records == 0) {
|
if (records == 0) {
|
||||||
mean_rec_length = 0;
|
mean_rec_length = 0;
|
||||||
} else {
|
} else {
|
||||||
mean_rec_length = (ulong) data_file_length / records;
|
mean_rec_length = (ulong) (data_file_length / records);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
|
|||||||
|
|
||||||
const char *ha_table_type[] = {
|
const char *ha_table_type[] = {
|
||||||
"", "DIAB_ISAM","HASH","MISAM","PISAM","RMS_ISAM","HEAP", "ISAM",
|
"", "DIAB_ISAM","HASH","MISAM","PISAM","RMS_ISAM","HEAP", "ISAM",
|
||||||
"MRG_ISAM","MYISAM", "MRG_MYISAM", "BDB", "INNOBASE", "GEMINI", "?", "?",NullS
|
"MRG_ISAM","MYISAM", "MRG_MYISAM", "BDB", "INNODB", "GEMINI", "?", "?",NullS
|
||||||
};
|
};
|
||||||
|
|
||||||
TYPELIB ha_table_typelib= {array_elements(ha_table_type)-4,"",
|
TYPELIB ha_table_typelib= {array_elements(ha_table_type)-4,"",
|
||||||
@@ -837,8 +837,15 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
|
|||||||
}
|
}
|
||||||
error=table.file->create(name,&table,create_info);
|
error=table.file->create(name,&table,create_info);
|
||||||
VOID(closefrm(&table));
|
VOID(closefrm(&table));
|
||||||
if (error)
|
if (error) {
|
||||||
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno);
|
if (table.db_type == DB_TYPE_INNOBASE) {
|
||||||
|
/* Creation of InnoDB table cannot fail because of an OS error:
|
||||||
|
put error as the number */
|
||||||
|
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,error);
|
||||||
|
} else {
|
||||||
|
my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno);
|
||||||
|
}
|
||||||
|
}
|
||||||
DBUG_RETURN(error != 0);
|
DBUG_RETURN(error != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
sql/lock.cc
15
sql/lock.cc
@@ -169,8 +169,10 @@ static int lock_external(TABLE **tables,uint count)
|
|||||||
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock)
|
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("mysql_unlock_tables");
|
DBUG_ENTER("mysql_unlock_tables");
|
||||||
thr_multi_unlock(sql_lock->locks,sql_lock->lock_count);
|
if (sql_lock->lock_count)
|
||||||
VOID(unlock_external(thd,sql_lock->table,sql_lock->table_count));
|
thr_multi_unlock(sql_lock->locks,sql_lock->lock_count);
|
||||||
|
if (sql_lock->table_count)
|
||||||
|
VOID(unlock_external(thd,sql_lock->table,sql_lock->table_count));
|
||||||
my_free((gptr) sql_lock,MYF(0));
|
my_free((gptr) sql_lock,MYF(0));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@@ -213,7 +215,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock)
|
|||||||
if (i != found)
|
if (i != found)
|
||||||
{
|
{
|
||||||
thr_multi_unlock(lock,i-found);
|
thr_multi_unlock(lock,i-found);
|
||||||
sql_lock->lock_count-=found;
|
sql_lock->lock_count= found;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then to the same for the external locks */
|
/* Then to the same for the external locks */
|
||||||
@@ -232,7 +234,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock)
|
|||||||
if (i != found)
|
if (i != found)
|
||||||
{
|
{
|
||||||
VOID(unlock_external(thd,table,i-found));
|
VOID(unlock_external(thd,table,i-found));
|
||||||
sql_lock->table_count-=found;
|
sql_lock->table_count=found;
|
||||||
}
|
}
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@@ -314,7 +316,7 @@ static int unlock_external(THD *thd, TABLE **table,uint count)
|
|||||||
DBUG_ENTER("unlock_external");
|
DBUG_ENTER("unlock_external");
|
||||||
|
|
||||||
error_code=0;
|
error_code=0;
|
||||||
for (; count-- ; table++)
|
do
|
||||||
{
|
{
|
||||||
if ((*table)->current_lock != F_UNLCK)
|
if ((*table)->current_lock != F_UNLCK)
|
||||||
{
|
{
|
||||||
@@ -322,7 +324,8 @@ static int unlock_external(THD *thd, TABLE **table,uint count)
|
|||||||
if ((error=(*table)->file->external_lock(thd, F_UNLCK)))
|
if ((error=(*table)->file->external_lock(thd, F_UNLCK)))
|
||||||
error_code=error;
|
error_code=error;
|
||||||
}
|
}
|
||||||
}
|
table++;
|
||||||
|
} while (--count);
|
||||||
if (error_code)
|
if (error_code)
|
||||||
print_lock_error(error_code);
|
print_lock_error(error_code);
|
||||||
DBUG_RETURN(error_code);
|
DBUG_RETURN(error_code);
|
||||||
|
@@ -272,24 +272,24 @@ void Log_event::print_header(FILE* file)
|
|||||||
|
|
||||||
void Log_event::print_timestamp(FILE* file, time_t* ts)
|
void Log_event::print_timestamp(FILE* file, time_t* ts)
|
||||||
{
|
{
|
||||||
struct tm tm_tmp;
|
struct tm tm_tmp, *res;
|
||||||
if (!ts)
|
if (!ts)
|
||||||
{
|
{
|
||||||
ts = &when;
|
ts = &when;
|
||||||
}
|
}
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
localtime_r(ts,&tm_tmp);
|
localtime_r(ts,(res= &tm_tmp));
|
||||||
#else
|
#else
|
||||||
localtime(ts);
|
res=localtime(ts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fprintf(file,"%02d%02d%02d %2d:%02d:%02d",
|
fprintf(file,"%02d%02d%02d %2d:%02d:%02d",
|
||||||
tm_tmp.tm_year % 100,
|
res->tm_year % 100,
|
||||||
tm_tmp.tm_mon+1,
|
res->tm_mon+1,
|
||||||
tm_tmp.tm_mday,
|
res->tm_mday,
|
||||||
tm_tmp.tm_hour,
|
res->tm_hour,
|
||||||
tm_tmp.tm_min,
|
res->tm_min,
|
||||||
tm_tmp.tm_sec);
|
res->tm_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -163,7 +163,8 @@ void kill_one_thread(THD *thd, ulong id);
|
|||||||
#define OPTION_BIN_LOG OPTION_BUFFER_RESULT*2
|
#define OPTION_BIN_LOG OPTION_BUFFER_RESULT*2
|
||||||
#define OPTION_NOT_AUTO_COMMIT OPTION_BIN_LOG*2
|
#define OPTION_NOT_AUTO_COMMIT OPTION_BIN_LOG*2
|
||||||
#define OPTION_BEGIN OPTION_NOT_AUTO_COMMIT*2
|
#define OPTION_BEGIN OPTION_NOT_AUTO_COMMIT*2
|
||||||
#define OPTION_QUICK OPTION_BEGIN*2
|
#define OPTION_TABLE_LOCK OPTION_BEGIN*2
|
||||||
|
#define OPTION_QUICK OPTION_TABLE_LOCK*2
|
||||||
#define OPTION_QUOTE_SHOW_CREATE OPTION_QUICK*2
|
#define OPTION_QUOTE_SHOW_CREATE OPTION_QUICK*2
|
||||||
#define OPTION_INTERNAL_SUBTRANSACTIONS OPTION_QUOTE_SHOW_CREATE*2
|
#define OPTION_INTERNAL_SUBTRANSACTIONS OPTION_QUOTE_SHOW_CREATE*2
|
||||||
|
|
||||||
|
@@ -636,9 +636,7 @@ static void __cdecl kill_server(int sig_ptr)
|
|||||||
unireg_abort(1); /* purecov: inspected */
|
unireg_abort(1); /* purecov: inspected */
|
||||||
else
|
else
|
||||||
unireg_end(0);
|
unireg_end(0);
|
||||||
#ifndef OS2
|
|
||||||
pthread_exit(0); /* purecov: deadcode */
|
pthread_exit(0); /* purecov: deadcode */
|
||||||
#endif
|
|
||||||
RETURN_FROM_KILL_SERVER;
|
RETURN_FROM_KILL_SERVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -670,9 +668,7 @@ static sig_handler print_signal_warning(int sig)
|
|||||||
void unireg_end(int signal_number __attribute__((unused)))
|
void unireg_end(int signal_number __attribute__((unused)))
|
||||||
{
|
{
|
||||||
clean_up();
|
clean_up();
|
||||||
#ifndef OS2
|
|
||||||
pthread_exit(0); // Exit is in main thread
|
pthread_exit(0); // Exit is in main thread
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -413,7 +413,10 @@ void close_thread_tables(THD *thd, bool locked)
|
|||||||
DBUG_ENTER("close_thread_tables");
|
DBUG_ENTER("close_thread_tables");
|
||||||
|
|
||||||
if (thd->locked_tables)
|
if (thd->locked_tables)
|
||||||
|
{
|
||||||
|
ha_commit_stmt(thd); // If select statement
|
||||||
DBUG_VOID_RETURN; // LOCK TABLES in use
|
DBUG_VOID_RETURN; // LOCK TABLES in use
|
||||||
|
}
|
||||||
|
|
||||||
TABLE *table,*next;
|
TABLE *table,*next;
|
||||||
bool found_old_table=0;
|
bool found_old_table=0;
|
||||||
|
@@ -81,7 +81,8 @@ static void init_signals(void)
|
|||||||
inline bool end_active_trans(THD *thd)
|
inline bool end_active_trans(THD *thd)
|
||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
if (thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN))
|
if (thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN |
|
||||||
|
OPTION_TABLE_LOCK))
|
||||||
{
|
{
|
||||||
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
|
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
|
||||||
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
|
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
|
||||||
@@ -1825,7 +1826,11 @@ mysql_execute_command(void)
|
|||||||
{
|
{
|
||||||
thd->lock=thd->locked_tables;
|
thd->lock=thd->locked_tables;
|
||||||
thd->locked_tables=0; // Will be automaticly closed
|
thd->locked_tables=0; // Will be automaticly closed
|
||||||
|
}
|
||||||
|
if (thd->options & OPTION_TABLE_LOCK)
|
||||||
|
{
|
||||||
end_active_trans(thd);
|
end_active_trans(thd);
|
||||||
|
thd->options&= ~(ulong) (OPTION_TABLE_LOCK);
|
||||||
}
|
}
|
||||||
if (thd->global_read_lock)
|
if (thd->global_read_lock)
|
||||||
{
|
{
|
||||||
@@ -1847,12 +1852,15 @@ mysql_execute_command(void)
|
|||||||
if (check_db_used(thd,tables) || end_active_trans(thd))
|
if (check_db_used(thd,tables) || end_active_trans(thd))
|
||||||
goto error;
|
goto error;
|
||||||
thd->in_lock_tables=1;
|
thd->in_lock_tables=1;
|
||||||
|
thd->options|= OPTION_TABLE_LOCK;
|
||||||
if (!(res=open_and_lock_tables(thd,tables)))
|
if (!(res=open_and_lock_tables(thd,tables)))
|
||||||
{
|
{
|
||||||
thd->locked_tables=thd->lock;
|
thd->locked_tables=thd->lock;
|
||||||
thd->lock=0;
|
thd->lock=0;
|
||||||
send_ok(&thd->net);
|
send_ok(&thd->net);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
thd->options&= ~(ulong) (OPTION_TABLE_LOCK);
|
||||||
thd->in_lock_tables=0;
|
thd->in_lock_tables=0;
|
||||||
break;
|
break;
|
||||||
case SQLCOM_CREATE_DB:
|
case SQLCOM_CREATE_DB:
|
||||||
|
@@ -2516,6 +2516,7 @@ static void
|
|||||||
join_free(JOIN *join)
|
join_free(JOIN *join)
|
||||||
{
|
{
|
||||||
JOIN_TAB *tab,*end;
|
JOIN_TAB *tab,*end;
|
||||||
|
DBUG_ENTER("join_free");
|
||||||
|
|
||||||
if (join->table)
|
if (join->table)
|
||||||
{
|
{
|
||||||
@@ -2556,6 +2557,7 @@ join_free(JOIN *join)
|
|||||||
join->tmp_table_param.copy_funcs.delete_elements();
|
join->tmp_table_param.copy_funcs.delete_elements();
|
||||||
delete [] join->tmp_table_param.copy_field;
|
delete [] join->tmp_table_param.copy_field;
|
||||||
join->tmp_table_param.copy_field=0;
|
join->tmp_table_param.copy_field=0;
|
||||||
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -154,7 +154,7 @@ int vio_read(Vio * vio, gptr buf, int size)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
DBUG_ENTER("vio_read");
|
DBUG_ENTER("vio_read");
|
||||||
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
|
DBUG_PRINT("enter", ("sd=%d size=%d", vio->sd, size));
|
||||||
#if defined( __WIN__) || defined(OS2)
|
#if defined( __WIN__) || defined(OS2)
|
||||||
if (vio->type == VIO_TYPE_NAMEDPIPE)
|
if (vio->type == VIO_TYPE_NAMEDPIPE)
|
||||||
{
|
{
|
||||||
@@ -188,7 +188,7 @@ int vio_write(Vio * vio, const gptr buf, int size)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
DBUG_ENTER("vio_write");
|
DBUG_ENTER("vio_write");
|
||||||
DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size));
|
DBUG_PRINT("enter", ("sd=%d size=%d", vio->sd, size));
|
||||||
#if defined( __WIN__) || defined(OS2)
|
#if defined( __WIN__) || defined(OS2)
|
||||||
if ( vio->type == VIO_TYPE_NAMEDPIPE)
|
if ( vio->type == VIO_TYPE_NAMEDPIPE)
|
||||||
{
|
{
|
||||||
@@ -303,7 +303,7 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive)
|
|||||||
int r=0;
|
int r=0;
|
||||||
uint opt = 0;
|
uint opt = 0;
|
||||||
DBUG_ENTER("vio_keepalive");
|
DBUG_ENTER("vio_keepalive");
|
||||||
DBUG_PRINT("enter", ("sd=%d, set_keep_alive=%d", vio->sd, (int)
|
DBUG_PRINT("enter", ("sd=%d set_keep_alive=%d", vio->sd, (int)
|
||||||
set_keep_alive));
|
set_keep_alive));
|
||||||
if (vio->type != VIO_TYPE_NAMEDPIPE)
|
if (vio->type != VIO_TYPE_NAMEDPIPE)
|
||||||
{
|
{
|
||||||
|
@@ -85,22 +85,22 @@ uchar NEAR to_lower_euc_kr[]=
|
|||||||
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||||
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
||||||
'x', 'y', 'z', '{', '|', '}', '~', '\177',
|
'x', 'y', 'z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377',
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||||
};
|
};
|
||||||
|
|
||||||
uchar NEAR to_upper_euc_kr[]=
|
uchar NEAR to_upper_euc_kr[]=
|
||||||
@@ -121,22 +121,22 @@ uchar NEAR to_upper_euc_kr[]=
|
|||||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||||
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377',
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||||
};
|
};
|
||||||
|
|
||||||
uchar NEAR sort_order_euc_kr[]=
|
uchar NEAR sort_order_euc_kr[]=
|
||||||
@@ -157,22 +157,22 @@ uchar NEAR sort_order_euc_kr[]=
|
|||||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||||
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377',
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Support for Korean(EUC_KR) characters, by powerm90@tinc.co.kr and mrpark@tinc.co.kr */
|
/* Support for Korean(EUC_KR) characters, by powerm90@tinc.co.kr and mrpark@tinc.co.kr */
|
||||||
|
@@ -85,22 +85,22 @@ uchar NEAR to_lower_sjis[]=
|
|||||||
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||||
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
||||||
'x', 'y', 'z', '{', '|', '}', '~', '\177',
|
'x', 'y', 'z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377'
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||||
};
|
};
|
||||||
|
|
||||||
uchar NEAR to_upper_sjis[]=
|
uchar NEAR to_upper_sjis[]=
|
||||||
@@ -121,22 +121,22 @@ uchar NEAR to_upper_sjis[]=
|
|||||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||||
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377'
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||||
};
|
};
|
||||||
|
|
||||||
uchar NEAR sort_order_sjis[]=
|
uchar NEAR sort_order_sjis[]=
|
||||||
@@ -157,22 +157,22 @@ uchar NEAR sort_order_sjis[]=
|
|||||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||||
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
'X', 'Y', 'Z', '{', '|', '}', '~', '\177',
|
||||||
'\200','\201','\202','\203','\204','\205','\206','\207',
|
(uchar) '\200',(uchar) '\201',(uchar) '\202',(uchar) '\203',(uchar) '\204',(uchar) '\205',(uchar) '\206',(uchar) '\207',
|
||||||
'\210','\211','\212','\213','\214','\215','\216','\217',
|
(uchar) '\210',(uchar) '\211',(uchar) '\212',(uchar) '\213',(uchar) '\214',(uchar) '\215',(uchar) '\216',(uchar) '\217',
|
||||||
'\220','\221','\222','\223','\224','\225','\226','\227',
|
(uchar) '\220',(uchar) '\221',(uchar) '\222',(uchar) '\223',(uchar) '\224',(uchar) '\225',(uchar) '\226',(uchar) '\227',
|
||||||
'\230','\231','\232','\233','\234','\235','\236','\237',
|
(uchar) '\230',(uchar) '\231',(uchar) '\232',(uchar) '\233',(uchar) '\234',(uchar) '\235',(uchar) '\236',(uchar) '\237',
|
||||||
'\240','\241','\242','\243','\244','\245','\246','\247',
|
(uchar) '\240',(uchar) '\241',(uchar) '\242',(uchar) '\243',(uchar) '\244',(uchar) '\245',(uchar) '\246',(uchar) '\247',
|
||||||
'\250','\251','\252','\253','\254','\255','\256','\257',
|
(uchar) '\250',(uchar) '\251',(uchar) '\252',(uchar) '\253',(uchar) '\254',(uchar) '\255',(uchar) '\256',(uchar) '\257',
|
||||||
'\260','\261','\262','\263','\264','\265','\266','\267',
|
(uchar) '\260',(uchar) '\261',(uchar) '\262',(uchar) '\263',(uchar) '\264',(uchar) '\265',(uchar) '\266',(uchar) '\267',
|
||||||
'\270','\271','\272','\273','\274','\275','\276','\277',
|
(uchar) '\270',(uchar) '\271',(uchar) '\272',(uchar) '\273',(uchar) '\274',(uchar) '\275',(uchar) '\276',(uchar) '\277',
|
||||||
'\300','\301','\302','\303','\304','\305','\306','\307',
|
(uchar) '\300',(uchar) '\301',(uchar) '\302',(uchar) '\303',(uchar) '\304',(uchar) '\305',(uchar) '\306',(uchar) '\307',
|
||||||
'\310','\311','\312','\313','\314','\315','\316','\317',
|
(uchar) '\310',(uchar) '\311',(uchar) '\312',(uchar) '\313',(uchar) '\314',(uchar) '\315',(uchar) '\316',(uchar) '\317',
|
||||||
'\320','\321','\322','\323','\324','\325','\326','\327',
|
(uchar) '\320',(uchar) '\321',(uchar) '\322',(uchar) '\323',(uchar) '\324',(uchar) '\325',(uchar) '\326',(uchar) '\327',
|
||||||
'\330','\331','\332','\333','\334','\335','\336','\337',
|
(uchar) '\330',(uchar) '\331',(uchar) '\332',(uchar) '\333',(uchar) '\334',(uchar) '\335',(uchar) '\336',(uchar) '\337',
|
||||||
'\340','\341','\342','\343','\344','\345','\346','\347',
|
(uchar) '\340',(uchar) '\341',(uchar) '\342',(uchar) '\343',(uchar) '\344',(uchar) '\345',(uchar) '\346',(uchar) '\347',
|
||||||
'\350','\351','\352','\353','\354','\355','\356','\357',
|
(uchar) '\350',(uchar) '\351',(uchar) '\352',(uchar) '\353',(uchar) '\354',(uchar) '\355',(uchar) '\356',(uchar) '\357',
|
||||||
'\360','\361','\362','\363','\364','\365','\366','\367',
|
(uchar) '\360',(uchar) '\361',(uchar) '\362',(uchar) '\363',(uchar) '\364',(uchar) '\365',(uchar) '\366',(uchar) '\367',
|
||||||
'\370','\371','\372','\373','\374','\375','\376','\377'
|
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||||
};
|
};
|
||||||
|
|
||||||
#define issjishead(c) ((0x81<=(c) && (c)<=0x9f) || \
|
#define issjishead(c) ((0x81<=(c) && (c)<=0x9f) || \
|
||||||
|
Reference in New Issue
Block a user