summaryrefslogtreecommitdiff
path: root/sql-common
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.3->5.5Alexander Barkov2013-12-021-2/+2
|\ | | | | | | | | | | pending merges: Alexander Barkov 2013-12-02 MDEV-4857 Wrong result of HOUR('1 00:00:00')
| * MDEV-4857 Wrong result of HOUR('1 00:00:00')Alexander Barkov2013-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/func_time.result mysql-test/t/func_time.test sql-common/my_time.c sql/item_func.h sql/item_timefunc.cc sql/mysql_priv.h sql/time.cc
* | mysql-5.5.32 mergeSergei Golubchik2013-07-162-6/+7
|\ \
| * | Bug #16680313: CLIENT DOESN'T READ PLUGIN-DIR FROM MY.CNF SET BYGeorgi Kodinov2013-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | MYSQL_READ_DEFAULT_FILE Parsing of the plugin-dir config file option was not working due to a typo. Fixed the typo. No test case can be added due to lack of support for defaults-exitra-file testing in mysql-test-run.pl. Thanks to Sinisa for contributing the fix.
| * | Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-192-2/+2
| | |
| * | Merge of patch for bug#14685362 from mysql-5.1.Nirbhay Choubey2013-03-181-0/+2
| |\ \
| | * | Updated/added copyright headers.Murthy Narkedimilli2013-02-251-1/+1
| | | |
* | | | Merging from 5.3Alexander Barkov2013-07-081-9/+4
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: include/my_time.h libmysql/libmysql.c mysql-test/r/adddate_454.result mysql-test/r/cast.result mysql-test/r/date_formats.result mysql-test/r/func_sapdb.result mysql-test/r/func_time.result mysql-test/r/mdev316.result mysql-test/r/parser.result mysql-test/r/partition_datatype.result mysql-test/r/partition_pruning.result mysql-test/r/type_date.result mysql-test/r/type_datetime.result mysql-test/suite/vcol/r/vcol_misc.result mysql-test/t/cast.test sql-common/my_time.c sql/field.cc sql/field_conv.cc sql/filesort.cc sql/item.cc sql/item.h sql/item_cmpfunc.cc sql/item_func.cc sql/item_strfunc.cc sql/item_timefunc.cc sql/sql_time.cc pending merges: Sergei Golubchik 2013-07-03 MDEV-4667 DATE('string') incompability betwe...
| * | | MDEV-4667 DATE('string') incompability between mysql and mariadbSergei Golubchik2013-07-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup: remove TIME_FUZZY_DATE. Introduce TIME_FUZZY_DATES which means "very fuzzy, the resulting value is only used for comparison. It can be invalid date, fine, as long as it can be compared". Updated many tests results (they're better now).
* | | | MDEV-4574 Missing connection option MYSQL_ENABLE_CLEARTEXT_PLUGINSergei Golubchik2013-06-111-0/+6
| | | | | | | | | | | | | | | | recognize the constant, to be compatible with MySQL clients.
* | | | Fixed some cache variables that could be set to higher value than what the ↵Michael Widenius2013-06-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code supported (size_t) Fixed some cases that didn't work with > 4G buffers. Fixed compiler warnings include/mysql_com.h: Avoid compiler warning with strncmp() sql-common/client.c: Fixed long comment; Added () sql/filesort.cc: Fix code to get filesort to work with big buffers sql/sys_vars.cc: Fixed some cache variables that could be set to higher value than the size_t Limit query cache to ULONG_MAX as the query cache buffer variables are ulong storage/federatedx/ha_federatedx.cc: Remove not used variable storage/maria/ha_maria.cc: Fix that bulk_insert() works with big buffers storage/maria/ma_write.c: Fix that bulk_insert() works with big buffers storage/myisam/ha_myisam.cc: Fix that bulk_insert() works with big buffers storage/myisam/mi_write.c: Fix that bulk_insert() works with big buffers storage/sphinx/snippets_udf.cc: Fixed compiler warnings
* | | | strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)Sergei Golubchik2013-04-171-2/+2
| | | | | | | | | | | | | | | | with a bit of lame protection against abuse.
* | | | 5.3 mergeSergei Golubchik2013-04-121-0/+6
|\ \ \ \ | |/ / /
| * | | 5.2 mergeSergei Golubchik2013-04-111-0/+6
| |\ \ \
| | * \ \ 5.1 mergeSergei Golubchik2013-04-111-0/+6
| | |\ \ \
| | | * | | MDEV-4088 Replication 10.0 -> 5.5 failsSergei Golubchik2013-04-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update 5.1 to replicate from 10.0 and to show the server version (as of 10.0) correctly sql-common/client.c: mdev:4088 sql/slave.cc: use the version number, not just the first character of the version string (we want 10 > 4 not "10" < "4").
* | | | | | MDEV-4307 Support at least 48 utf8 characters in username in server and PAMSergei Golubchik2013-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend plugin auth api to support up to 512 bytes in the user names. Use the API versioning to support old auth plugins too!
* | | | | | MDEV-4249 : when autodetecting default client charset on Windows, fallback ↵Vladislav Vaintroub2013-03-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | to GetACP() whenever GetConsoleCP() returns 0 (i.e appkication does not have a console , which is the case for GUI apps, Windows services etc)
* | | | | | 5.3 mergeSergei Golubchik2013-01-151-2/+2
|\ \ \ \ \ \ | |/ / / / /
| * | | | | 5.2->5.3 mergeSergei Golubchik2013-01-101-2/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | one-byte overflow with old passwordsSergei Golubchik2012-12-111-2/+2
| | | | | |
| * | | | | 5.2 merge.Sergei Golubchik2012-08-221-3/+12
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | two tests still fail: main.innodb_icp and main.range_vs_index_merge_innodb call records_in_range() with both range ends being open (which triggers an assert)
| | * | | | 5.1 mergeSergei Golubchik2012-08-221-3/+12
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | increase xtradb verson from 13.0 to 13.01
| | | * | | merge with MySQL 5.1.65Sergei Golubchik2012-08-221-3/+12
| | | |\ \ \ | | | | | |/ | | | | |/|
* | | | | | MDEV-3802. Millisecond timeout support in non-blocking client library.unknown2012-10-121-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 10.0, VIO timeouts can be in milliseconds, so we add a new function mysql_get_timeout_value_ms() which can return millisecond-precision timeout values. In 5.5, we do not have millisecond precision for timeouts. But we still provide the mysql_get_timeout_value_ms() function; this makes it easier for applications as they can use the millisecond function in 10.0 and still work with the 5.5 version of the client library.
* | | | | | merge with MySQL 5.5.27Sergei Golubchik2012-08-091-4/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | manually checked every change, reverted incorrect or stupid changes.
| * | | | | | undo the fix for MySQL Bug#12998841Sergei Golubchik2012-08-082-66/+9
| | |_|_|_|/ | |/| | | |
| * | | | | Bug #12910665: AUTH-PLUGIN-DATA-LEN NOT TESTED FOR VALIDITY BY THE Georgi Kodinov2012-06-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLIENT Added a check for a negative second part of the scramble length.
| * | | | | fixed a missing breakGeorgi Kodinov2012-07-051-0/+1
| | | | | |
| * | | | | Bug #12998841: libmysql divulges plaintext password upon request in 5.5Georgi Kodinov2012-07-052-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Clear text password client plugin disabled by default. 2. Added an environment variable LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN, that when set to something starting with '1', 'Y' or 'y' will enable the clear text plugin for all connections. 3. Added a new mysql_options() option : MYSQL_ENABLE_CLEARTEXT_PLUGIN that takes an my_bool argument. When the value of the argument is non-zero the clear text plugin is enabled for this connection only. 4. Added an enable-cleartext-plugin config file option that takes a numeric argument. If the numeric value of the numeric argument is non-zero the clear text plugin is enabled for the connection 5. Added a boolean command line option "--enable_cleartext_plugin" to mysql, mysqlslap and mysqladmin. When specified it will call mysql_options with the effect of #3 6. Added a new CLEARTEXT option to the connect command in mysqltest. When specified it will enable the cleartext plugin for usage. 7. Added test cases and updated existing ones that need the clear text plugin.
| * | | | | merge bug#13708485 5.1->5.5Georgi Kodinov2012-06-291-3/+12
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Bug #13708485: malformed resultset packet crashes clientGeorgi Kodinov2012-06-281-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fixes : * sql-common/client.c Added a validity check of the fields metadata packet sent by the server. Now libmysql will check if the length of the data sent by the server matches what's expected by the protocol before using the data. * client/mysqltest.cc Fixed the error handling code in mysqltest to avoid sending new commands when the reading the result set failed (and there are unread data in the pipe). * sql_common.h + libmysql/libmysql.c + sql-common/client.c unpack_fields() now generates a proper error when it fails. Added a new argument to this function to support the error generation. * sql/protocol.cc Added a debug trigger to cause the server to send a NULL insted of the packet expected by the client for testing purposes.
* | | | | | mergeVladislav Vaintroub2012-06-131-17/+80
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | LP1008334 : Speedup specific datetime queries that got slower with ↵Vladislav Vaintroub2012-06-081-17/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduction of microseconds in 5.3 - Item::get_seconds() now skips decimal arithmetic, if decimals is 0. This significantly speeds up from_unixtime() if no fractional part is passed. - replace sprintfs used to format temporal values by hand-coded formatting Query1 (original query in the bug report) BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(RAND() * 2147483648), INTERVAL (FLOOR(1 + RAND() * 365)) DAY)) Query2 (Variation of query1 that does not use fractional part in FROM_UNIXTIME parameter) BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(FLOOR(RAND() * 2147483648)), INTERVAL (FLOOR(1 + RAND() * 365)) DAY)) Prior to the patch, the runtimes were (32 bit compilation/AMD machine) Query1: 41.53 sec Query2: 23.90 sec With the patch, the runtimes are Query1: 32.32 sec (speed up due to removing sprintf) Query2: 12.06 sec (speed up due to skipping decimal arithmetic)
| * | | | | mergeSergei Golubchik2012-04-051-2/+2
| |\ \ \ \ \ | | | |_|/ / | | |/| | |
| | * | | | mergeSergei Golubchik2012-04-051-2/+2
| | |\ \ \ \ | | | | |_|/ | | | |/| |
| | | * | | mysql-5.1.62 mergeSergei Golubchik2012-04-051-2/+2
| | | |\ \ \ | | | | | |/ | | | | |/|
* | | | | | Fixed some simple warnings on Windows.Vladislav Vaintroub2012-04-131-13/+0
| | | | | |
* | | | | | mysql-5.5.22 mergeSergei Golubchik2012-03-281-1/+1
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/suite/innodb/t/group_commit_crash.test: remove autoincrement to avoid rbr being used for insert ... select mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test: remove autoincrement to avoid rbr being used for insert ... select mysys/my_addr_resolve.c: a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack mysys/stacktrace.c: my_vsnprintf() is ok here, in 5.5
| * | | | | Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Updated/added copyright headersKent Boortz2012-02-151-1/+1
| | |\ \ \ \
* | | \ \ \ \ merge with mysql-5.5.21Sergei Golubchik2012-03-091-1/+1
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merging BUG#13458237 from 5.1.Alexander Barkov2012-01-241-1/+1
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | BUG#13458237 - INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY. ↵Alexander Barkov2012-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SIMILAR TO '2009-10-00' - Reverting the patch for Bug # 12584302 The patch will be reverted in 5.1 and 5.5. The patch will not be reverted in 5.6, the change will be properly documented in 5.6. - Backporting DBUG_ASSERT not to crash on '0000-01-00' (already fixed in mysql-trunk (5.6))
* | | | | | | MWL#192 after-merge fixes.unknown2012-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix memory leak in one error case in mysqldump. Fix that HAVE_VALGRIND_VALGRIND_H is now HAVE_VALGRIND in 5.5. Fix that @have_ssl should not be set in embedded (introduced when removing #undef HAVE_OPENSSL from my_global.h).
* | | | | | | Fix MWL#192 build error: Remove SSL special case for embedded server.unknown2012-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VIO has SSL in embedded server anyway, so we do not win anything by excluding it. This was actually already done in this changeset: revision-id: kostja@sun.com-20100413150445-8x23keoxdiufgq76 "... Also, he removed the (probable) bug of embedded server never using SSL-dependent functions..." But was apparenly lost by a mis-merge of WL#5030.
* | | | | | | Merge MWL#192: Non-blocking client library, into MariaDB 5.5.unknown2012-02-212-27/+2111
|\ \ \ \ \ \ \
| * | | | | | | MWL#192: Fix problem when we first enable MYSQL_OPT_NONBLOCK, then connectunknown2012-01-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in normal blocking style, then later do a non-blocking operation. In this case, the vio->async_context was not set up correctly, so that non-blocking operation was not properly handled.
| * | | | | | | MWL#192: non-blocking client API, after-review fixes.unknown2012-01-062-578/+1028
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is that non-blocking operation is now an option that must be explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...) before any non-blocing operation can be used. Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus effectively ignored (it was not really useful anyway, and this simplifies things when non-blocking mysql_real_connect() fails).
| * | | | | | | MWL#192: Non-blocking client API for libmysqlclient.unknown2011-09-203-17/+1613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All client functions that can block on I/O have alternate _start() and _cont() versions that do not block but return control back to the application, which can then issue I/O wait in its own fashion and later call back into the library to continue the operation. Works behind the scenes by spawning a co-routine/fiber to run the blocking operation and suspend it while waiting for I/O. This co-routine/fiber use is invisible to applications. For i368/x86_64 on GCC, uses very fast assembler co-routine support. On Windows uses native Win32 Fibers. Falls back to POSIX ucontext on other platforms. Assembler routines for more platforms are relatively easy to add by extending mysys/my_context.c, eg. similar to the Lua lcoco library. For testing, mysqltest and mysql_client_test are extended with the option --non-blocking-api. This causes the programs to use the non-blocking API for database access. mysql-test-run.pl has a similar option --non-blocking-api that uses this, as well as additional testcases. An example program tests/async_queries.c is included that uses the new non-blocking API with libevent to show how, in a single-threaded program, to issue many queries in parallel against a database. client/async_example.c: Fix const warning ****** Fix bug with wrong timeout value for poll(). include/Makefile.am: Fix missing include for `make dist` include/mysql.h: Add prototypes for all non-blocking API calls. include/mysql.h.pp: Add prototypes for all non-blocking API calls. mysys/my_context.c: Fix type warning for makecontext() function pointer argument. sql-common/mysql_async.c: Fix crashes in the non-blocking API for functions that can take MYSQL argument that is NULL. tests/Makefile.am: Add header file to `make dist` tests/mysql_client_test.c: Replace blocking calls with wrappers around the non-blocking calls, used in mysql_client_test to test the new non-blocking API. tests/nonblock-wrappers.h: Replace blocking calls with wrappers around the non-blocking calls, used in mysql_client_test to test the new non-blocking API.