Commit a8b7ac32 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb

parents 05c86c7a 2310f00a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1811,7 +1811,7 @@ sub fix_image
{
  my($text) = @_;
  my($arg1, $ext);
  $text =~ /^([^,]*)$/;
  $text =~ /^([^,]*)/;
  die "error in image: '$text'" unless defined($1);
  $arg1 = $1;
  $arg1 =~ s/@@/@/g;
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ extern "C" {
MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
			   my_bool default_value, uint server_capabilities);
void free_rows(MYSQL_DATA *cur);
my_bool mysql_autenticate(MYSQL *mysql, const char *passwd);
void free_old_query(MYSQL *mysql);
void end_server(MYSQL *mysql);
my_bool mysql_reconnect(MYSQL *mysql);
+1 −1
Original line number Diff line number Diff line
@@ -2244,7 +2244,7 @@ dict_foreign_add_to_cache(
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity. Stops
also at '\0'. */
static

const char*
dict_scan_to(
/*=========*/
+12 −0
Original line number Diff line number Diff line
@@ -891,6 +891,18 @@ dict_tables_have_same_db(
	const char*	name2);	/* in: table name in the form
				dbname '/' tablename */

/*************************************************************************
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity. Stops
also at '\0'. */

const char*
dict_scan_to(
/*=========*/
				/* out: scanned up to this */
	const char*	ptr,	/* in: scan from */
	const char*	string);/* in: look for this */

/* Buffers for storing detailed information about the latest foreign key
and unique key errors */
extern FILE*	dict_foreign_err_file;
+17 −18
Original line number Diff line number Diff line
@@ -50,6 +50,15 @@ innobase_invalidate_query_cache(
	ulint	full_name_len);	/* in: full name length where also the null
				chars count */

/**********************************************************************
This function returns true if SQL-query in the current thread
is either REPLACE or LOAD DATA INFILE REPLACE. 
NOTE that /mysql/innobase/row/row0ins.c must contain the 
prototype for this function ! */

ibool
innobase_query_is_replace(void);
/*===========================*/

/*************************************************************************
Creates an insert node struct. */
@@ -1483,7 +1492,7 @@ row_ins_scan_sec_index_for_duplicate(
	ibool		moved;
	mtr_t		mtr;
	trx_t*		trx;
        ibool           success;
	const char*	ptr;
	
	n_unique = dict_index_get_n_unique(index);

@@ -1523,9 +1532,8 @@ row_ins_scan_sec_index_for_duplicate(

		trx = thr_get_trx(thr);      
		ut_ad(trx);
		dict_accept(*trx->mysql_query_str, "REPLACE", &success);

		if (success) {
		if (innobase_query_is_replace()) {

			/* The manual defines the REPLACE semantics that it 
			is either an INSERT or DELETE(s) for duplicate key
@@ -1605,7 +1613,7 @@ row_ins_duplicate_error_in_clust(
	page_t*	page;
	ulint	n_unique;
	trx_t*	trx	= thr_get_trx(thr);
        ibool   success;
	const char*	ptr;

	UT_NOT_USED(mtr);
	
@@ -1639,10 +1647,7 @@ row_ins_duplicate_error_in_clust(
			sure that in roll-forward we get the same duplicate
			errors as in original execution */

			dict_accept(*trx->mysql_query_str, "REPLACE", 
				    &success);

			if (success) {
			if (innobase_query_is_replace()) {

				/* The manual defines the REPLACE semantics 
				that it is either an INSERT or DELETE(s) 
@@ -1683,15 +1688,9 @@ row_ins_duplicate_error_in_clust(
			/* The manual defines the REPLACE semantics that it 
			is either an INSERT or DELETE(s) for duplicate key
			+ INSERT. Therefore, we should take X-lock for
			duplicates.
		        */

			/* Is the first word in MySQL query REPLACE ? */

		 	dict_accept(*trx->mysql_query_str, "REPLACE", 
				    &success);
			duplicates. */

			if (success) {
			if (innobase_query_is_replace()) {

				err = row_ins_set_exclusive_rec_lock(
						LOCK_REC_NOT_GAP,
Loading