Commit graph

655 commits

Author SHA1 Message Date
davi@endora.local
36d3c604c1 Merge mysql.com:/Users/davi/mysql/bugs/29592-5.0
into  mysql.com:/Users/davi/mysql/bugs/29592-5.1
2007-11-26 16:10:26 -02:00
davi@mysql.com/endora.local
cdad8669df Bug#29592 SQL Injection issue
Remove the mysql_odbc_escape_string() function. The function
has multi-byte character escaping issues, doesn't honor the
NO_BACKSLASH_ESCAPES mode and is not used anymore by the
Connector/ODBC as of 3.51.17.
2007-11-26 14:09:37 -02:00
istruewing@stella.local
5f206cb372 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  stella.local:/home2/mydev/mysql-5.1-bug31210
2007-11-13 10:33:50 +01:00
mattiasj@mattiasj-laptop.(none)
32d7dd8679 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-main
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main
2007-11-12 21:09:48 +01:00
istruewing@stella.local
b05471de73 Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
    
Post-pushbuild fix
    
Pushbuild detected yet another need for lex initialization in
embedded server.
2007-11-12 13:07:54 +01:00
istruewing@stella.local
e2cc172d35 Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
  
Post-pushbuild fix
  
Pushbuild detected a new need for lex initialization in
embedded server.

Fixed test for INSERT DELAYED in partitions_hash.test so that
it works with embedded server.
2007-11-11 20:38:28 +01:00
kostja@bodhi.(none)
96f8d086f8 Cleanup: use helper functions to set an error in MYSQL or MYSQL_STMT.
No functionality added or changed.
This is a pre-requisite for the fix for Bug#12713 Error in a stored 
function called from a SELECT doesn't cause ROLLBACK of statem

Address post-review comments.
2007-10-31 17:16:53 +03:00
malff@lambda.hsd1.co.comcast.net.
190bb6bf4c Fixed packet length for embedded tests 2007-10-09 18:12:13 -06:00
kent@kent-amd64.(none)
c7c8f41894 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  mysql.com:/home/kent/bk/make-dist-stable/mysql-5.1-build
2007-09-26 18:49:09 +02:00
kent@mysql.com/kent-amd64.(none)
1b53e4a547 Makefile.am:
Always include all sub directories in "make dist"
  Removed incorrect comment
configure.in:
  Unconditionally list make files in AC_CONFIG_FILES
  Removed 'thread_dirs', it is not used
  Minor cleanup
compile-dist:
  Simplified the configure line needed for "make dist" to get it all
zlib.m4, ssl.m4:
  Unconditionally list make files in AC_CONFIG_FILES
Makefile.am:
  Removed DIST_SUBDIRS not needed
  Don't copy soft links as files into source package
2007-09-26 18:47:55 +02:00
tsmith@ramayana.hindu.god
2c44def1ee Bug #30389: connection_id() always return 0 in embedded server
Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.
2007-08-27 14:31:27 -06:00
jbruehe/mysqldev@mysql.com/production.mysql.com
7f21134826 Merge bk-internal:/home/bk/mysql-5.1-marvel
into  mysql.com:/data0/mysqldev/my/build-200708161639-5.1.21-beta/mysql-5.1-release
2007-08-16 21:56:47 +02:00
monty@mysql.com/narttu.mysql.fi
9b6b53f0d0 Fixed errors found by pushbuild:
Fixed failing func_misc test for embedded server
Added casts to avoid compiler warnings
Removed Table_locks_immediate as it's depending on log file cacheing
Changed type of get_time() to avoid warnings
Removed testing if purger master logs succeded as this is not deterministic
2007-08-16 16:47:31 +03:00
kent@mysql.com/kent-amd64.(none)
413d1e1aa4 CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
  - Changed to do embedded build part as normal build, when
    WITH_EMBEDDED_SERVER is set.
  - Allow both normal and debug build with embedded.
  - Build static embedded library by pointing out all source and compile
    it all, i.e. not building libraries from libraries, not portable.
  - Let embedded use generated files from the "sql" directory, added
    dependencies to make sure built before embedded.
  - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
    linked in when debug target is used.
  - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
    others can't depend on it, not defined at configure time. Instead
    set the output file name.
  - Created work around for bug in CMake 2.4.6 and output names, to
    set the "mysqld<suffix>.pdb" name to the same base name.
  - Set the correct manifest "name" (patch by iggy)
2007-08-06 23:16:01 +02:00
iggy@amd64.(none)
64b6c61108 Merge amd64.(none):/src/mysql-5.1-maint
into  amd64.(none):/src/mysql-5.1-build_29903
2007-08-03 21:44:59 -04:00
iggy@amd64.(none)
35b1a59841 Bug#29903 The CMake build method does not produce the embedded library.
- Additional changes to correct link failure in Do-linkall script.
2007-08-03 18:56:24 -04:00
iggy@amd64.(none)
3ed9739c82 Bug#29903 The CMake build method does not produce the embedded library.
- Changes to correct and test Windows embedded build.
2007-08-03 14:43:12 -04:00
kent@mysql.com/kent-amd64.(none)
10778d6fe2 Makefile.am:
Add CMakeLists.txt to source distribution
CMakeLists.txt:
  Added missing '${MYSQLD_EXE_SUFFIX}' to "mysqld" targets new in 5.1
  Manual merge from 5.0 (bug#30118)
CMakeLists.txt, mysqlbinlog.cc, lib_sql.cc:
  No need to test on USING_CMAKE, it is the only Windows build
2007-08-02 15:37:33 +02:00
joerg@trift2.
4f6b3d107b Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-06-18 20:22:18 +02:00
joerg@trift2.
cf95b9e40e Merge trift2.:/MySQL/M41/push-4.1
into  trift2.:/MySQL/M50/push-5.0
2007-06-18 19:44:58 +02:00
iggy@alf.
c15a2647a0 Embedded Server doesn't build on Windows.
- Add build configuration parameter EMBEDDED_ONLY which will configure 
the VS solution to produce only mysql embedded binary.
- Make necessary updates to successfully compile solution.
2007-06-15 14:32:16 -04:00
joerg@trift2.
36adff6d0d Merge trift2.:/MySQL/M41/tmp-4.1
into  trift2.:/MySQL/M50/merge-5.0
2007-06-13 13:55:42 +02:00
kent@mysql.com/c-554072d5.010-2112-6f72651.cust.bredbandsbolaget.se
425bbb3264 libmysqld.def:
Corrected name of mysql_thread_{init,end} (bug#29007)
2007-06-12 01:33:23 +02:00
joerg@trift2.
2d718ff1c2 Add a cast, needed by some platforms.
Still part of the fix for bug#27078.
2007-06-08 17:02:48 +02:00
joerg@trift2.
ab64b2f8f3 Do not use the "thd" pointer to identify a thread in the embedded lib,
but rather use the "thread_id" counter.

Fixes bug#27078:
Compile error: lib_sql.cc cast from 'THD*' to 'pthread_t' loses precision
2007-06-07 23:05:18 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
fc3b3a0a86 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-05-24 13:24:36 +03:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c
2007-05-10 12:59:39 +03:00
mikron@mikael-ronstr-ms-dator.local
8a83924eb6 Merge mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/mysql-5.0-ndb
into  mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/mysql-5.1-ndb
2007-05-07 15:39:36 +02:00
mikron@mikael-ronstr-ms-dator.local
4cdf0fab48 Fix SCI Transporter 2007-05-07 15:25:24 +02:00
joerg@trift2.
f486530d2d Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M51/mysql-5.1
2007-05-02 14:08:43 +02:00
joerg@trift2.
bb2996f487 Format corrections for various "Makefile.am": Leading tab, no trailing blank. 2007-05-02 14:01:49 +02:00
mskold/marty@linux.site
cabef956c2 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-04-24 15:11:22 +02:00
mskold/marty@mysql.com/linux.site
eaba3f2548 ha_ndbcluster.h, ha_ndbcluster.cc:
Refactored code for engine_condition_pushdown to ha_ndbcluster_cond
Makefile.am:
  Added compilation of ha_ndbcluster_cond
ha_ndbcluster_cond.h, ha_ndbcluster_cond.cc:
  Merge
2007-04-24 14:24:06 +02:00
msvensson@pilot.blaudden
2ac94c30f4 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-23 17:01:02 +02:00
mats@romeo.(none)
84ec7be2c7 WL#2735: Refactor replication
Factoring out pack_row() and unpack_row() into new files
rpl_record.{cc,h}.
2007-04-13 14:55:28 +02:00
mats@romeo.(none)
06faf8f411 BUG#27779 (Slave cannot read old rows log events):
Taking code from before BUG#22583 and incorporating as events to be able
to read old events. Also incorporating old pack and unpack functions
into patch.
2007-04-12 15:50:54 +02:00
msvensson@pilot.blaudden
2218fafa1f Merge pilot.blaudden:/home/msvensson/mysql/bug22508/my51-bug22508
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-11 09:34:02 +02:00
msvensson@pilot.blaudden
b554258a8e Bug#22508 BUILD/compile-dist fails due to problem with readline/libedit
- Move the link_sources command from top level Makefile into each subdir
   that need to link files
2007-03-27 23:56:48 +02:00
guilhem@gbichot3.local
8efe1b1fae manual merge 2007-03-09 16:06:08 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
e46972348a bug #25492 (Invalid deallocation in mysql_stmt_fetch())
Additional patch.
mysql_flush_use_result() fixed.
2007-03-05 11:35:04 +04:00
monty@mysql.com/narttu.mysql.fi
520d1b4144 Fixed compilations problems and warnings on windows 2007-02-23 22:48:15 +02:00
monty@mysql.com/narttu.mysql.fi
f0ae3ce9b9 Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
2007-02-23 13:13:55 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
0004fa3c5b bug #25492 (Invalid deallocation in mysql_stmt_fetch) 2007-02-13 00:55:45 +04:00
jani@a88-113-38-195.elisa-laajakaista.fi
cd75806b61 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1
2007-02-03 00:58:09 +02:00
guilhem@gbichot3.local
be389f62de Mechanical class renaming:
Protocol_simple->Protocol_text; Protocol_prep->Protocol_binary
and also THD::protocol_simple->THD::protocol_text,
THD::protocol_prep->THD::protocol_binary.
Reason: the binary protocol is not bound to be used only with
prepared statements long term (see WL#3559 "Decouple binary protocol
from prepared statements"). Renaming now is pressing because
the fix for BUG#735 "Prepared Statements: there is
no support for Query Cache" will introduce a new member
in class Query_cache_flags telling about the protocol's nature.
Other reason: "simple" is less accurate than "text".
Future patches for BUG#735 will rely on this cset.
2007-01-30 22:48:05 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
e3f4f02b64 bug #25492 (Invalid deallocation in mysql_stmt_fetch)
Operating with the prepared statements we don't alloc MYSQL_DATA structure,
but use MYSQL_STMT's field instead (to increase performance by reducing
malloc calls).
So we shouldn't free this structure as we did before.
2007-01-29 11:48:31 +04:00
df@kahlann.erinye.com
a4208cdc1c BUG#25890 put previous fix in better place 2007-01-27 21:26:28 +01:00
df@kahlann.erinye.com
26c6d2d231 BUG#25895 compiling the server with embedded fails on several 64-bit platforms
temporary fix
2007-01-27 20:16:15 +01:00
df@kahlann.erinye.com
508d7da976 BUG#25890 mysqltest_embedded crashes on start
very temporary fix
2007-01-27 13:12:59 +01:00
monty@narttu.mysql.fi
8a80e36ac3 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
Merge of 'remove compiler warnings when using -Wshadow'
2007-01-27 03:46:45 +02:00