Commit 3abaff79 authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi
Browse files

row0sel.c Removes now trailing spaces from varchars

srv0start.c	Removes now trailing spaces from varchars
row0mysql.ic	Removes now trailing spaces from varchars
ha_innobase.cc	Removes now trailing spaces from varchars
parent 831e23ed
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ row_mysql_store_col_in_innobase_format(
						|| type == DATA_BINARY) {
		ptr = row_mysql_read_var_ref(&col_len, mysql_data);
		
		/* Remove trailing spaces */
		while (col_len > 0 && ptr[col_len - 1] == ' ') {
			col_len--;
		} 

	} else if (type == DATA_BLOB) {
		ptr = row_mysql_read_blob_ref(&col_len, mysql_data, col_len);
	}
+3 −0
Original line number Diff line number Diff line
@@ -1934,6 +1934,9 @@ row_sel_field_store_in_mysql_format(
		dest = row_mysql_store_var_len(dest, len);
		ut_memcpy(dest, data, len);

		/* Pad with trailing spaces */
		memset(dest + len, ' ', col_len - len); 

		/* ut_ad(col_len >= len + 2); No real var implemented in
		MySQL yet! */
		
+6 −0
Original line number Diff line number Diff line
@@ -175,6 +175,9 @@ open_or_create_log_file(
		fprintf(stderr,
		"Innobase: Log file %s did not exist: new to be created\n",
									name);
		printf("Innobase: Setting log file %s size to %lu\n",
			             name, UNIV_PAGE_SIZE * srv_log_file_size);

		ret = os_file_set_size(name, files[i],
					UNIV_PAGE_SIZE * srv_log_file_size, 0);
		if (!ret) {
@@ -323,6 +326,9 @@ open_or_create_data_files(
			printf("Innobase: Setting file %s size to %lu\n",
			       name, UNIV_PAGE_SIZE * srv_data_file_sizes[i]);

			printf(
	    "Innobase: Database physically writes the file full: wait...\n");

			ret = os_file_set_size(name, files[i],
				UNIV_PAGE_SIZE * srv_data_file_sizes[i], 0);

+12 −4
Original line number Diff line number Diff line
@@ -431,7 +431,8 @@ innobase_init(void)

	if (!innobase_data_file_path)
	{
	  fprintf(stderr,"Can't initialize Innobase as 'innobase_data_file_path' is not set\n");
	  fprintf(stderr,
       "Can't initialize Innobase as 'innobase_data_file_path' is not set\n");
	  innobase_skip=1;
	  DBUG_RETURN(FALSE);			// Continue without innobase
	}
@@ -1278,6 +1279,12 @@ innobase_convert_and_store_changed_col(

	if (len == UNIV_SQL_NULL) {
		data = NULL;
	} else if (col_type == DATA_VARCHAR) {
	        /* Remove trailing spaces */
        	while (len > 0 && data[len - 1] == ' ') {
	                len--;
	        }

	} else if (col_type == DATA_INT) {
		/* Store integer data in Innobase in a big-endian
		format, sign bit negated, if signed */
@@ -2581,13 +2588,14 @@ ha_innobase::update_table_comment(
{
  uint length=strlen(comment);

  char *str=my_malloc(length + 50,MYF(0));
  char *str=my_malloc(length + 100,MYF(0));

  if (!str)
    return (char*)comment;

  sprintf(str,"%s Innobase free: %lu kB", comment,
	  (ulong) innobase_get_free_space());
  sprintf(str,
    "%s; (See manual about Innobase stats); Innobase free: %lu kB",
	  comment, (ulong) innobase_get_free_space());

  return((char*) str);
}