• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Database problem since 3.1.6

#1
Hello, thanks for You work.
I'm use
PHP Code:
$this->dbutil->backup 
for backup DB from admin panel. After upgrade, in this a peace of code
PHP Code:
            while ($field $query->result_id->fetch_field())
            {
                
// Most versions of MySQL store timestamp as a string
                
$is_int[$i] = ($field->type MYSQLI_TYPE_TINY)
                        OR (
$field->type MYSQLI_TYPE_SHORT)
                        OR (
$field->type MYSQLI_TYPE_INT24)
                        OR (
$field->type MYSQLI_TYPE_LONG)
                        OR (
$field->type MYSQLI_TYPE_LONGLONG);

                
// Create a string of field names
                
$field_str .= $this->db->escape_identifiers($field->name).', ';
                
$i++;
            } 

returned field type integer, but in DB table this field is varchar.

Method _backup from CI_DB_mysqli_utility class return wrong data without escape string field
Reply

#2
(11-12-2017, 02:44 PM)phpforever2017 Wrote: Hello, thanks for You work.
I'm use
PHP Code:
$this->dbutil->backup 
for backup DB from admin panel. After upgrade, in this a peace of code
PHP Code:
while ($field $query->result_id->fetch_field())
 {
 
// Most versions of MySQL store timestamp as a string
 
$is_int[$i] = ($field->type MYSQLI_TYPE_TINY)
 OR (
$field->type MYSQLI_TYPE_SHORT)
 OR (
$field->type MYSQLI_TYPE_INT24)
 OR (
$field->type MYSQLI_TYPE_LONG)
 OR (
$field->type MYSQLI_TYPE_LONGLONG);

 
// Create a string of field names
 
$field_str .= $this->db->escape_identifiers($field->name).', ';
 
$i++;
 } 

returned field type integer, but in DB table this field is varchar.

Method _backup from CI_DB_mysqli_utility class return wrong data without escape string field

https://github.com/bcit-ci/CodeIgniter/issues/5276
Reply

#3
(11-12-2017, 11:24 PM)Paradinight Wrote: https://github.com/bcit-ci/CodeIgniter/issues/5276

Thanks
Reply

#4
(11-19-2017, 06:51 PM)phpforever2017 Wrote:
(11-12-2017, 11:24 PM)Paradinight Wrote: https://github.com/bcit-ci/CodeIgniter/issues/5276

Thanks

Yes, this bug is still active, on export, I have line like this:

Code:
VALUES (54, value1, value2 , 2407000);


Mysql/MariaDB can't import value without quotes, it returns an error:
ERROR 1064 (42000)
Reply

#5
Did you download the CodeIgniter Development Version and try it?
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.