Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 198988
Collapse All | Expand All

(-)innobase/include/db0err.h.orig (+12 lines)
Lines 57-62 Link Here
57
					buffer pool (for big transactions,
57
					buffer pool (for big transactions,
58
					InnoDB stores the lock structs in the
58
					InnoDB stores the lock structs in the
59
					buffer pool) */
59
					buffer pool) */
60
#define DB_FOREIGN_DUPLICATE_KEY 46	/* foreign key constraints
61
					activated by the operation would
62
					lead to a duplicate key in some
63
					table */
64
#define DB_TOO_MANY_CONCURRENT_TRXS 47	/* when InnoDB runs out of the
65
					preconfigured undo slots, this can
66
					only happen when there are too many
67
					concurrent transactions */
68
#define DB_UNSUPPORTED		48	/* when InnoDB sees any artefact or
69
					a feature that it can't recoginize or
70
					work with e.g., FT indexes created by
71
					a later version of the engine. */
60
72
61
/* The following are partial failure codes */
73
/* The following are partial failure codes */
62
#define DB_FAIL 		1000
74
#define DB_FAIL 		1000
(-)innobase/include/page0cur.h.orig (+1 lines)
Lines 22-27 Link Here
22
22
23
/* Page cursor search modes; the values must be in this order! */
23
/* Page cursor search modes; the values must be in this order! */
24
24
25
#define	PAGE_CUR_UNSUPP	0
25
#define	PAGE_CUR_G	1
26
#define	PAGE_CUR_G	1
26
#define	PAGE_CUR_GE	2
27
#define	PAGE_CUR_GE	2
27
#define	PAGE_CUR_L	3
28
#define	PAGE_CUR_L	3
(-)sql/ha_innodb.cc.orig (-8 / +36 lines)
Lines 526-531 Link Here
526
 		}
526
 		}
527
527
528
    		return(HA_ERR_LOCK_TABLE_FULL);
528
    		return(HA_ERR_LOCK_TABLE_FULL);
529
 	} else if (error == DB_UNSUPPORTED) {
530
 
531
 		return(HA_ERR_UNSUPPORTED);
529
    	} else {
532
    	} else {
530
    		return(-1);			// Unknown error
533
    		return(-1);			// Unknown error
531
    	}
534
    	}
Lines 3689-3699 Link Here
3689
		  and comparison of non-latin1 char type fields in
3692
		  and comparison of non-latin1 char type fields in
3690
		  innobase_mysql_cmp() to get PAGE_CUR_LE_OR_EXTENDS to
3693
		  innobase_mysql_cmp() to get PAGE_CUR_LE_OR_EXTENDS to
3691
		  work correctly. */
3694
		  work correctly. */
3692
3695
		case HA_READ_MBR_CONTAIN:
3693
		default:			assert(0);
3696
		case HA_READ_MBR_INTERSECT:
3697
		case HA_READ_MBR_WITHIN:
3698
		case HA_READ_MBR_DISJOINT:
3699
			my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0));
3700
			return(PAGE_CUR_UNSUPP);
3701
		/* do not use "default:" in order to produce a gcc warning:
3702
		enumeration value '...' not handled in switch
3703
		(if -Wswitch or -Wall is used)
3704
		*/
3694
	}
3705
	}
3695
3706
3696
	return(0);
3707
	my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "this functionality");
3708
3709
	return(PAGE_CUR_UNSUPP);
3697
}
3710
}
3698
3711
3699
/*
3712
/*
Lines 3831-3841 Link Here
3831
3844
3832
	last_match_mode = (uint) match_mode;
3845
	last_match_mode = (uint) match_mode;
3833
3846
3834
	innodb_srv_conc_enter_innodb(prebuilt->trx);
3847
	if (mode != PAGE_CUR_UNSUPP) {
3835
3848
3836
	ret = row_search_for_mysql((byte*) buf, mode, prebuilt, match_mode, 0);
3849
		innodb_srv_conc_enter_innodb(prebuilt->trx);
3837
3850
3838
	innodb_srv_conc_exit_innodb(prebuilt->trx);
3851
		ret = row_search_for_mysql((byte*) buf, mode, prebuilt,
3852
					   match_mode, 0);
3853
3854
		innodb_srv_conc_exit_innodb(prebuilt->trx);
3855
	} else {
3856
3857
		ret = DB_UNSUPPORTED;
3858
	}
3839
3859
3840
	if (ret == DB_SUCCESS) {
3860
	if (ret == DB_SUCCESS) {
3841
		error = 0;
3861
		error = 0;
Lines 5150-5157 Link Here
5150
	mode2 = convert_search_mode_to_innobase(max_key ? max_key->flag :
5170
	mode2 = convert_search_mode_to_innobase(max_key ? max_key->flag :
5151
                                                HA_READ_KEY_EXACT);
5171
                                                HA_READ_KEY_EXACT);
5152
5172
5153
	n_rows = btr_estimate_n_rows_in_range(index, range_start,
5173
	if (mode1 != PAGE_CUR_UNSUPP && mode2 != PAGE_CUR_UNSUPP) {
5154
						mode1, range_end, mode2);
5174
5175
		n_rows = btr_estimate_n_rows_in_range(index, range_start,
5176
						      mode1, range_end,
5177
						      mode2);
5178
	} else {
5179
5180
		n_rows = 0;
5181
	}
5182
5155
	dtuple_free_for_mysql(heap1);
5183
	dtuple_free_for_mysql(heap1);
5156
	dtuple_free_for_mysql(heap2);
5184
	dtuple_free_for_mysql(heap2);
5157
5185

Return to bug 198988