Commit graph

249 commits

Author SHA1 Message Date
monty@mashka.mysql.fi
6603d75213 New multi-table-update code
New (simpler) internal timestamp handling.
More debuging to heap tables.
Small cleanups to multi-table-delete
false -> 0 and true -> 1  (We should use TRUE and FALSE)
2002-11-29 16:40:18 +02:00
bell@sanja.is.com.ua
aa8af5d6f4 reverse order in global select list allow to avoid recursion in derived tables 2002-11-27 01:12:16 +02:00
bell@sanja.is.com.ua
fdb3eaf3d7 subselects in insert/replace (SCRUM) 2002-11-26 01:00:05 +02:00
monty@mashka.mysql.fi
5dbea1b7a2 Merge with 4.0 2002-11-25 12:19:28 +02:00
bell@sanja.is.com.ua
ed99de7dcc fixed invalidation of query cache
excluded double call of 'invalidate()'
2002-11-22 00:33:15 +02:00
monty@mashka.mysql.fi
dac6498f9b Merge with 4.0 2002-11-21 15:56:48 +02:00
monty@mashka.mysql.fi
e65ddf3fc3 Try to optimize the cache buffer size needed for bulk_insert
Fix for shutdown on Mac OS X
2002-11-20 22:56:57 +02:00
monty@mashka.mysql.fi
1a96948e81 Small improvement to alloc_root
Add support for LIMIT # OFFSET #
Changed lock handling:  Now all locks should be stored in TABLE_LIST instead of passed to functions.
Don't call query_cache_invalidate() twice in some cases
mysql_change_user() now clears states to be equal to close + connect.
Fixed a bug with multi-table-update and multi-table-delete when used with LOCK TABLES
Fixed a bug with replicate-do and UPDATE
2002-11-16 20:19:10 +02:00
monty@hundin.mysql.fi
8d283a3d73 Portability fix (accidently left out from last changeset) 2002-11-07 19:25:27 +02:00
monty@hundin.mysql.fi
aa4e165808 Portability fix extern "C" static -> extern "C" 2002-11-07 12:49:02 +02:00
monty@butch.
890b39bb68 merge 2002-11-07 12:49:01 +02:00
monty@hundin.mysql.fi
65badfff1a Put temporary files in binlog cache when using BEGIN/COMMIT
Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
New variables @@rand_seed1 and @@rand_seed2 (used by replication)
DROP TEMPORARY TABLE
2002-11-07 04:02:37 +02:00
monty@butch.
a2bdf9265f Portability fixes for Fortre C++ 5.0 (on Sun) in 32 and 64 bit modes. 2002-11-07 03:54:00 +02:00
bell@sanja.is.com.ua
c94b39134f Fixed error handling bug 2002-11-04 00:56:25 +02:00
bell@sanja.is.com.ua
199f667c19 merging 2002-10-04 14:15:59 +03:00
monty@mashka.mysql.fi
0f39457613 Merge with 4.0.4 2002-10-02 17:55:12 +03:00
monty@mashka.mysql.fi
d69250a969 Fixes and code cleanups after merge with 4.0.3
Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()

Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
2002-10-02 13:33:08 +03:00
monty@mashka.mysql.fi
cb8580a2cd Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name.
This should fix some issues where --lower-case-table-names doesn't work properly under windows.
2002-09-20 14:05:18 +03:00
monty@mashka.mysql.fi
f638ee6df9 Added code to flush a bulk_insert index.
This fixes a bug when doing multi-row inserts on table with an auto_increment key that is not in the first key segment.
2002-09-18 21:04:49 +03:00
monty@mashka.mysql.fi
0281a6b160 Fixed searching after ssl directories.
Fixed that GRANT ... REQUIRE options are not forgot when doing new GRANT
Changed fn_ext to point at first '.' after directory.
FLUSH LOGS removed numerical extension for all future update logs.
Fixed the mysqld --help reports right values for --datadir and --bind-address
--log-binary=a.b.c now properly strips of .b.c
Fix that one can DROP UDF functions that was not loaded at startup
Made AND optional in REQUIRE
Added REQUIRE NONE
2002-09-05 16:17:08 +03:00
bell@sanja.is.com.ua
b07aaeb295 subselect with union
new error handling
Item_ref bug fixed
2002-09-03 09:50:36 +03:00
monty@narttu.mysql.fi
7134ffec21 Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
2002-08-30 12:40:40 +03:00
monty@hundin.mysql.fi
f36f9d00ff Fixed bug in wait_for_update() that I had introduced.
Changed option variables to my_bool (to avoid bugs in my_getopt())
Added new thread specific mutex LOCK_delete to be able to free LOCK_thread_count early.
Changed usage of LOCK_thread_count -> LOCK_status for statistics variables
2002-08-22 16:50:58 +03:00
monty@hundin.mysql.fi
3ef9d44edc merge with 3.23.52 2002-08-12 04:04:43 +03:00
Sinisa@sinisa.nasamreza.org
0005f28b4e A small fix for last_insert_id with multi-row inserts 2002-08-10 22:08:00 +03:00
monty@hundin.mysql.fi
087261482a merge with 3.23.52 2002-08-08 15:24:47 +03:00
monty@mashka.mysql.fi
2c4fa340cc Lots of code fixes to the replication code (especially the binary logging and index log file handling)
Fixed bugs in my last changeset that made MySQL hard to compile.
Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables.
Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions
Extended my_chsize() to allow one to specify a filler character.
Extend vio_blocking to return the old state (This made some usage of this function much simpler)
Added testing for some functions that they caller have got the required mutexes before calling the function.
Use setrlimit() to ensure that we can write core file if one specifies --core-file.
Added --slave-compressed-protocol
Made 2 the minimum length for ft_min_word_len
Added variables foreign_key_checks & unique_checks.
Less logging from replication code (if not started with --log-warnings)
Changed that SHOW INNODB STATUS requre the SUPER privilege
More DBUG statements and a lot of new code comments
2002-08-08 03:12:02 +03:00
monty@narttu.mysql.fi
c0a6890292 Added some missing mutex_locks() when manipulating the table cache.
This should fix some possible table cache corruptions when doing
OPTIMIZE or REPAIR table when other threads are opening new tables.
2002-08-05 18:50:38 +03:00
monty@mashka.mysql.fi
e701333bbf INSERT ... VALUES(DEFAULT) 2002-07-25 01:00:56 +03:00
monty@mashka.mysql.fi
c702a1f8fd Removed wrong implementation of CUBE/ROLLUP
Fixed bugfix of INSERT ... SET db_name.table_name.column_name
Changed locking to external-locking
Fix client hangup for some invalid SQL queries.
2002-07-24 19:55:08 +03:00
monty@mashka.mysql.fi
dddc20d9d1 New SET syntax & system variables.
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups
2002-07-23 18:31:22 +03:00
monty@hundin.mysql.fi
578a9d9901 Updated windows files (VC++ files and winmysqladmin).
Portability fixes.
Removed compiler warnings.
2002-06-28 17:26:11 +03:00
venu@myvenu.com
5a33842a16 sql_error.cc, sql_prepare.cc:
new file

  Client-server protocol 4.1 changes - Server side:

 * Enhanced metadata information:
    - SHOW [COUNT(*)] ERRORS [LIMIT [offset,] rows]
    - SHOW [COUNT(*)] WARNING [LIMIT [offset,] rows]
    - SHOW TABLE TYPES
    - SHOW PRIVILEGES
    - SHOW COLUMN TYPES (Not fully implemented)

 * Prepared execution
 * Long data handling in pieces
 * And other misc changes
2002-06-12 14:13:12 -07:00
monty@mashka.mysql.fi
b8421d34ec Added the following new privleges:
SHOW DATABASES
CREATE TEMPORARY TABLE
LOCK TABLES
REPLICATION SLAVE & REPLICATION CLIENT
SUPER
EXECUTE

All scripts & documentation is updated for this change.
Added better error messages for global privileges
2002-06-12 15:04:18 +03:00
monty@mashka.mysql.fi
2aecdd1a91 Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked)
This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
2002-06-11 11:20:31 +03:00
monty@hundin.mysql.fi
9263b77e0c Merge hundin.mysql.fi:/my/mysql-3.23
into hundin.mysql.fi:/my/bk/mysql-4.0
2002-06-05 23:10:29 +03:00
bell@sanja.is.com.ua
289ac250af merged 2002-06-05 21:32:22 +03:00
monty@hundin.mysql.fi
640abc687c Fixed mysql_info() result when using INSERT DELAYED 2002-06-05 16:42:07 +03:00
Sinisa@sinisa.nasamreza.org
329bd4fabd Fixed a bug with big result sets and UNION's 2002-05-24 15:26:47 +03:00
bell@sanja.is.com.ua
5ba6d537e5 merge 2002-05-09 17:30:58 +03:00
bell@sanja.is.com.ua
ead6f225a4 new SELECT_LEX structures used for storing global ORDER BY, global LIMIT & limit counters 2002-05-08 23:14:40 +03:00
monty@hundin.mysql.fi
9d0f8a1b5f Fixed that enable-reads-from-master and repl-parse-query works in option files.
Fixed slowdown problem on win98
Fixed syntax for ALTER TABLE .. RENAME
2002-04-29 12:24:14 +03:00
bell@sanja.is.com.ua
29201cbf66 invalidation moved before tables unlocking 2002-04-29 00:33:52 +03:00
monty@tik.mysql.fi
056175a1ce Update for BTREE keys in HEAP tables
Split handler->option_flag() to handler->table_flags() and handler->index_flags()
2002-04-12 21:35:46 +03:00
bell@sanja.is.com.ua
c5d95b5e62 added building without query cache 2002-03-22 22:55:08 +02:00
bell@sanja.is.com.ua
63b2a551bf processing trunsactional tables in query cache 2002-03-15 23:57:31 +02:00
Sinisa@sinisa.nasamreza.org
d7a23f28c4 Some changes in multi-table deletes, with some speed-ups and
incorporations of the new stuff.

When Monty approves / corrects it, I will "port" it to multi-table
updates.
2002-01-12 19:51:10 +02:00
monty@hundin.mysql.fi
4b877e0088 Added macros for nice TIMESPEC usage.
Fixes for building MySQL with gcc 3.0
Added SIGNED / UNSIGNED casts
Fixed core dump bug in net_clear() with libmysqld.
Back to using semaphores in query cache.
Added 'Null' and 'Index_type' to SHOW INDEX.
2002-01-02 21:29:41 +02:00
monty@hundin.mysql.fi
0eb46e4256 Fix insert delated + query cache.
Fix pthread_mutex_trylock on HPUX (needed for query cache).
2001-12-20 06:14:11 +02:00
monty@hundin.mysql.fi
b658662ae4 Update copyright
Fixed memory leak on shutdown (Affects the embedded version & MyODBC)
2001-12-06 14:10:51 +02:00
monty@hundin.mysql.fi
1de4fff5ba Update of query cache code.
Changed some sql_alloc() -> thd->alloc()
Removed a lot of compiler warnings on Linux Alpha (64 bit)
Fixed some core dumps on 64 bit systems (wrong type for packet_len)
2001-12-05 13:03:00 +02:00
monty@hundin.mysql.fi
1d26537da5 Query cache.
Remove some warnings
2001-12-02 14:34:01 +02:00
monty@hundin.mysql.fi
69f6802632 merge 2001-11-28 14:52:11 +02:00
monty@hundin.mysql.fi
66a31433a4 Fixed bug when joining with caching.
Fixed race condition when using the binary log and INSERT DELAYED which could cause the binary log to have rows that was not yet written to MyISAM tables.
2001-11-27 02:50:20 +02:00
monty@hundin.mysql.fi
4c60b41954 Portability fix
Cleanup typos (like SKIPP -> SKIP)
2001-11-07 00:13:29 +02:00
monty@work.mysql.com
193ae61fc0 merge 2001-10-02 21:33:47 +02:00
monty@hundin.mysql.fi
d28f23c14f Fixed bug in INSERT DELAYED
Fixed some problems in SHOW CREATE TABLE
Fixed calculation of checksums in myisamchk
2001-10-02 21:08:08 +03:00
monty@tik.mysql.fi
e05bf277d6 Final fixes for INSERT into MERGE tables.
Move MAX_BLOB_WIDTH to be global
Added full support for unsigned BIGINT
Fixed spelling errors
2001-09-27 21:45:48 +03:00
monty@hundin.mysql.fi
381093b322 merge 2001-09-02 19:58:08 +03:00
monty@work.mysql.com
447c18954e merge with 3.23.42 2001-09-02 18:38:33 +02:00
monty@hundin.mysql.fi
04ec0de7d0 Changed DB_TYPE_INNOBASE to DB_TYPE_INNODB
Fix that DROP DATABASE works with all table types
Use BULK_INSERT when inserting more than one row
Better TRUNCATE TABLE
2001-09-02 13:47:00 +03:00
monty@hundin.mysql.fi
7f4aee1c90 Make killing of threads safer 2001-09-01 10:38:16 +03:00
monty@hundin.mysql.fi
e251f9d827 Fixed problem with INSERT DELAYED
Make killing threads safer
2001-08-31 23:02:09 +03:00
monty@hundin.mysql.fi
733f865f54 Fixes for OS2.
Fix bug in isamlog
Add argument types to function declarations.
2001-08-22 01:45:07 +03:00
monty@tik.mysql.fi
b13d453d50 Fix UNION
New faster list iterators
Change list code to be simpler and faster
Optimize count(distinct)
New error messages for UNION
Make create_tmp_table more general to be usable by UNION
2001-08-02 06:29:50 +03:00
Sinisa@sinisa.nasamreza.org
8ae559d544 UNION's 2001-07-25 15:28:37 +03:00
Sinisa@sinisa.nasamreza.org
8060b31aba Merge sinisa@work.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/hdc/Sinisa/mysql-4.0
2001-07-19 13:34:45 +03:00
Sinisa@sinisa.nasamreza.org
0df6f2f14b Changes for the furtherment of UNIONS 2001-07-19 13:31:54 +03:00
monty@work.mysql.com
01cda0929a merge 2001-07-18 23:58:10 +02:00
monty@hundin.mysql.fi
5a8e734b9a Upgrade TL_WRITE_CONCURRENT_INSERT to TL_WRITE_LOW_PRIORITY if
--low-priority-updates is used and the file has holes.
2001-07-18 23:34:04 +03:00
monty@work.mysql.com
0652902ab5 merge 2001-06-12 14:12:35 +02:00
monty@tik.mysql.fi
1f409baf4c Changed compare in MyISAM to use my_pread()
Fixed that @VAR shows all decimals
Fixed problem with FLUSH TABLES and LOCK TABLE
CREATE ... SELECT now creates keys later
Reset AUTO_INCREMENT order if droping AUTO_INCREMENT key
2001-06-11 15:01:28 +03:00
monty@hundin.mysql.fi
4cbe66582c Symlinking of tables should not work.
Fixed error number handling bug in mysqltest.
Fixed that error number from insert delayed is reported correctly.
merged new vio code with old violite code.
2001-06-05 03:38:10 +03:00
monty@donna.mysql.fi
2ba0846a60 Fixed bug when using MERGE on files > 4G
Fixed bug in SELECT db1.table.* FROM db1.table,db2.table
Fixed bug in INSERT DELAYED when doing shutdown and a table was locked
Changed that tmp_table_size =4G-1 means unlimited.
2001-05-17 00:46:50 +03:00
monty@donna.mysql.fi
7f21a7a6da Fixed INSERT DELAYED with Innobase
Fix for shutdown on NT
Fixed bug when using wrong dates from blob field.
2001-04-09 21:08:56 +03:00
monty@donna.mysql.fi
add70fc1ba Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro
(For glibc 2.2)
2001-03-26 01:05:04 +03:00
monty@tik.mysql.fi
3099c54d94 Test case for bug when updating on key
Fixed bug in CONCAT_WS()
Print the default ISOLATION level.
Change lock type for CREATE ... SELECT and INSERT/REPLACE ... SELECT
2001-03-23 20:38:42 +02:00
monty@tik.mysql.fi
3c48448042 Split setup_fields to setup_tables and setup_fields
Fixed problem with UPDATE TABLE when keys wheren't always used.
2001-03-21 20:13:46 +02:00
monty@donna.mysql.fi
267c8760cb Fixed wrong option in mysql_install_db
Added delayed_user for delayed_threads
Don't use record cache when doing deletes
2001-03-09 03:38:18 +02:00
monty@donna.mysql.fi
32d403f087 Fixed bug in INSERT DELAYED when INSERT generated an error 2001-03-08 21:49:15 +02:00
monty@donna.mysql.fi
bda3e09935 Merged some functions and removed some unused client functions.
Remember UNION for ALTER TABLE
Added test for if we are supporting transactions.
Don't allow REPLACE to replace a row when we have generated an auto_increment key
Fixed bug when using BLOB keys
Fixed bug in SET @variable=user.
2001-03-06 15:24:08 +02:00
monty@donna.mysql.com
6ba7c07ce2 merge 2000-12-24 15:22:33 +02:00
monty@donna.mysql.com
b590fa2567 New benchmark test
Fixed bug in REPLACE with BDB tables
Prepare for write lock on read for BDB
Inform the handler when we want to use IGNORE / REPLACE
New manual pages
2000-12-24 15:19:00 +02:00
tim@cane.mysql.fi
281a054f2a Fix replace bug w/ BDB tables by passing key_length to index_read_idx. 2000-12-22 16:19:54 +02:00
monty@donna.mysql.com
7617d198a4 Lots of fixes for BDB tables
Change DROP TABLE to first drop the data, then the .frm file
2000-12-08 17:04:57 +02:00
monty@donna.mysql.com
87d9388e52 Only write full transactions to binary log
A lot of new functions for BDB tables
Fix for DROP DATABASE on windows
Default server_id variables
2000-12-07 14:08:48 +02:00
monty@donna.mysql.com
81bc313e99 All statements are now run in a sub transaction
Give warning if we are using non transactional tables and do ROLLBACK
Porting of crash-me and benchmarks to FrontBase
2000-11-24 01:51:18 +02:00
monty@donna.mysql.com
b31d076879 Fixed some reported bugs 2000-11-18 23:13:48 +02:00
sasha@mysql.sashanet.com
24a7aae0f4 fixed bugs in delayed insert replication and when slave loses connection after Int_var but before Query
public test suite now tests replication code as well
2000-11-17 23:35:40 -07:00
monty@narttu.mysql.fi
b689a1a752 merge 2000-11-16 00:24:11 +02:00
monty@tik.mysql.com
7a013339f8 Bug fixes, TRUNCATE, safer passwords on command line and connect timeout 2000-11-13 23:55:10 +02:00
sasha@laptop.slkc.uswest.net
57093008c6 laptop commit 2000-11-11 14:57:35 -07:00
monty@donna.mysql.com
8dabd3b053 Fix of automatic repair 2000-10-23 15:35:42 +03:00
sasha@mysql.sashanet.com
b8af8fbe12 RESET MASTER/SLAVE documentation 2000-10-16 09:32:14 -06:00
monty@tramp.mysql.fi
9f7c4563f7 First part of automatic repair of MyISAM tables.
Error on full disk on repair.
SIGHUP signal handling.
Update with keys on timestamp
Portability fixes
2000-10-03 14:18:03 +03:00
monty@donna.mysql.com
751f2d1f16 Faster log::write() call, memory leak fix, flush master fix. 2000-09-16 04:27:21 +03:00
monty@donna.mysql.com
aa3580924b RENAME TABLE table_name TO new_table_name ; Faster Alloc
Small bug fixes
2000-08-21 03:00:52 +03:00
monty@donna.mysql.com
2f450e4fc7 Delayed keys + portability fixes 2000-08-16 05:14:02 +03:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00